我管理大量的服务器,只有Ubuntu10.04LTS有这个问题:我在正常负载下运行一个服务器(比如8核服务器上的平均负载3.0 )。"top“命令显示的进程占用了导致这个平均负载的某些CPU的百分比:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
11008 mysql 20 0 25.9g 22g 5496 S 67 76.0 643539:38 mysqld
ps -o pcpu,pid -p11008
%CPU PID
53.1 11008一切都是一致的。
突然之间,导致负载平均的进程从"top“中消失,但该进程继续正常运行(尽管性能略有下降),并且系统平均负载变得更高。ps -o pcpu的输出变成假的:
# ps -o pcpu,pid -p11008
%CPU PID
317910278 1587这至少发生在5个不同的服务器(不同的全新IBM System硬件)上,每个服务器运行不同的软件:一个httpd 2.2、一个mysqld 5.1和一个Twisted Python服务器。每次内核在2.6.32-32服务器和2.6.32-40服务器之间.我将一些机器更新为2.6.32-41-server,这些机器上还没有出现这种情况,但是这种错误很少见(大约每60天一次)。
这是来自受影响的机器:
top - 10:39:06 up 73 days, 17:57, 3 users, load average: 6.62, 5.60, 5.34
Tasks: 207 total, 2 running, 205 sleeping, 0 stopped, 0 zombie
Cpu(s): 11.4%us, 18.0%sy, 0.0%ni, 66.3%id, 4.3%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 74341464k total, 71985004k used, 2356460k free, 236456k buffers
Swap: 3906552k total, 328k used, 3906224k free, 24838212k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
805 root 20 0 0 0 0 S 3 0.0 1493:09 fct0-worker
982 root 20 0 0 0 0 S 1 0.0 111:35.05 fioa-data-groom
914 root 20 0 0 0 0 S 0 0.0 884:42.71 fct1-worker
1068 root 20 0 19364 1496 1060 R 0 0.0 0:00.02 top 导致高负载的任何东西都显示在上面,但是我有两个高度加载的mysqld实例,它们突然显示出疯狂的CPU%:
#ps -o pcpu,pid,cmd -p1587
%CPU PID CMD
317713124 1587 /nail/encap/mysql-5.1.60/libexec/mysqld和
#ps -o pcpu,pid,cmd -p1624
%CPU PID CMD
2802 1624 /nail/encap/mysql-5.1.60/libexec/mysqld以下是来自
# cat /proc/1587/stat
1587 (mysqld) S 1212 1088 1088 0 -1 4202752 14307313 0 162 0 85773299069 4611685932654088833 0 0 20 0 52 0 3549 27255418880 5483524 18446744073709551615 4194304 11111617 140733749236976 140733749235984 8858659 0 552967 4102 26345 18446744073709551615 0 0 17 5 0 0 0 0 0第14和15位数字
man proc 应该是
utime %lu Amount of time that this process has been scheduled in user mode, measured in clock ticks (divide by
sysconf(_SC_CLK_TCK). This includes guest time, guest_time (time spent running a virtual CPU, see
below), so that applications that are not aware of the guest time field do not lose that time from
their calculations.
stime %lu Amount of time that this process has been scheduled in kernel mode, measured in clock ticks (divide by
sysconf(_SC_CLK_TCK).在普通服务器上,每次我检查/proc/PID/stat时,这些数字都在增加。在一台有缺陷的服务器上,这些数字被卡在一个像4611685932654088833这样高得离谱的值上,而且没有变化。
有人遇到过这个错误吗?
发布于 2012-07-10 18:09:22
我想这可能是procps包中的一个bug,而不是内核。没有看到您描述的bug,但是多年来在各种发行版中都有类似的bug,是的。
如果这是关于procps的,那么Ubuntu10.04LTS是否有一个补丁可供使用?不知道,已经很长很长时间没用过了,甚至最后一次也是在遥远的星系里。
https://serverfault.com/questions/406489
复制相似问题