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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
ozoCommented:
top
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

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
tfewsterCommented:
The equivalent in Solaris to would be
ps -e -o user,pid,pcpu,vsz,time,comm |sort -r +2
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sampayoCommented:
good for you tfewster
I guess there isn't much interpolation.
0
PhoebeAuthor Commented:

!!! GREAT !!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.