[LAU] getting cpu usage on commandline

Bengt Gördén bengan at bag.org
Wed Mar 11 03:53:20 EDT 2009


Den Tuesday 10 March 2009 23.48.22 skrev Atte André Jensen:
> Julien Claassen wrote:
> > Hello atte!
> >   Two things I can think of: Have you tried the normal top? - I don't
> > know about its accuracy.
>
> I played around a bit more, and it seems I misjudged "ps aux", since it
> seems to report correct values. Will takt that route and get back in
> case of further trouble.

The -o option for ps is very usable.

I have two alias that I use frequent.

ps -eo pid,pcpu,comm|egrep -v 0.0|sort -r -k2
ps -eo pid,rss,size,pmem,comm|egrep -v "0.0"|sort -r -k4|head

See "man ps" for more options of -o.

regards,


/bengan



More information about the Linux-audio-user mailing list