Emulating top for GeekTool
There are lots of stupid solutions for GeekTool's inability to use top (or other keep-running tools).Here's my easy solution:
ps -axcr -o pid,%cpu,command,rsz,state | head -n 15 | awk '$5!=ps'Explained:
- Use ps to generate a list of running processes, for all users, and sort them by CPU usage.
- Only print the given columns.
- Take the top 15.
- Remove any entries for ps itself.
Posted at 2007-04-03 19:29:47 by Richard • Link to Emulating top for …
