Blog Entry

preycor's picture
blog
Reads:

3095

Score:
5
5
1
 
Comments:

2

Open Call: ndsd & ndsrepair errorlevels

Author Info

15 July 2011 - 1:34am
Submitted by: preycor

(View Disclaimer)

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
dead
fs1:~ # echo $?
1

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.


Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

MHGlenn's picture

NDS Monitoring

Submitted by MHGlenn on 16 July 2011 - 10:35am.

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?

Thanks.

preycor's picture

FYI

Submitted by preycor on 19 July 2011 - 5:08am.

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.

© 2013 Novell