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: Felix_the_Mac on Nov 17, '04 06:02:50PM
Here's my attempt:

while (true); do clear;ps -c -p 1670  -o command -o %cpu | grep -v COMMAND ; sleep 1; done;
It will give you a continuous, single line output of the pid that you specify (1670 in the example) Marks out of 10? :-)

[ Reply to This | # ]