Networker

Re: [Networker] Error code -1 and 255?

2010-05-27 13:57:22
Subject: Re: [Networker] Error code -1 and 255?
From: Tim Mooney <Tim.Mooney AT NDSU DOT EDU>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Thu, 27 May 2010 12:49:38 -0500
In regard to: [Networker] Error code -1 and 255?, George Sinclair said (at...:

40473:savegrp: command ' save -s prmry_bkupsrvr -g group1 -LL -f - -m
client1 -l full -q -W 78 -N /var/lib/dirsrv /var/lib/dirsrv' for client
client1 exited with return code -1.

The traditional Bourne shell has a limited range of values for exit
codes (0-255, and typically you should stick with the low-order bits
because the high bit means "exited with signal").  Because of the limited
range, there's "wrap around", meaning that -1 looks exactly the same as
255, -2 looks the same as 254, etc.

Looking at the man page for 'savefs', it mentions 255 as an abnormal
exit, and 0 as a normal exit.

That just means that the program exited with a -1 return value, which
appears to the shell as 255 because of wrap-around.

Apparently, not all NetWorker commands
return just 0 or 1 as I would have thought. I don't know if 'savefs'
gets used when running 'savegrp'?

It depends on the client, but it would be pretty common that it was run,
yes.

Regardless, it doesn't answer the
question about the '-1' error code. I can't find anything useful in the NW documentation on these codes other than the error message itself for which the documentation is essentially useless - i.e., there was an error, the group failed, and that's about it! I would have to look at the man page for every possible NW command to see all the possible error codes.

At least they're (partially) documented.   It might be nice to have them
in one central document also, but for me it's more important to have the exit
values documented in the page for the particular command I'm looking at.

Tim
--
Tim Mooney                                             Tim.Mooney AT ndsu DOT 
edu
Enterprise Computing & Infrastructure                  701-231-1076 (Voice)
Room 242-J6, IACC Building                             701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

To sign off this list, send email to listserv AT listserv.temple DOT edu and type 
"signoff networker" in the body of the email. Please write to networker-request 
AT listserv.temple DOT edu if you have any problems with this list. You can access the 
archives at http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

<Prev in Thread] Current Thread [Next in Thread>