more empty graphs.

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

Moderators: Developers, Moderators

Post Reply
beasty_tech
Posts: 8
Joined: Wed Dec 15, 2004 11:36 pm

more empty graphs.

Post by beasty_tech »

Hi there,

Not sure what is going on with my Linux box, but for one I am running SME Server (E-smith 6.0) and It has oldish versions of PHP, etc... Not sure if they could be causing blank graphs?

I have patched up my cacti and am still getting blank graphs.

When I run: php -q poller.php

I get a list of about 20 OK's which looks right.

Any ideas?
beasty_tech
Posts: 8
Joined: Wed Dec 15, 2004 11:36 pm

Post by beasty_tech »

I turned on DEBUG mode and ran php -q poller.php and this was the result.

[root@linbox html]# php -q poller.php
12/16/2004 02:40:44 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /home/e-smith/files/ibays/cacti/html/cmd.php 0 1]
Waiting on 1/1 pollers.
12/16/2004 02:40:45 PM - POLLER: Poller[0] Parsed MULTI output field '1min:0.00' [map 1min->load_1min]
12/16/2004 02:40:45 PM - POLLER: Poller[0] Parsed MULTI output field '5min:0.03' [map 5min->load_5min]
12/16/2004 02:40:45 PM - POLLER: Poller[0] Parsed MULTI output field '10min:0.00' [map 10min->load_15min]
12/16/2004 02:40:45 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /home/e-smith/files/ibays/cacti/html/rra/localhost_load_1min_5.rrd --template load_1min:load_5min:load_15min 1103172044:0.00:0.03:0.00
12/16/2004 02:40:45 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /home/e-smith/files/ibays/cacti/html/rra/localhost_mem_swap_4.rrd --template mem_swap 1103172044:265064
12/16/2004 02:40:45 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /home/e-smith/files/ibays/cacti/html/rra/localhost_mem_buffers_3.rrd --template mem_buffers 1103172044:353600
12/16/2004 02:40:45 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /home/e-smith/files/ibays/cacti/html/rra/localhost_users_6.rrd --template users 1103172044:1
12/16/2004 02:40:45 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /home/e-smith/files/ibays/cacti/html/rra/localhost_proc_7.rrd --template proc 1103172044:119
12/16/2004 02:40:45 PM - SYSTEM STATS: Time: 1.0453 s, Method: cmd.php, Processes: 1, Threads: N/A, Hosts: 2, Hosts/Process: 2
OK u:0.00 s:0.01 r:1.01
OK u:0.00 s:0.01 r:1.01
OK u:0.00 s:0.01 r:1.01
OK u:0.00 s:0.01 r:1.01
OK u:0.00 s:0.01 r:1.01

Cheers
beasty_tech
Posts: 8
Joined: Wed Dec 15, 2004 11:36 pm

Post by beasty_tech »

On DEBUG mode, cmd.php brings up these lines.

[root@linbox html]# php -q cmd.php
#!/usr/bin/php -q
12/16/2004 02:45:18 PM - CMDPHP: Poller[0] WARNING: PHP version 4.3 or above is recommended for performance considerations.
12/16/2004 02:45:18 PM - CMDPHP: Poller[0] Host[1] SNMP: Device does not require SNMP
12/16/2004 02:45:18 PM - CMDPHP: Poller[0] Host[1] No host availability check possible for '127.0.0.1'.
12/16/2004 02:45:18 PM - CMDPHP: Poller[0] Host[1] CMD: perl /home/e-smith/files/ibays/cacti/html/scripts/linux_memory.pl MemFree:, output: 357188
12/16/2004 02:45:18 PM - CMDPHP: Poller[0] Host[1] CMD: perl /home/e-smith/files/ibays/cacti/html/scripts/linux_memory.pl SwapFree:, output: 265064
12/16/2004 02:45:18 PM - CMDPHP: Poller[0] Host[1] CMD: perl /home/e-smith/files/ibays/cacti/html/scripts/loadavg_multi.pl, output: 1min:0.00 5min:0.00 10min:0.00
12/16/2004 02:45:18 PM - CMDPHP: Poller[0] Host[1] CMD: perl /home/e-smith/files/ibays/cacti/html/scripts/unix_users.pl, output: 1
12/16/2004 02:45:18 PM - CMDPHP: Poller[0] Host[1] CMD: perl /home/e-smith/files/ibays/cacti/html/scripts/unix_processes.pl, output: 116
12/16/2004 02:45:18 PM - CMDPHP: Poller[0] Time: 0.1413 s, Theads: N/A, Hosts: 1
[root@linbox html]#

Cheers
beasty_tech
Posts: 8
Joined: Wed Dec 15, 2004 11:36 pm

Post by beasty_tech »

I have since done some more playing and testing and I have managed to get the first Poll to work and update the rrd files. After the first Poll it stops graphing. I have put in the patch to stop the gaps in the graphs but it still seems to be doing so. Any ideas?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Verify that you only have 1 cron defined for Cacti.

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?
beasty_tech
Posts: 8
Joined: Wed Dec 15, 2004 11:36 pm

Post by beasty_tech »

I've been hearing and reading lots about this cron business. Not quite sure what it means though, i was looking for duplicate cron entried but have no idea where to look. Can you help?

EDIT: I have just realised that I can update my RRD files manually by running the poller.php and cmd.php from console. If i do not run these files manually, they are not executed automatically. Any ideas why? This seems to be my only problem. ??????????????
beasty_tech
Posts: 8
Joined: Wed Dec 15, 2004 11:36 pm

Post by beasty_tech »

Basically, I don't have any crontab entries so it's not polling automatically. Where are the crontab entries created by deafault?
I'm on SME Server does this make a difference?

Please help.
zanaguara
Cacti User
Posts: 60
Joined: Tue Nov 16, 2004 10:33 am
Location: Spain

crontab

Post by zanaguara »

With the crontab command.

If you type "crontab -e" you can edit your crontab file. You will use the editor specified by the VISUAL or EDITOR environment variables. Normally it is "vi". So:

- "crontab -e"
- edit like in "vi"
- "wq!" to save the file
- "crontab -l" to display crontab file content
beasty_tech
Posts: 8
Joined: Wed Dec 15, 2004 11:36 pm

Post by beasty_tech »

I'm not exactly sure what to put in the contrab, that is my problem.
Also, where do I place the contrab lines? What is the default path upon installation?
Can you help?
zanaguara
Cacti User
Posts: 60
Joined: Tue Nov 16, 2004 10:33 am
Location: Spain

Post by zanaguara »

In Linux, according to the documentation, you must write:

Code: Select all

*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1
being "cactiuser" your user. Check that you have "poller.php" in the same location.

After that, you can have a look at /var/log/cron, to see if there are any errors.

Regards,

zanaguara
beasty_tech
Posts: 8
Joined: Wed Dec 15, 2004 11:36 pm

Post by beasty_tech »

Damn, you just beat me too it, was coming to say "I got it working". Yeah i saw similar posts of yours in a different forum and used that line (slightly modified) and now it's updating automatically.

Thanks for all your help!
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests