[Nagiosplug-help] check_nt runs but just reports "(null)"
Kevin O'Donnell
kevino at kevino.net
Thu Nov 28 17:52:02 CET 2002
Hi list!
I've performed the obligatory mailing list search but could not find any
previous reports of my problem. If anyone has seen this type of
behaviour before I would really appreciate any help.
Every time I run check_nt, it just returns "(null)" and exists with code
212. I am using the precompiled version of check_nt from
Distrib-1.06.2.zip on a Debian 3.0 box. I've confirmed that the
NSClient service is running on the destination windows server.
Thanks for your help!
Kevin.
% cd /src/NSClient-1.06.2/LinuxBin
% ./check_nt -H 192.168.20.57
(null)
% echo $?
212
% uname -a
Linux moseley 2.4.19 #3 SMP Mon Nov 25 08:53:44 PST 2002 i686 unknown
The service is running on my windows box.
% telnet 192.168.20.57 1248
Trying 192.168.20.57...
Connected to 192.168.20.57.
Escape character is '^]'.
Hi
ERROR:Wrong password^]
telnet> quit
Connection closed.
On a lark, I compiled check_nt from scract with no change in the
results. I had to change all references to "ssprintf" to "asprintf"
for this to work. This still fails, though the exit code is different
now. (!)
% cd /src/NSClient-1.06.2/UnixSource
% gcc -o check_nt \
-I/src/nagios-plugins-1.3.0-beta2/plugins \
-L/usr/lib \
/src/nagios-plugins-1.3.0-beta2/plugins/netutils.o \
/src/nagios-plugins-1.3.0-beta2/plugins/utils.o \
check_nt.c
% ./check_nt -H 192.168.20.57
(null)
% echo $?
192
And lastly, here is the output from a strace:
% strace ./check_nt -H 192.168.20.57
execve("./check_nt", ["./check_nt", "-H", "192.168.20.57"], [/* 22 vars
*/]) = 0
uname({sys="Linux", node="moseley", ...}) = 0
brk(0) = 0x804df20
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/local/qt/lib/i686/mmx/libnsl.so.1", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/usr/local/qt/lib/i686/mmx", 0xbffff014) = -1 ENOENT (No such
file or directory)
open("/usr/local/qt/lib/i686/libnsl.so.1", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/usr/local/qt/lib/i686", 0xbffff014) = -1 ENOENT (No such file
or directory)
open("/usr/local/qt/lib/mmx/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/usr/local/qt/lib/mmx", 0xbffff014) = -1 ENOENT (No such file or
directory)
open("/usr/local/qt/lib/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/usr/local/qt/lib", 0xbffff014) = -1 ENOENT (No such file or
directory)
open("i686/mmx/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("i686/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("mmx/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=14905, ...}) = 0
old_mmap(NULL, 14905, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3) = 0
open("/lib/libnsl.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 ;\0\000"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=69472, ...}) = 0
old_mmap(NULL, 80988, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40018000
mprotect(0x40029000, 11356, PROT_NONE) = 0
old_mmap(0x40029000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x10000) = 0x40029000
old_mmap(0x4002a000, 7260, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4002a000
close(3) = 0
open("i686/mmx/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("i686/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("mmx/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/libresolv.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\'\0"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=56480, ...}) = 0
old_mmap(NULL, 65312, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002c000
mprotect(0x40039000, 12064, PROT_NONE) = 0
old_mmap(0x40039000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0xd000) = 0x40039000
old_mmap(0x4003a000, 7968, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4003a000
close(3) = 0
open("i686/mmx/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("i686/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("mmx/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\30\222"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1153784, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x4003c000
old_mmap(NULL, 1166560, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4003d000
mprotect(0x40150000, 40160, PROT_NONE) = 0
old_mmap(0x40150000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x113000) = 0x40150000
old_mmap(0x40156000, 15584, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40156000
close(3) = 0
munmap(0x40014000, 14905) = 0
brk(0) = 0x804df20
brk(0x804df40) = 0x804df40
brk(0x804e000) = 0x804e000
rt_sigaction(SIGALRM, {0x804a1a0, [ALRM], SA_RESTART|0x4000000},
{SIG_DFL}, 8) = 0
alarm(10) = 0
alarm(0) = 10
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 8), ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40014000
write(1, "(null)\n", 7) = 7
munmap(0x40014000, 4096) = 0
_exit(-1073743900) = ?
More information about the Help
mailing list