Using top on SMP machines

I've been trying to sort out some user problems where multiple users are running on an SMP machine. You can use top to figure out where processes are running. When you run top, you can hit the "1" key to get a separate usage listing for each processor. If you want to see where a particular process is running, hit "f" to select columns, then hit "j" to add the CPU column. Then the top output will now show you the CPU number for each process.

UPDATE: If you need to see all of the threads associated with a process, hit "H" in top and you'll get them all. Along with the above option, you can see just how badly abused your CPUs are.

Stargate SG1 - Season 10

Oh my god. I'm watching episode 6 from season 10, named "200". This has got to be the funniest episode I have ever seen. Everyone should have to see this.

sed tip : removing blank space from the front of a line

There are times when you want to trim text quickly, maybe in a shell script. One way to do this is to use sed. To trim off all blank spaces, including any tab characters, just use


sed -e "s/^[ \t]*//g" your_text.txt

This will go through your file and trim the front of each line.