Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Monitor one task's CPU usage via top' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Monitor one task's CPU usage via top
Authored by: snwbrdr3448 on Nov 16, '04 05:46:45PM

here are some of the commands im using in geektool based on this hint:

load average:
top -u -FR -l1 | grep 'Load Avg' | cut -c 1-27
cpu usage:
top -u -FR -l1 | grep 'Load Avg' | cut -c 33-90
memory left:
top -u -FR -l1 | grep 'PhysMem' | cut -c 1-9 -c 65-80
currently running programs using the CPU:
top -u -FR -l2 | grep -v 0.0% | grep % | grep -v Load | grep -v COMMAND | cut -c 7-24



[ Reply to This | # ]