Eighth Friday Linux Lesson

Tagged as Linux

Written on 2007-07-07 01:42:00

Okay. So I was having a really hard time thinking of what to cover this week and ran this command " history | awk '{print $2}' | awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c | sort -n | tail | sort -nr" on the command line to see what commands I use the most. Long story short that gave me an idea for what to do this week.

This week's concept is that of process management. Process management is what happens when you hit control-alt-delete in Windows to end task on that stupid program that just won't close. The concept is analogous in Linux. Occasionally something gets so out of line that you just have to beat it over the head and tell it to go away. It's also nice to be able to tell what is really eating your system resources.

So, there are two commands for this week. "ps" and "kill". "ps" lists all active processes when run with the -ax arguments like so: "ps -ax". This gives you a nice list of all processes running and their associated pid (process id numbers). Those id numbers can be passed to "kill" to kill the associated process like so: "kill your_idnumber". It's that easy. The process should cough and wheeze and go down pretty quick and that tends to be a good feeling when it's pissed you off enough to kill it in the first place. So, there you are. That's really all I've got for this week. I'm pretty out of it and uninspired of late. If anyone has any ideas or suggestions feel free to pass them along.
comments powered by Disqus

Unless otherwise credited all material Creative Commons License by Brit Butler