[Nagiosplug-help] check_disk path truncation issue
Mike Lindsey
mike+nagiosplug at bettyscout.org
Fri Jan 4 23:32:42 CET 2008
I have a problem with check_disk v1973
The path to an nfs mount is being truncated if I check it with -A, causing
the stat() to fail. If I check it explicitly with -p, it works, but still
truncates the output of the pathname.
Here's the df output, followed by the bad output with truss, followed by
the explicit check output:
$ df
Filesystem 1K-blocks Used Avail
Capacity Mounted on
/dev/amrd0s1a 2026030 34726 1829222
2% /
devfs 1 1 0
100% /dev
/dev/amrd0s1d 10154158 1603410 7738416
17% /usr
/dev/amrd0s1e 2026030 37368 1826580
2% /var
/dev/amrd0s1f 254135460 58845814 174958810
25% /data
procfs 4 4 0
100% /proc
xxxx.xxxx.xxxx:/home/mga/phlog 414797610 174350584 207263218
46% /data/home/mga/phlog
$ truss /usr/local/nagios/libexec/check_disk -w 20 -c 10 -A
mmap(0x0,3600,(0x3)PROT_READ|PROT_WRITE,(0x1000)MAP_ANON,-1,0x0) =
-2012745728 (0x8807f000)
munmap(0x8807f000,0xe10) = 0 (0x0)
__sysctl(0xbfbfe938,0x2,0x8807bb18,0xbfbfe934,0x0,0x0) = 0 (0x0)
mmap(0x0,32768,(0x3)PROT_READ|PROT_WRITE,(0x1002)MAP_ANON|MAP_PRIVATE,-1,0x0)
= -2012745728 (0x8807f000)
issetugid() = 0 (0x0)
open("/etc/libmap.conf",0x0,0666) = 3 (0x3)
fstat(3,0xbfbfe050) = 0 (0x0)
read(0x3,0x88084000,0x1000) = 62 (0x3e)
read(0x3,0x88084000,0x1000) = 0 (0x0)
close(3) = 0 (0x0)
open("/var/run/ld-elf.so.hints",0x0,00) = 3 (0x3)
read(0x3,0xbfbfe900,0x80) = 128 (0x80)
lseek(3,0x80,SEEK_SET) = 128 (0x80)
read(0x3,0x88086000,0x58) = 88 (0x58)
close(3) = 0 (0x0)
mmap(0x0,36864,(0x3)PROT_READ|PROT_WRITE,(0x1002)MAP_ANON|MAP_PRIVATE,-1,0x0)
= -2012712960 (0x88087000)
access("/lib/libc.so.4",0) ERR#2 'No such file or
directory'
access("/usr/lib/libc.so.4",0) ERR#2 'No such file or
directory'
access("/usr/lib/compat/libc.so.4",0) = 0 (0x0)
open("/usr/lib/compat/libc.so.4",0x0,00) = 3 (0x3)
fstat(3,0xbfbfe940) = 0 (0x0)
read(0x3,0x8807aa60,0x1000) = 4096 (0x1000)
mmap(0x0,622592,(0x5)PROT_READ|PROT_EXEC,(0x20002)MAP_NOCORE|MAP_PRIVATE,3,0x0)
= -2012676096 (0x88090000)
mprotect(0x88110000,4096,(0x7)PROT_READ|PROT_WRITE|PROT_EXEC) = 0 (0x0)
mprotect(0x88110000,4096,(0x5)PROT_READ|PROT_EXEC) = 0 (0x0)
mmap(0x88111000,20480,(0x3)PROT_READ|PROT_WRITE,(0x12)MAP_FIXED|MAP_PRIVATE,3,0x80000)
= -2012147712 (0x88111000)
mmap(0x88116000,73728,(0x3)PROT_READ|PROT_WRITE,(0x1012)MAP_ANON|MAP_FIXED|MAP_PRIVATE,-1,0x0)
= -2012127232 (0x88116000)
close(3) = 0 (0x0)
sysarch(0xa,0xbfbfe9b0) = 0 (0x0)
mmap(0x0,720,(0x3)PROT_READ|PROT_WRITE,(0x1000)MAP_ANON,-1,0x0) =
-2012053504 (0x88128000)
munmap(0x88128000,0x2d0) = 0 (0x0)
mmap(0x0,13272,(0x3)PROT_READ|PROT_WRITE,(0x1000)MAP_ANON,-1,0x0) =
-2012053504 (0x88128000)
munmap(0x88128000,0x33d8) = 0 (0x0)
sigprocmask(0x1,0x8807a9a0,0xbfbfe980) = 0 (0x0)
sigprocmask(0x3,0x8807a9b0,0x0) = 0 (0x0)
readlink("/etc/malloc.conf",0xbfbfe950,63) ERR#2 'No such file or
directory'
mmap(0x0,4096,(0x3)PROT_READ|PROT_WRITE,(0x1002)MAP_ANON|MAP_PRIVATE,-1,0x0)
= -2012053504 (0x88128000)
break(0x805e000) = 0 (0x0)
break(0x805f000) = 0 (0x0)
break(0x8060000) = 0 (0x0)
old.getfsstat(0x0,0x0,0x2) = 9 (0x9)
break(0x8061000) = 0 (0x0)
old.getfsstat(0x8060000,0xa00,0x2) = 9 (0x9)
break(0x8062000) = 0 (0x0)
break(0x8063000) = 0 (0x0)
break(0x8064000) = 0 (0x0)
stat("/",0x805f000) = 0 (0x0)
old.statfs(0x805e080,0xbfbfe8e0) = 0 (0x0)
stat("/dev",0x805f000) = 0 (0x0)
old.statfs(0x805e0a0,0xbfbfe8e0) = 0 (0x0)
stat("/usr",0x805f000) = 0 (0x0)
old.statfs(0x805e0c0,0xbfbfe8e0) = 0 (0x0)
stat("/var",0x805f000) = 0 (0x0)
old.statfs(0x805e0e0,0xbfbfe8e0) = 0 (0x0)
stat("/data",0x805f000) = 0 (0x0)
old.statfs(0x805e100,0xbfbfe8e0) = 0 (0x0)
break(0x8065000) = 0 (0x0)
stat("/proc",0x805f000) = 0 (0x0)
old.statfs(0x805e120,0xbfbfe8e0) = 0 (0x0)
stat("/net",0x805f000) = 0 (0x0)
old.statfs(0x805e130,0xbfbfe8e0) = 0 (0x0)
stat("/host",0x805f000) = 0 (0x0)
old.statfs(0x805e140,0xbfbfe8e0) = 0 (0x0)
stat("/data/home/mga/p",0x805f000) ERR#2 'No such file or
directory'
fstat(1,0xbfbfe650) = 0 (0x0)
break(0x8066000) = 0 (0x0)
ioctl(1,TIOCGETA,0xbfbfe684) = 0 (0x0)
DISK CRITICAL - /data/home/mga/p is not accessible: No such file or
directory
write(1,0x8065000,78) = 78 (0x4e)
exit(0x2)
process exit, rval = 512
$ truss /usr/local/nagios/libexec/check_disk -w 20 -c 10 -p /data/home/mga/phlog
mmap(0x0,3600,(0x3)PROT_READ|PROT_WRITE,(0x1000)MAP_ANON,-1,0x0) =
-2012745728 (0x8807f000)
munmap(0x8807f000,0xe10) = 0 (0x0)
__sysctl(0xbfbfe928,0x2,0x8807bb18,0xbfbfe924,0x0,0x0) = 0 (0x0)
mmap(0x0,32768,(0x3)PROT_READ|PROT_WRITE,(0x1002)MAP_ANON|MAP_PRIVATE,-1,0x0)
= -2012745728 (0x8807f000)
issetugid() = 0 (0x0)
open("/etc/libmap.conf",0x0,0666) = 3 (0x3)
fstat(3,0xbfbfe040) = 0 (0x0)
read(0x3,0x88084000,0x1000) = 62 (0x3e)
read(0x3,0x88084000,0x1000) = 0 (0x0)
close(3) = 0 (0x0)
open("/var/run/ld-elf.so.hints",0x0,00) = 3 (0x3)
read(0x3,0xbfbfe8f0,0x80) = 128 (0x80)
lseek(3,0x80,SEEK_SET) = 128 (0x80)
read(0x3,0x88086000,0x58) = 88 (0x58)
close(3) = 0 (0x0)
mmap(0x0,36864,(0x3)PROT_READ|PROT_WRITE,(0x1002)MAP_ANON|MAP_PRIVATE,-1,0x0)
= -2012712960 (0x88087000)
access("/lib/libc.so.4",0) ERR#2 'No such file or
directory'
access("/usr/lib/libc.so.4",0) ERR#2 'No such file or
directory'
access("/usr/lib/compat/libc.so.4",0) = 0 (0x0)
open("/usr/lib/compat/libc.so.4",0x0,00) = 3 (0x3)
fstat(3,0xbfbfe930) = 0 (0x0)
read(0x3,0x8807aa60,0x1000) = 4096 (0x1000)
mmap(0x0,622592,(0x5)PROT_READ|PROT_EXEC,(0x20002)MAP_NOCORE|MAP_PRIVATE,3,0x0)
= -2012676096 (0x88090000)
mprotect(0x88110000,4096,(0x7)PROT_READ|PROT_WRITE|PROT_EXEC) = 0 (0x0)
mprotect(0x88110000,4096,(0x5)PROT_READ|PROT_EXEC) = 0 (0x0)
mmap(0x88111000,20480,(0x3)PROT_READ|PROT_WRITE,(0x12)MAP_FIXED|MAP_PRIVATE,3,0x80000)
= -2012147712 (0x88111000)
mmap(0x88116000,73728,(0x3)PROT_READ|PROT_WRITE,(0x1012)MAP_ANON|MAP_FIXED|MAP_PRIVATE,-1,0x0)
= -2012127232 (0x88116000)
close(3) = 0 (0x0)
sysarch(0xa,0xbfbfe9a0) = 0 (0x0)
mmap(0x0,720,(0x3)PROT_READ|PROT_WRITE,(0x1000)MAP_ANON,-1,0x0) =
-2012053504 (0x88128000)
munmap(0x88128000,0x2d0) = 0 (0x0)
mmap(0x0,13272,(0x3)PROT_READ|PROT_WRITE,(0x1000)MAP_ANON,-1,0x0) =
-2012053504
munmap(0x88128000,0x33d8) = 0 (0x0)
sigprocmask(0x1,0x8807a9a0,0xbfbfe970) = 0 (0x0)
sigprocmask(0x3,0x8807a9b0,0x0) = 0 (0x0)
readlink("/etc/malloc.conf",0xbfbfe930,63) ERR#2 'No such file or
directory'
mmap(0x0,4096,(0x3)PROT_READ|PROT_WRITE,(0x1002)MAP_ANON|MAP_PRIVATE,-1,0x0)
= -2012053504 (0x88128000)
break(0x805e000) = 0 (0x0)
break(0x805f000) = 0 (0x0)
break(0x8060000) = 0 (0x0)
old.getfsstat(0x0,0x0,0x2) = 9 (0x9)
break(0x8061000) = 0 (0x0)
old.getfsstat(0x8060000,0xa00,0x2) = 9 (0x9)
break(0x8062000) = 0 (0x0)
stat("/data/home/mga/phlog",0x805f000) = 0 (0x0)
stat("/data/home/mga/phlog",0x805f000) = 0 (0x0)
old.statfs(0x805d1e0,0xbfbfe8c0) ERR#2 'No such file or
directory'
fstat(1,0xbfbfe650) = 0 (0x0)
break(0x8063000) = 0 (0x0)
ioctl(1,TIOCGETA,0xbfbfe684) = 0 (0x0)
DISK OK - free space: /data/home/mga/p 2098861531865 MB (0% inode=99%);|
/data/home/mga/p=-2147483648MB;-2147483648;-2147483648;0;-2147483648
write(1,0x8062000,142) = 142 (0x8e)
exit(0x0)
process exit, rval = 0
--
Mike Lindsey
More information about the Help
mailing list