Vote
Bury
8

Top processes sorted by CPU usage

Posted in System by matt 253 days ago
This geeklet displays the top 12 processes sorted by their CPU usage. It updates every 30 seconds.

The three columns it shows are given by "command %cpu %mem." You can delete one of those if you don't want it. You can change "head -13" at the end of the command to specify how many processes to show.

Command: ps -arcwwwxo "command %cpu %mem" | grep -v grep | head -13
Font: Courier
Colour: White
Size: 11


Geeklet file(s) to download

proccessescpu.glet

Either right-click and choose "Save Linked File As..." or hold the Option key and click to download files.
If using Safari, you may have to rename the files without the extra .txt extension that is added.

Comments


Written by maelcum
241 days ago
Why the 'grep -v grep'?

ps -amcwwwxo "command %cpu %mem" | head -13

works nicely for me.



Written by matt
223 days ago
Ah, oops. While I was playing around with different versions of the script I had grep -v grep to remove grep from the list if it appears. As you say, it's completely unnecessary in the script as it is above.



Written by llorban
162 days ago
How did you get the columns to show in such an orderly fashion? Each line on mine is offset

edit: I see now you used courier font



Log in to comment or register here.