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

This is a discussion on how to find out what processes are taking up CPU resources? - SUN ; 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 ...

+ Reply to Thread
Results 1 to 6 of 6

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

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

    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.

  2. Re: how to find out what processes are taking up CPU resources?

    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

  3. Re: how to find out what processes are taking up CPU resources?

    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.

  4. Re: how to find out what processes are taking up CPU resources?

    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

  5. Re: how to find out what processes are taking up CPU resources?

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

    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


  6. Re: how to find out what processes are taking up CPU resources?

    prstat can also be used.

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

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


+ Reply to Thread