手动执行shell和crontab执行结果不同
在你的shell脚本开始加上##################. /etc/profile. ~/.bash_profile###################!/bin/bash##################. /etc/profile. ~/.bash_profile##################lan_eth=`netstat -ni |awk '{print $1'}|grep -Ev 'lo|Iface|Kernel|bond'`for i in $lan_ethdo& nbsp; &n...
关于 "can't identify protocol" 问题的定位
问题定位步骤: 1、 用root帐户 遍历 /proc/进程ID/fd目录,如果该目录下文件数比较大(如果大于10,一般就属于socket泄漏),根据该进程ID,可以确认该进程ID所对应的名称。 2、 重启程序恢复服务,以便后续查找问题。 3、 strace 该程序并记录strace信息。strace –p 进程ID >>/tmp/stracelog.lo...
linux下查看系统进程占用的句柄数
---查看系统默认的最大文件句柄数,系统默认是1024# ulimit -n1024 ----查看当前进程打开了多少句柄数# lsof -n|awk '{print $2}'|sort|uniq -c|sort -nr|more131 24204 57 24244 57 24231 ........其中第一列是打开的句柄数,第二列是进程ID。可以根据ID号来查看进程名。...
linux将GPT分区转换为MBR、RHEL GPT报错
描述:现有IBM BLADE Center刀箱某型号的刀片上安装有windows2008 R2 Enterprise Endtion,因业务需求需要将操作系统更换为RHEL5.5 64bit,操作系统安装过程,自定义分区后报错如下:"Your boot partition is on a disk using the GPT partitioning scheme but this machine cannot boot using GPT."处理方式:在图...