Hi,
I am having the same hanging processes when running cactid as the poller and invoked through crontab.
Code: Select all
root 2463 0.0 0.1 4280 1040 pts/2 S 17:57 0:00 less cacti.log
cacti 7459 0.0 0.0 2132 900 ? S 18:25 0:00 /bin/bash -c php /var/www/cacti/poller.php > /dev/null 2>&1
cacti 7460 0.3 0.8 15568 8444 ? S 18:25 0:00 php /var/www/cacti/poller.php
cacti 7466 0.0 0.0 2352 652 ? S 18:25 0:00 /usr/local/bin/rrdtool -
My crontab looks like:
Code: Select all
# For Cacti
*/5 * * * * cacti php /var/www/cacti/poller.php > /dev/null 2>&1
I am running Cacti 0.8.6d and cactid rc23 (the latest latest one). When I run cactid from the command line it runs fine. When invoked from crontab, those processes mentionned above show up and I end up getting:
Code: Select all
06/20/2005 06:29:57 PM - POLLER: Poller[0] Maximum runtime of 296 seconds exceeded. Exiting.
I did an strace on the "poller.php" and this is what I see:
Code: Select all
[00a54004] lseek(4, 0, SEEK_CUR) = 0
[00a54004] lseek(4, 0, SEEK_SET) = 0
[00a54239] fcntl64(4, F_GETFL) = 0 (flags O_RDONLY)
[00a534ae] fstat64(4, {st_dev=makedev(3, 2), st_ino=4194818, st_mode=S_IFREG|0644, st_nlink=1, st_uid=501, st_gid=0, st_blksize=4096, st_blocks=88, st_size=41963, st_atime=2005/06/20-18:10:00, st_mtime=2005/04/27-10:47:36, st_ctime=2005/06/20-17:40:30}) = 0
[00a5e3f3] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75e3000
[00a61aa5] _llseek(4, 0, [0], SEEK_CUR) = 0
[00a53e97] close(4) = 0
[00a5e4a1] munmap(0xb75e3000, 4096) = 0
[00a54239] fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
[00a53f0e] read(3, 0xa48fc08, 8192) = -1 EAGAIN (Resource temporarily unavailable)
[00a54239] fcntl64(3, F_SETFL, O_RDWR) = 0
[00a53f8e] write(3, "I\1\0\0\3select\n\t\tpoller_output.outp"..., 333) = 333
[00a53f0e] read(3, "\1\0\0\1", 4) = 4
[00a53f0e] read(3, "\6", 1) = 1
[00a53f0e] read(3, "\37\0\0\2", 4) = 4
[00a53f0e] read(3, "\rpoller_output\6output\3\377\377\0\1\374\3\21\0\0", 31) = 31
[00a53f0e] read(3, "\35\0\0\3", 4) = 4
[00a53f0e] read(3, "\rpoller_output\4time\3\23\0\0\1\f\3\3@\0", 29) = 29
[00a53f0e] read(3, "&\0\0\4", 4) = 4
[00a53f0e] read(3, "\rpoller_output\rlocal_data_id\3\10\0\0"..., 38) = 38
[00a53f0e] read(3, "\37\0\0\5", 4) = 4
[00a53f0e] read(3, "\vpoller_item\10rrd_path\3\377\0\0\1\375\3\1\0\0", 31) = 31
[00a53f0e] read(3, "\37\0\0\6", 4) = 4
[00a53f0e] read(3, "\vpoller_item\10rrd_name\3\23\0\0\1\375\3\3@\0", 31) = 31
[00a53f0e] read(3, "\36\0\0\7", 4) = 4
[00a53f0e] read(3, "\vpoller_item\7rrd_num\3\2\0\0\1\1\3!\0\0", 30) = 30
[00a53f0e] read(3, "\1\0\0\10", 4) = 4
[00a53f0e] read(3, "\376", 1) = 1
[00a53f0e] read(3, "\1\0\0\t", 4) = 4
[00a53f0e] read(3, "\376", 1) = 1
[00a186bd] time(NULL) = 1119255093
[009acf79] rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
[009ace3e] rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
[009acf79] rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
[00a2e8bb] nanosleep({1, 0}, <unfinished ...>
Process 5712 detached
The stuff that caught my eye is the :
Code: Select all
[00a53f0e] read(3, 0xa48fc08, 8192) = -1 EAGAIN (Resource temporarily unavailable)
I am not sure what the problem is ... it's strange ... Maybe when running cactid we need to invoke it from the command line instead the php poller?