Operating System - HP-UX
1752805 Members
5741 Online
108789 Solutions
New Discussion юеВ

Re: How to find on which CPU a process is running.

 
TanmayB
Occasional Advisor

How to find on which CPU a process is running.

I have requirement to prepare a report regarding the CPU allocation of process. My requirement is like this.....
From top -h command we can find on which CPU the processes are running. I need to list all processes on a system which runs 13000+ at any point of time. Is there any way to get output in report format, the way we get different stat using extract command?
2 REPLIES 2
Dennis Handly
Acclaimed Contributor

Re: How to find on which CPU a process is running.

You can get the top(1) output into a file with:
top -f top.out -n 14000

Where -n gives the maximum processes.
If you want to customize which columns are printed, you could use ps(1) with -o. Unfortunately it doesn't provide the CPU number.
Arturo Galbiati
Esteemed Contributor

Re: How to find on which CPU a process is running.

Hi,
you can also use the glance command using the option advisor-only.
man glance for more option.
HTH,
Art