[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

'defunct' sshd process after setting up daemontools



I've set up daemontools to monitor certain processes and start them
automatically on boot. This works fine for a web server (AOLserver) and
database (PostgreSQL), but I've found something odd with sshd.

Since setting daemontools to monitor sshd, I've noticed that an sshd process
runs, using memory but about 0.1% CPU and marked as '<defunct>'. Sometimes
is goes away briefly but is quickly replaced by another sshd process doing
the same thing under a different process number. This happens even if no
users are logged into the box via ssh.

A representative line from top is below, split into two lines for email
transmission:

PID  USER    PRI    NI    SIZE    RSS    SHARE
4390 root      14      0             0        0               0

STAT    %CPU    %MEM   TIME   COMMAND
       Z         0.1         0.0       0:00     sshd <defunct>

To set daemontools to handle sshd, I put created a directory 'sshd_up' in
/usr/local/sbin, and put a file called 'run' in that directory. The contents
of 'run' are:
----------
#!/bin/sh

exec sshd
----------

The permissions for the 'run' script are: -rwx------

I then created a symlink to get daemontools to monitor sshd by doing:
ln -s /usr/local/sbin/sshd_up /service

(The /service directory is used by daemontools to list monitored services
with links to the relevant scripts.)

Any ideas on this '<defunct>' sshd process issue?

Thanks in advance,

Dave De Graff




Reply to: