Re-posting this here from 'nagios-users'. This thread regarding Nagios
taking several minutes after starting the daemon before it starts
polling any services/hosts, during which time there is no CPU load from
the process.
FYI, in the time it's taking to wait for nagios to start polling
anything after starting it up I decided to look at what it's doing...
This would explain why it starts up and sits around not consuming any
cycles but not polling. Sleep left in the code? These entries in the
log each come afer a few minutes (119 and 175 seconds apart) each..
This is running on 2.0b6, x86_64 arch, compiled from source with perlcache.
/eli
###FILE: nagios.log:
[1134076786] Finished daemonizing... (New PID=11914)
[1134076905] service_result_worker_thread(): poll(): EINTR (impossible)
[1134077080] service_result_worker_thread(): poll(): EINTR (impossible)
### GDB info:
Attaching to program: /usr/local/nagios/bin/nagios, process 11914
Reading symbols from
/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE/libperl.so...(no
debugging symbols found)...done.
Loaded symbols for
/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE/libperl.so
Reading symbols from /lib64/libnsl.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libnsl.so.1
Reading symbols from /lib64/libdl.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/tls/libm.so.6...(no debugging symbols
found)...done.
Loaded symbols for /lib64/tls/libm.so.6
Reading symbols from /lib64/libcrypt.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libcrypt.so.1
Reading symbols from /lib64/libutil.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libutil.so.1
Reading symbols from /lib64/tls/libpthread.so.0...
(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
[New Thread 182894164416 (LWP 11914)]
[New Thread 1094719840 (LWP 11917)]
[New Thread 1084229984 (LWP 11915)]
Loaded symbols for /lib64/tls/libpthread.so.0
Reading symbols from /lib64/tls/libc.so.6...(no debugging symbols
found)...done.
Loaded symbols for /lib64/tls/libc.so.6
Reading symbols from /usr/lib64/libltdl.so.3...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib64/libltdl.so.3
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
0x000000364700b9c5 in __nanosleep_nocancel ()
from /lib64/tls/libpthread.so.0
(gdb) where
#0 0x000000364700b9c5 in __nanosleep_nocancel () from
/lib64/tls/libpthread.so.0
#1 0x00000000004209aa in event_execution_loop ()
#2 0x000000000040efa0 in main ()
(gdb) info registers
rax 0xfffffffffffffdfc -516
rbx 0x861bb0 8788912
rcx 0xffffffffffffffff -1
rdx 0x2 2
rsi 0x0 0
rdi 0x7fbffff450 548682069072
rbp 0x0 0x0
rsp 0x7fbffff410 0x7fbffff410
r8 0x0 0
r9 0x2e8a 11914
r10 0x7fbffff301 548682068737
r11 0x202 514
r12 0x7fbffff450 548682069072
r13 0xffffffff 4294967295
r14 0xffffffff 4294967295
r15 0x7fbffffa08 548682070536
rip 0x364700b9c5 0x364700b9c5
eflags 0x202 514
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
Fred wrote:
> I do the same thing with check_icmp except that I use sudo and create
> a simple sudo entry like (see the CHECK_ICMP):
>
> Cmnd_Alias CHECKALLSSHKEYS = /opt/hptc/nagios/libexec/check_keys #
> HP-HPTC-KeySync
> Cmnd_Alias CHECKSYSLOGALERTS =
> /opt/hptc/nagios/libexec/check_syslogalerts # HP-HPTC-SysLog
> Cmnd_Alias CHECKSFS = /opt/hptc/nagios/libexec/check_sfs # HP-HPTC-SysLog
> Cmnd_Alias CHECKLSF = /opt/hptc/nagios/libexec/check_lsf # HP-HPTC-CheckLSF
> Cmnd_Alias CHECKICMP = /opt/hptc/nagios/libexec/check_icmp #
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]