1832933 Members
2546 Online
110048 Solutions
New Discussion

Re: -f option in ps

 
Praveen Bezawada
Respected Contributor

-f option in ps

Hi
The man of ps say the -f displays
user,pid,ppid,cpu,stime,tty,time,args
and 'cpu' is defined as 'Processor utilization for scheduling'.I had understood that it means that the value under CPU is the cpu number on which the process is running.
Am I correct ?
But the value under cpu for some processes is over 100 !!!! Why is it so.

Thanks in advance
...BPK...
8 REPLIES 8
Sridhar Bhaskarla
Honored Contributor

Re: -f option in ps

I think it is not the processor number but the
utilization for scheduling the job.

Use XPG4 version for better output.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Praveen Bezawada
Respected Contributor

Re: -f option in ps

Hi
But some of the processes which are using more CPU ( as seen from the glance ) show a value of 0.

Paula J Frazer-Campbell
Honored Contributor

Re: -f option in ps

Hi

The CPU column is not the cpu utilisation but:-

cpu Processor utilization for scheduling. The default
heading for this column is C.

See man ps

paula
If you can spell SysAdmin then you is one - anon
eran maor
Honored Contributor

Re: -f option in ps

Hi

When the system recalculates process priorities , Processes that have recently used the CPU (higher C column values), will
have lower priorities, and processes that have been waiting for the CPU (lower C column values), will have higher priorities.
love computers
Manel Ventura
Advisor

Re: -f option in ps

Hi,

It isn't the CPU number. It is the CPU usage of that process. If you execute the command for all your processes, you will see that those that more consumes are also those that bigger value has in this column.
Praveen Bezawada
Respected Contributor

Re: -f option in ps

Hi
But as I had said , some processes which are using more CPU ( as seen from Glance ) have a value of 0 in CPU column.
Robin Wakefield
Honored Contributor

Re: -f option in ps

Hi Praveen,

The C column indicates the recent CPU usage value of a process. It is incremented by 1 each time that process is in control of the CPU when the timer interrupt occurs (every 10 milliseconds). The maximum value of recent CPU usage is 120.

Rgds, Robin
Sridhar Bhaskarla
Honored Contributor

Re: -f option in ps

The CPU column that appears in top is the processor number. The one you get with -f of ps
is the utilization for scheduling the process.

I am not sure if we can see the CPU number with the ps command

-Sri
You may be disappointed if you fail, but you are doomed if you don't try