CPU Load for each process.

How can I check CPU time used by each process?

In other words, How can I check which process is the first
one to use the CPU,  and which is second one.
PhoebeAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
tfewsterConnect With a Mentor Commented:
The equivalent in Solaris to would be
ps -e -o user,pid,pcpu,vsz,time,comm |sort -r +2
0
 
tfewsterCommented:
ps -l will show you the actual CPU time used by a process (TIME) and the priority (NI [nice]) columns;

Which process gets the CPU first depends on the type of job plus the "nice" value under solaris - man  priocntl will tell you more, but if all priorities are equal the processes will get equal CPU time.
0
 
sampayoCommented:
Try this out

ps aux |sed '1s/%/:/' |sort -r +2 |\
sed '1s/:/%/' |more
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
ozoCommented:
top
0
 
PhoebeAuthor Commented:
when I click in the command. I was told


bidwelluat% ps aux | sed 'ls/%/:/' | sort -r +2 |\
sed 'ls/:/%/' | more
usage: ps [ -aAdeflcjLPy ] [ -o format ] [ -t termlist ]
        [ -u userlist ] [ -U userlist ] [ -G grouplist ]
        [ -p proclist ] [ -g pgrplist ] [ -s sidlist ]
  'format' is one or more of:
        user ruser group rgroup uid ruid gid rgid pid ppid pgid sid
        pri opri pcpu pmem vsz rss osz nice class time etime stime
        f s c lwp nlwp psr tty addr wchan fname comm args


Sorry I forgot telling you that I working on Solaris 2.6
0
 
sampayoCommented:
good for you tfewster
I guess there isn't much interpolation.
0
 
PhoebeAuthor Commented:

!!! GREAT !!!
0
All Courses

From novice to tech pro — start learning today.