Command for processes

I need a command for listing:
- number of current started processes,
- percentage CPU usage and
- cpu usage.

And save all that to some file. I found ps -u, but it has all kind of info that i dont need. Is it posibble to list only some info?
Thx.
 
Also look at the -o options in ps(1), e.g.

Code:
ps -e -o pcpu,cpu,nice,state,cputime,args
or go all out with
Code:
ps -ajguxww -o pcpu,cpu,nice,state,cputime,args
;)

Pick, choose, cut and sort at will.
 
Back
Top