4

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
            SLOT NAME     STATE    TID PRI   RQ CPUID  CL  WCHAN

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)> 
(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
6100-08-03-1339
22:root@SERVER:/root # uname
AIX

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
   9364552    

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

1

2 Answers 2

2

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
-1
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>
1
  • I would have thought this also displays any command with a Z in the name. Doesn't it on AIX?
    – Anthon
    Mar 23, 2016 at 5:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .