When I run the following commands on AIX:

22:root@SERVER:/root # ps -ef | head -1
     UID      PID     PPID   C    STIME    TTY  TIME CMD
22:root@SERVER:/root # ps -ef | grep defunct | head -1
     foo  9364552  7975688   0                  0:00 <defunct>

I came across this process that was in a state of <defunct>. Bringing up the kernel debugger, kdb, if I poke inside this process' PID:

22:root@SERVER:/root # kdb
WARNING: Version mismatch between unix file and command kdb
       START              END <name>
0000000000001000 0000000004160000 start+000FD8
F00000002FF47600 F00000002FFDF9C8 __ublock+000000
000000002FF22FF4 000000002FF22FF8 environ+000000
000000002FF22FF8 000000002FF22FFC errno+000000
F1000F0A00000000 F1000F0A10000000 pvproc+000000
F1000F0A10000000 F1000F0A18000000 pvthread+000000
read vscsi_scsi_ptrs OK, ptr = 0x0
(0)> tpid -d 9364552

pvthread+05FE00 1534 <zombie> ZOMB  5FE00AD 03C    5         0  

Noting which SLOT it was occupying, looking at the start of this process:

(0)> u 1534 | grep -i start
(0)> where 1534
thread F1000F0A1005FE00 not loaded

(0)> exit

Looking, there isn't any STIME associated with the process.

Here's additional information about my system:

22:root@SERVER:/root # oslevel -s
22:root@SERVER:/root # uname

AS well as additional information about my <defunct> process:

22:root@SERVER:/root # procstack 9364552
procstack: 9364552 is a kernel process
22:root@SERVER:/root # proctree 9364552
7975688    /foo/foobinary

My question: there is no STIME in "ps" command for the defunct processes. Are there any ways to get the start time of them?

  • I'm not familiar with AIX, but maybe lastcomm would tell you what you want. – Gilles Dec 5 '13 at 23:10

ps -fp <pid> would normally give you that information

# ps -fp 6357210 
     UID      PID     PPID   C    STIME    TTY  TIME CMD
    root  6357210        1  35 15:25:31      -  3:03 nfsd
ps -el | grep "Z"

This would display all zombie processes on AIX servers. Second Last column would show how long it's been since it's started:

$  ps -el | grep 'Z'
F S      UID      PID     PPID   C PRI NI ADDR    SZ    WCHAN    TTY  TIME CMD
250005 Z   150921 18284566 21102640   0  60 20                :00 <defunct>
  • I would have thought this also displays any command with a Z in the name. Doesn't it on AIX? – Anthon Mar 23 '16 at 5:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.