Let's say for instance that you have a login id of "goofus". You've been working merrily along in poorly written program, or your favorite design tool, and find yourself wedged uncomfortably between a funny looking screen and the back of your chair. Panic sets in. Then frustration. Then you reach for the phone to call your trusty and faithful sysadmins... BUT WAIT, no need to track down the dynamic duo... YES, YOU CAN DO IT YOURSELF!!! And you can even do it without hurting yourself or your workstation. (However, you may lose any unsaved work, but you will lose it if you call the admins too... :-(In the following example we will first look to see who is logged into the machine, and for how long, and what processes they are running. You'll also find out what a PID is.
step one: IDENTIFY the PROBLEM and look for the culprit PID
-----------------------------------------------------using the "w" command
goofus@smart99 [/home/goofus] >--> w
12:26pm up 139 days, 3:24, 5 users, load average: 2.08, 2.00, 1.72 User tty login@ idle JCPU PCPU what goofus console 8:59am195:20 1 1 /usr/sbin/getty console console goofus pts/0 8:59am 29 -csh goofus pts/1 8:59am 75:27 /bin/csh goofus ttyp1 9:32am671:30 77:15 77:15 /applications/Kludge-soft/SuchADisaster/bin/Such goofus ttyp2 12:26pm w |
goofus 1753 1678 0 Jun 22 ? 0:03 /usr/dt/bin/dtsession goofus 1796 1753 0 Jun 22 ? 0:00 /usr/dt/bin/dtterm -session dta07960 goofus 1795 1753 0 Jun 22 ? 0:02 /usr/dt/bin/dtterm -session dta07959 -C -ls -name Console -t goofus 1785 1 0 Jun 22 ? 0:00 /usr/dt/bin/ttsession -s goofus 2372 1 0 Jun 24 ? 0:00 /usr/bin/X11/hpterm -sb -sl 500 -iconic -title >SuchADisaste goofus 2414 2373 1 Jun 24 ? 0:00 |
UID PID PPID other stuff... COMMAND ------------------------------------------------------- goofus 2372 1 0 Jun 24 ? 0:00 /usr/bin/X11/hpterm -sb -sl 500 -iconic -title >SuchADisaste goofus 2414 2373 1 Jun 24 ? 0:00 |
note:
PID = Process ID
PPID = Parent Process ID
UID = User ID
|