How does ndsmanage determine the ACTIVE or INACTIVE status of an eDirectory instance?

  • 7002687
  • 18-Feb-2009
  • 27-Apr-2012

Environment

Novell eDirectory 8.8.x for Solaris
Novell eDirectory 8.8.x for AIX
Novell eDirectory 8.8.x for HP-UX
Novell eDirectory 8.8.x for Linux
Novell Open Enterprise Server (Linux based)

Situation

 ndsmanage is showing ndsd as inactive while ndsstat shows as active

Resolution

Here is how ndsmanage determines ACTIVE / INACTIVE status.

  1. The $PIDDIR variable in the ndsmanage script is set by checking the nds.conf file's 'vardir' directive.  If there are multiple declarations of this variable in the nds.conf the instance will show as INACTIVE even when it is active.  Remove the duplicate entry from nds.conf if this happens.
  2. It looks for the ndsd.pid file found in the instance's 'var' directory. This directory is specified with n4u.server.vardir in the nds.conf file (For example n4u.server.vardir=/var/opt/novell/eDirectory/data) and can also be retrieved via `ndsconfig get | grep vardir`.  There should only be one value in this file or the command output.
  3. It then reads the file for the pid (1234 for example). It does a call =`ps -p 1234 | grep -c ndsd` and sees if ndsd is using that pid. If ndsd currently running with pid 1234, it is it reports back ACTIVE.
  4. If the ndsd.pid file is not there or if ndsd is using a different pid than specified in the ndsd.pid file, ndsmanage reports the instance as INACTIVE.
  5. The ndsd script is responsible for updating the ndsd.pid file with the current pid ndsd is using when ndsd starts and stops.

Here is the section in the ndsmanage script.

________________________________________________

if [ -f "$PIDDIR/ndsd.pid"]
then
ndsd_pid=`cat $PIDDIR/ndsd.pid`

if [ -z "$ndsd_pid"]
then
activity=0
else
activity=`ps -p $ndsd_pid | grep -c ndsd`
fi
else
activity=0
fi

if [ "$activity" -gt 0 ]
then
status=`gettext nds "ACTIVE"`
echo "[$instNum] $confFile : $tl_server_FDN : $interface : $status"
else
status=`gettext nds "INACTIVE"`
echo "[$instNum] $confFile : $tl_server_FDN : $interface : $status"
fi

________________________________________________

Additional Information

ndsstat on the other hand, is a binary file and looks directly to see if edirectory is running or not.

Feedback service temporarily unavailable. For content questions or problems, please contact Support.