Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to find out what processes are taking up CPU resources?

0 views
Skip to first unread message

Michelle

unread,
Aug 29, 2008, 4:32:17 PM8/29/08
to
I have a SUN OS version 5.8 system. The computer is running extremely
slow,
while other systems on the network are behaving normally.

What command on Solaris will allow me to see what process is taking up
what
percentage of my CPU?

I am familiar with the "ps -e" command, but it doesn't tell me what
resource is
taking up all the memory to cause my system to be so slow. Thanks.

Jorgen Moquist

unread,
Aug 29, 2008, 4:43:58 PM8/29/08
to
try /usr/ucb/ps -aux
/Jorgen

Richard B. Gilbert

unread,
Aug 29, 2008, 4:44:55 PM8/29/08
to


ps -ef will show you what's running on the system and the CPU time used.
It's pretty crude but will give you a general idea what's going on.

See man sar!

Also consider what hardware you are running! You didn't mention it.
There are some real antiques around that will not impress anyone with
their performance. (Sometimes those ten year old boxes run their ten
year old applications and deliver adequate performance.)

Performance monitoring and tuning is a little too complex for adequate
treatment in a newsgroup. Especially so with the pittance of
information you have provided.

David Mathog

unread,
Sep 2, 2008, 11:37:25 AM9/2/08
to
Michelle wrote:
> I have a SUN OS version 5.8 system. The computer is running extremely
> slow,
> while other systems on the network are behaving normally.
>
> What command on Solaris will allow me to see what process is taking up
> what
> percentage of my CPU?

"top" is usually the best tool for quickly finding CPU hogs. It isn't
part of Solaris 8, but you can get one from www.sunfreeware.com.
"Usually" because it will not pick up the case where a large number of
jobs are running at high CPU for a tiny fraction of a second.

It might also be a disk IO issue, in which case iostat is your friend.

It might also be a busy network interface, in which case "netstat -ai"
should help.

Regards,

David Mathog

Charles Seeger

unread,
Sep 3, 2008, 6:58:06 PM9/3/08
to
In article <26a87f20-4252-45ec...@a8g2000prf.googlegroups.com>,

This script sorts the processes based on cpu usage (to sort on memory
usage instead, change the "4" to "5" in the sort command line):

#! /bin/sh
#
# @(#)psnice - sort processes by cpu usage and show some other resources
#
# The linux ps complained about the -c option, and the "-g 1" ps command
# matched several processes (leading to the use of "| head -1").
#

PSFMTh='-o user,pid,ppid,pcpu,pmem,nice,pri,stime=START -o time,comm'
PSFMTnh='-o user= -o pid= -o ppid= -o pcpu= -o pmem= -o nice= -o pri= -o stime= -o time= -o comm='
ps -g 1 ${PSFMTh} | head -1
ps -e ${PSFMTnh} | sort -n -r -k 4


HTH,
Chuck

Masood Syed

unread,
Sep 21, 2008, 10:44:04 AM9/21/08
to
prstat can also be used.

http://developers.sun.com/solaris/articles/prstat.html.

this article can give you a good understanding of the command.

0 new messages