Linux--How to check processes not run by you ..!

Imagine the scene - you get yourself ready for a quick round of Crack Attack against a colleague at the office, only to find the game drags to a halt just as you're about to beat your uppity subordinate - what could be happening to make your machine so slow? It must be some of those other users, stealing your precious CPU time with their scientific experiments, webservers or other weird, geeky things!
OK, let's list all the processes on the box not being run by you!

ps aux | grep -v `whoami`
 
Or, to be a little more clever, why not just list the top ten time-wasters:

ps aux  --sort=-%cpu | grep -m 11 -v `whoami` 
 
It is probably best to run this as root, as this will filter out most of the vital background processes. Now that you have the information, you could just kill their processes, but much more dastardly is to run xeyes on their desktop. Repeatedly!

Comments