OpenBSD 3.7+CactiD hangs when running in crontab

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Trupaslu
Posts: 9
Joined: Sat Jun 18, 2005 1:11 pm

OpenBSD 3.7+CactiD hangs when running in crontab

Post by Trupaslu »

Hello,

At the moment i'm trying to get cactid to work. When i run cactid by hand:

Code: Select all

/usr/local/bin/php /data4/www/cacti/poller.php
I get:

Code: Select all

06/18/2005 08:15:27 PM - SYSTEM STATS: Time: 1.0289 s, Method: cactid, Processes: 1, Threads: 1, Hosts: 2, Hosts/Process: 2
Everything is fine and my graphs are getting updated. But if i try to run it in crontab the process hangs:

Code: Select all

root     17170  0.0  1.7  7128  8652 ??  S      8:20PM    0:00.29 /usr/local/bin/php /data4/www/cacti/poller.php
root      3868  0.0  0.1   388   304 ??  Is     8:20PM    0:00.00 /bin/sh -c /bin/sh
root      4773  0.0  0.1   188   672 ??  I      8:20PM    0:00.00 /usr/local/bin/rrdtool -

Hope someone can help me..

greet,

Sam
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

what version?

:roll:
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Trupaslu
Posts: 9
Joined: Sat Jun 18, 2005 1:11 pm

Post by Trupaslu »

I'm using version 0.8.6d
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

0.8.6e will be out very soon. RC23 is out now. It is located in the Announcements forum.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Trupaslu
Posts: 9
Joined: Sat Jun 18, 2005 1:11 pm

Post by Trupaslu »

For some reason it doesn't work.

Code: Select all

configure: error: cannot run /bin/sh config/config.sub
when i run /bin/sh config/config.sub:

Code: Select all

: not foundig.sub[5]:
: not foundig.sub[7]:
: not foundig.sub[26]:
: not foundig.sub[31]:
: not foundig.sub[39]:
: not foundig.sub[47]:
: not foundig.sub[54]:
: not foundig.sub[56]:
: not foundig.sub[69]:
: not foundig.sub[78]:
: not foundig.sub[81]:
config/config.sub[84]: syntax error: `in^M' unexpected
Thanks for your help..

Sam
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

In the RC's you need to run the following sequence of commands in order:

aclocal
auitoheader
autmake
autoconf
./configure
make
make install

Hope that helps.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Trupaslu
Posts: 9
Joined: Sat Jun 18, 2005 1:11 pm

Post by Trupaslu »

Yeah that gives the same error.

OpenBSD is my development server. Like i said earlier with cmd.php it works great!

The production server is a FreeBSD box. Cactid is working fine. What are your experiences with FreeBSD and cactid?

Currently we are running cacti-0.6.* and we are graphing about 7000 devices (seperated trees offcoure) but it is really slow because some trees hold about 600 graphs.

Thanks

Sam
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

In 0.8.6e, we are starting to Cache the tree's. Although, only as long as you set your browsers graphs to expire. The slowness is primarily due to the DHTML tree view stuff. We are looking for additional changes in the next release.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I don't have a clue as to why it's throwing that error.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

I got the same error on my Gentoo Linux machine when trying to run ./configure. I couldn't find the exact cause, but it works fine when building the official cactid package on my dev box.

If you want to confirm this under your environment, feel free to check out this build:

http://web-public.lan.raxnet.net/cactid ... .6e.tar.gz

-Ian
brunom
Posts: 12
Joined: Tue Apr 05, 2005 7:53 pm
Location: Sydney, Australia
Contact:

Solution to "can't run /bin/sh config/config.sub"

Post by brunom »

The solution I found to solve this problem is to run "dos2unix" on all files in the unzipped cactid source ... That seemed to fix the problem :)

/B
Trupaslu wrote:For some reason it doesn't work.

Code: Select all

configure: error: cannot run /bin/sh config/config.sub
when i run /bin/sh config/config.sub:

Code: Select all

: not foundig.sub[5]:
: not foundig.sub[7]:
: not foundig.sub[26]:
: not foundig.sub[31]:
: not foundig.sub[39]:
: not foundig.sub[47]:
: not foundig.sub[54]:
: not foundig.sub[56]:
: not foundig.sub[69]:
: not foundig.sub[78]:
: not foundig.sub[81]:
config/config.sub[84]: syntax error: `in^M' unexpected
Thanks for your help..

Sam
brunom
Posts: 12
Joined: Tue Apr 05, 2005 7:53 pm
Location: Sydney, Australia
Contact:

Having similar hanging processes on RHEL3

Post by brunom »

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?
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please try the release code. There are subtile changes with the handling of MySQL in the final release that were not there in rc23. Your code seems to be hanging around the MySQL calls.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Trupaslu
Posts: 9
Joined: Sat Jun 18, 2005 1:11 pm

Post by Trupaslu »

I'm using cacti-cactid-0.8.6d (Release)

Shall i wait till cacti-cactid-0.8.6e?

greet,

Sam
User avatar
TheWitness
Developer
Posts: 17004
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Should be out today.

Larry
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests