|
|
 |
|
Display top CPU consumers
with ps
Oracle Tips by Burleson Consulting
|
Display top CPU consumers
with ps
The following command can be used to display the top CPU
consumers on any UNIX server. Note that the sort +6 command
displays the CPU column. This is because the ps columns are
counted from left-to-right, with the first column being
column zero.
root> ps -ef|sort
+6|tail
root 512 1 0 Aug 10 ? 0:53 /usr/lib/osa/bin/arraymon
root 460 1 0 Aug 10 ? 1:22 /usr/sbin/cron
root 1 0 0 Aug 10 ? 2:26 /etc/init -
root 565 1 0 Aug 10 ? 6:12 /usr/bin/perl /pixlog.pl
root 471 1 0 Aug 10 ? 9:10 /usr/sbin/nscd
netsaint 765 1 0
Aug 10 ? 27:16 helpdesk/netsaint.cfg
root 742 572 0 Aug 10 ? 32:04 opt/VRTSvmsa
root 454 1 0 Aug 10 ? 44:09 /usr/sbin/syslogd
root 3 0 0 Aug 10 ? 363:12 fsflush
Here we see the tasks in order of their total CPU
consumption, with the largest value at the end of the list.
In cases where a process has been running for more than one
day, the display format changes. In these cases, the time
format changes and column 5 is the CPU column.
root> ps -ef|sort
+5|tail
root 5440 2094 0 Nov 21 - 0:47 /usr/sbin/syslogd
root 9244 1 0 Nov 21 - 3:26 ./pdimapsvr.ip -D0
root 10782 1 0 Nov 21 - 4:41 ./pdiconsvr.ip -D0
root 5990 2094 0 Nov 21 - 5:33 /usr/sbin/snmpd
root 4312 1 0 Nov 21 - 7:14 /usr/sbin/cron
root 4448 2094 0 Nov 21 - 9:25 /usr/sbin/rwhod
root 1 0 0 Nov 21 - 198:59 /etc/init
root 2450 1 0 Nov 21 - 438:30 /usr/sbin/syncd 60
In the real world, the Oracle Remote DBA will issue this
command twice, once with column 5 and again with column 6.
|
 |
Expert Remote DBA
BC is America's oldest and largest Remote DBA Oracle support
provider. Get real Remote DBA experts, call
BC Remote DBA today. |
 |
|
|
|
|