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


Click here to return to the 'View valid 'top' output on the desktop via GeekTool' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
View valid 'top' output on the desktop via GeekTool
Authored by: atomicham on Dec 20, '06 09:43:54PM

I just came across this while trying to find the answer. Finally, after seeing this tip with a python script, I crafted a single bash line:

l=`top -l1 -n20 | wc -l` && top -l2 -n20 -o cpu | tail -n${l}


This runs top a first time to figure out how many lines there are (I limit it to 20 processes, you can change that), it then does top with 2 updates (the second being the correct one) and cuts off the top half.



[ Reply to This | # ]