A successfully executed command outputs an errorlevel of ‘0’. Any other errorlevel means that it didn’t execute correctly and, if the executable has the code for it, gives you a specific error which means something. The errorlevel can be seen by executing the following command immediately after executing the command you wish to see the errorlevel for:

echo $?

Unfortunately I can’t seem to find any documentation regarding the errorlevel for ndsd and ndsrepair, so I’m hoping to get some input from everyone else out there.

I need the output of either “/etc/init.d/ndsd status” or any “ndsrepair” execution other than a successful one. With that I also need to errorlevel as output by the abovementioned command. The kind of output I’m looking for is something like this:

fs1:~ # /etc/init.d/ndsd status
Failed to obtain a Novell eDirectory Server connection to fs1.OU=Services.O=Corp.CORP_TREE or Novell eDirectory Server is not running
fs1:~ # echo $?

In the above case I had deliberately stopped ndsd. I need examples of a server with eDirectory in a DEFUNCT state or any other state.

Please submit them by sending me a message in the CoolSolutions Communities or commenting on this blog post.

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.

Disclaimer: As with everything else at NetIQ Cool Solutions, this content is definitely not supported by NetIQ, so Customer Support will not be able to help you if it has any adverse effect on your environment.  It just worked for at least one person, and perhaps it will be useful for you too.  Be sure to test in a non-production environment.

Leave a Reply

Leave a Comment

  • MHGlenn says:

    Interesting idea, but to date, Novell has been notorious for a) lack of documentation of return codes, and b) not generating return codes at all.

    Rant aside, have you taken a look at ndssnmp?


    • preycor says:

      I’ve discovered that ‘ndsd status’ only seems to have two return codes – 0 for success and 1 for failure. ‘ndsrepair’, on the other hand, has many. I’ve used the ones I know about in the Nagios monitor scripts which I’ve updated (as referenced in my blog on here).

      With regards to ndssnmp – yes, I’ve tried to use it. It’s a pain to setup and I’ve also seen it become a CPU hog. It provides some stats and traps, but we prefer to use the nagios scripts I developed as they’re more consistantly reliable.

By: preycor
Jul 15, 2011
2:34 am
Active Directory Authentication Automation Cloud Computing Cloud Security Configuration Customizing Data Breach DirXML Drivers End User Management Identity Manager Importing-Exporting / ICE/ LDIF Intelligent Workload Management IT Security Knowledge Depot LDAP Monitoring Open Enterprise Server Passwords Reporting Secure Access Supported Troubleshooting Workflow