restart a daemon from inetd or rc.tcpip if it gets shutdown.

I know inittab has respwan, but not sure is the AIX's SRC is ready to do this jobs.. Let's see an example:

Las week nfs subsystem got down so all other servers with filesystems mounted get freeze.

How can I monitor NFS subsystem on the server side if it gets shutdown.. like monit does for linux daemons? Please, I'd like to monitor all daemons, not only NFS.

Who is Participating?

as you might have imagined, I tested startsrc wth respawn ... and it works!

The only drawback is that you should not use "startsrc -g nfs" because inittab will always try to start the two daemons for NFS4 resp. GSS which will terminate immediately if there is no NFS4 or GSS, which in turn will lead to errpt filling up with their error messages.

So either user "startsrc -s ..." with respawn for every single startable subsystem or take the two daemons out of the nfs group if you don't need them.

Nonetheless: RSCT is useful too, I keep telling you.


Hi again,

as long as it's not inetd itself which would die there is no need to restart its subservers. inetd will start them as soon as an request to the respective port arrives.

Quite other things are the servers started by /etc/rc.tcpip. You're right, the SRC can't monitor and/or restart any services.

Unfortunately, there is (almost, see below) no such feature built into AIX, except for respawn in inittab - but that's what you know already.

You will have to go with something like nagios, or you could use homemade scripts to monitor your daemons --- or you could try the good old wsm.

wsm is in sysmgt.websm.rte, a fileset which you have most probably already installed. You need X11.rte on AIX and an Xserver at your workstation (Xming, Exceed or the like) to run it.

Log in to the concerned AIX server, export your DISPLAY, and issue "wsm".

Choose "Monitoring" then "Conditions" and "Responses".  There are predefined ones, but you can create your own.

It's all not that straightforward and a bit old-fashioned, but have a look!


sminfoAuthor Commented:

I see nfs is a group that can be start/stop using startsrc/stopsrc -g nfs, but it includes some other daemons:

u: /home/u # lssrc -g nfs
Subsystem         Group            PID          Status
 biod             nfs                           inoperative
 nfsd             nfs                           inoperative
 rpc.mountd       nfs                           inoperative
 nfsrgyd          nfs                           inoperative
 gssd             nfs                           inoperative
 rpc.lockd        nfs                           inoperative
 rpc.statd        nfs                           inoperative

Now, nfs starts on inittab:
rcnfs:23456789:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons

Is possible to make a self-fix to get NFS always running?
All the above daemons are necessary to get NFS working?
Can I start nfsd daemon alone on inittab with respawn?

We've a big problem in production because of the remote NFS daemon server gets down, because it runs en ls in some scripts somewhere and get freezed. That's what I want to avoid to happen again.

I've work with monit before and it works perfectly, but I don't want to involved this open source codes and compilationm in our AIX servers.

Don''t know if you understand my point.


Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Yes, I understand (I believe).

For an NFS server to work you'll need everything in the "nfs" group except for "nfsrgyd" (unless you use NFS4) and "gssd" (unless you use GSS security).

You can't use "respawn" for /etc/rc.nfs, because this script will start everything in the background, then disconnect and terminate, so it will be respawned immediately on and on, which is nonsense.
I never tried it, but I suspect that you can't use "startsrc" with respawn either.

Remain the individual processes. I think it should be possible to have them all respawned by inittab.
This would (e.g. for nfsd) look like this:
nfsd:2:respawn:/usr/sbin/nfsd 3891

Check with "ps" which options/parameters your processes are using now, and use the same ones in inittab.

But why not wsm/RSCT? If you don't like graphical interfaces (I mostly hate them) you could try "mkcondition",  "mkresponse" and "mkcondresp" to define things and "startcondresp"/"stopcondresp" to start/stop monitoring. There are manpages for all of the above, and RSCT is present in AIX by default. Why not give it a try?


It's me again.

The above inittab thing will help against someone terminating nfs with "stopsrc".
To protect nfsd against someone who would "kill" nfsd you could tell SRC to restart it. I fear this has not been quite obvious in my first post - I wasn't talking about "kill" there, only about "stopsrc".

To make SRC restart a killed nfsd simply issue

chssys -s nfsd -R


sminfoAuthor Commented:
I'm back..
I was looking for some checklist for AIX's servers because we have some auditors coming  on December...

Let me some minutes to read again and make some tests..

thanks wmp..
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.