Chinaunix

标题: AIX下ps 和topas显示的CPU使用情况到底哪个准确? [打印本页]

作者: duansq    时间: 2009-05-06 09:56
标题: AIX下ps 和topas显示的CPU使用情况到底哪个准确?
AIX下ps 和topas显示的CPU使用情况到底哪个准确?\r\nps aux 中显示 %cpu 为6.2\r\nUSER         PID %CPU %MEM   SZ  RSS    TTY STAT    STIME  TIME COMMAND\r\noracle    651404  6.2  3.0 420416 462524      - A    14:57:12 120:33 oraclequery (LO\r\n\r\n%CPU\r\n            (u and v flags) The percentage of time the process has used the CPU since the process started. The value is computed\r\n            by dividing the time the process uses the CPU by the elapsed time of the process. In a multi-processor environment,\r\n            the value is further divided by the number of available CPUs because several threads in the same process can run on\r\n            different CPUs at the same time. (Because the time base over which this data is computed varies, the sum of all %CPU\r\n            fields can exceed 100%.)\r\n            \r\ntopas中显示同一个进程为12.5                       \r\n                                                            PgspOut       0\r\nName            PID  CPU%  PgSp Owner           PageIn        0  PAGING SPACE\r\noracle       651404  12.5 324.0 oracle          PageOut       6  Size,MB    6912\r\n\r\n% CPU Utilization\r\n                   The average processor use of the process over the monitoring interval. The first time a process is shown, this\r\n                   value is the average processor use over the lifetime of the process.
作者: duansq    时间: 2009-05-06 10:07
操作系统版本为aix 6.1 服务器有8个CPU,从topas来看,个人认为显示应该正常,一个CPU资源全部被占用100/8确实是12.5,但ps 为什么显示有这么大的差别呢?我是想用脚本进行资源监控,在HP及LINUX下用ps好像都没有问题
作者: duansq    时间: 2009-05-06 10:56
怎么就没人回答呢?难道没人碰到类似问题??
作者: AIX深入敌后    时间: 2009-05-07 11:46
ps 和 topas 偏重的不一样\r\n要想准确查看cpu的使用情况 最好用sar -u
作者: yddll    时间: 2009-05-07 19:43
一个是used\r\n一个是use\r\n\r\n一个是说的process Utilization,一个说的cpu Utilization\r\n\r\n怎么扯在一起说呢?




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2