GIDForums  

Go Back   GIDForums > Computer Forums > Computer Software Forum - Linux
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 21-May-2003, 10:23
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough

[Linux] Finding a runaway or locked program


Right now I have 2 runaway or locked processes on the web server...

Here's what I did:

SSH in to my webserver (linux), type:
Code:
ps -A

Now, how do I know which one is the runaway process? Is it anything with more than 00:00:00 in the line?
  #2  
Old 21-Jan-2004, 11:55
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light
First of all, make sure that you are root. You most likely can't kill the process unless you are root.

Next, the command should be:
ps -xa

This should list *all* of the pids as well as the status for each.

You may want to do a man of ps as it will give you a list of the state codes.
D: uninterruptible sleep
R: runnable
S: sleeping
T: traced or stopped
Z: zombie (defunct) process.

Telling which one you want to kill is a bit more tricky. Some processes take alot of cycles and are supposed to. Things like kswapd and bdflush, as well as kdm take alot of cycles. Also, killing a parent will take down all of the child processes as well, so use it with caution.

Hope this helps...
  #3  
Old 21-Jan-2004, 16:00
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Quote:
Originally Posted by dsmith
First of all, make sure that you are root. You most likely can't kill the process unless you are root.

Oh Yeah... found that out just as soon as I finished posting this and actually trying it...

Thanks for the confirmation / correction though.
 
 

Recent GIDBlogToyota - 2009 May Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Linux] How to run a program under another username Allowee Computer Software Forum - Linux 4 23-Jan-2004 09:09

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:23.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.