• Post Reply Bookmark Topic Watch Topic
  • New Topic

Identfying a hangup / Idle / Crashed Process in Linux  RSS feed

 
ravi D shankar
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys

Can you help me out in Identifying a hangup / idle / crashed process in Linux.

Assuming that I have a continuously running java program, if at any point of time I would like to know whether that process has hungup / idle / crashed .. how do i use linux commands for that purpose.

Please help me out in this.

Thanks
Ravi
 
Tim Holloway
Saloon Keeper
Posts: 18797
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ps command is a good start. It shows the operating state of every process in the system if you ask properly ("ps ax").

A "Z" process status is a zombie, and indicates that the process is dead, but cannot be removed because of a related process that's still alive.

The "top" command can also be used to see what processes are consuming resources. Hung processes would always show 0% cpu, looping processes would show high cpu%.
 
Syedz -X-
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In linux, zombie process will state as Z when you run ps aux command

PROCESS STATE CODES
Here are the different values that the s, stat and state output specifiers (header "STAT" or "S") will display to
describe the state of a process.
D Uninterruptible sleep (usually IO)
are Running or runnable (on run queue)
S Interruptible sleep (waiting for an event to complete)
T Stopped, either by a job control signal or because it is being traced.
W paging (not valid since the 2.6.xx kernel)
X dead (should never be seen)
Z Defunct ("zombie") process, terminated but not reaped by its parent.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!