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

  • Follow


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.
0
Reply serendipity1276 (27) 8/29/2008 8:32:17 PM

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?
> 
> 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.
try /usr/ucb/ps -aux
/Jorgen
0
Reply Jorgen 8/29/2008 8:43:58 PM


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?
> 
> 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.


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.
0
Reply Richard 8/29/2008 8:44:55 PM

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
0
Reply David 9/2/2008 3:37:25 PM

In article <26a87f20-4252-45ec-babd-03947c3216bd@a8g2000prf.googlegroups.com>,
Michelle  <serendipity1276@yahoo.com> 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?
| 
| 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.

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

0
Reply seeger 9/3/2008 10:58:06 PM

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
Reply Masood 9/21/2008 2:44:04 PM

5 Replies
218 Views

(page loaded in 0.089 seconds)

Similiar Articles:













7/9/2012 12:42:01 PM


Reply: