the check_nb_queque works its output looks like "OK - Queue is of normal size [0]"<br>
the check_nb_jukebox works too, output looks like "OK - all drives are up."<br>
<br>
but the check_nb_errs still doesn't work error message looks like "CHECK_NRPE: Error receiving data from daemon."<br>
The permission has no problem. I can run this command as nagios on
local machine, and get output like "ERRORS: (59 total) 1.) bptm has
error-level general error: cannot count up drives, device manager
daemon (ltid) may not be running.  2.) bptm has error-level
general error: cannot count up drives, device manager daemon (ltid) may
not be running.  3.) bptm has error-level general error: cannot
count up drives, device manager daemon (ltid) may not be running. 
4.) bptm has error-level general error: cannot count up drives, device
manager daemon (ltid) may not be running.  5.) bptm has
error-level general error: cannot count up drives, device manager
daemon (ltid) may not be running.  6.) bptm has error-level
general error: cannot count up drives, device manager daemon (ltid) may
not be running.  .............................."<br>
<br>
the script for output is <br>
if (defined(@errors)) {<br>
  if ($critcount) { $status = CRITICAL; }<br>
  elsif ($warncount) { $status = WARNING; }<br>
  else { $status = UNKNOWN; }<br>
#  print "NETBACKUP ERRORS: (" . ( $critcount + $warncount ) . " total) ";<br>
  print "ERRORS: (" . ( $critcount + $warncount ) . " total) ";<br>
  my $counta = 0;<br>
  foreach my $errorline (@errors) {<br>
    $counta++;<br>
    print "$counta.) $errorline ";<br>
  }<br>
  print "\n";<br>
} else {<br>
#  print "No Netbackup errors found.\n";<br>
  print "OK: No Netbackup errors found.\n";<br>
}<br>
<br>
I get debug from strace <br>
<br>
munmap(0xb7fff000, 4096)                = 0<br>
write(3, "\27\3\1\0 }\22\302\252\250\7!%\251Xs+\253\361dh \232\266"..., 1114) = 1114<br>
<span style="font-weight: bold;">read(3, "sh: l",
5)                    
= 5</span><br>
write(3, "\25h:\0 \304\374\20\240\370\23wK]s\241\232\300\347W\270"..., 37) = 37<br>
alarm(0)                               
= 10<br>
write(3, "\25h:\0 #\347\366\313\257\32\2714\327D\17\16 \2l\4D/3)"..., 37) = 37<br>
close(3)                               
= 0<br>
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0<br>
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fff000<br>
write(1, "CHECK_NRPE: Error receiving data"..., 46CHECK_NRPE: Error receiving data from daemon.<br>
) = 46<br>
munmap(0xb7fff000, 4096)                = 0<br>
exit_group(3)                          
= ?<br>
<br>
<br>