Operating System - HP-UX
1753682 Members
5609 Online
108799 Solutions
New Discussion юеВ

TOP Process on CPU/Memory

 
SOLVED
Go to solution
Ganesh Balraman
Regular Advisor

TOP Process on CPU/Memory

Hi All!

1.How to find Top Process on CPU i.e greater than 100 mins of CPU time?

2.How to find top process on memory i.e greater than 100MB?

Thanks,
Ganesh
5 REPLIES 5
VVS
Regular Advisor

Re: TOP Process on CPU/Memory

Hi,

1. Use top -h and see the processes consuming the resources.
2. Use tool like Glance/gpm to see and sort the processes, glance will also give you the process details.
3. UNIX95=1 ps -e -o vsz,pid,ruser,args | sort -rn |head

Regards,
VVS
Work is life, you know, and without it, there's nothing but fear and insecurity.
Pramod Kumar M
Advisor

Re: TOP Process on CPU/Memory

Hi,

If look at man TOP, this what describes memory and time taken

n: %MEM -- Memory usage (RES)
A task's currently used share of available physical memory.


l: TIME -- CPU Time
Total CPU time the task has used since it started. When 'Cumulative
mode' is On, each process is listed with the cpu time that it and
its dead children has used. You toggle 'Cumulative mode' with 'S',
which is a command-line option and an interactive command. See the
'S' interactive command for additional information regarding this
mode.

So looking at these two statistcis in TOP you can figure out whatever you are looking for.

-Pramod.
Kapil Jha
Honored Contributor

Re: TOP Process on CPU/Memory

1.How to find Top Process on CPU i.e greater than 100 mins of CPU time?
>> ps -ef|head -20|sort -rk8

so this would list you the process took maximum CPU time.

2.How to find top process on memory i.e greater than 100MB?
just check top RES

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Kapil Jha
Honored Contributor
Solution

Re: TOP Process on CPU/Memory

OOps....my bad no head -20

#ps -ef|sort -rk8

BR,
Kapil+
I am in this small bowl, I wane see the real world......
nightwich
Valued Contributor

Re: TOP Process on CPU/Memory

Hi Kapil


I thing you want to say: ps -ef | sort -rnk 8

Regards.