How do I get all information about a defunct process?
For example, I would like to know: who is the parent process, what command was used to run this defunct process, reason why its dead, log...
When I run ps aux | grep defunct
all I get is this:
[admin@a ~]# ps aux | grep defunct
admin 30798 1.3 0.0 0 0 ? Zs 10:03 0:00 [httpd] <defunct>
admin 30799 1.6 0.0 0 0 ? Zs 10:03 0:00 [httpd] <defunct>
admin 30800 1.3 0.0 0 0 ? Zs 10:03 0:00 [httpd] <defunct>
admin 30801 4.0 0.0 0 0 ? Zs 10:03 0:00 [httpd] <defunct>
Note: I'm using Red Hat / Centos OS.
Following is how I caught the command that was run, it contains the information I needed.
Run:
while true; do ps aux | grep httpd; done
Search the output for the defunct PID.
From the output: