Have measures every five seconds

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
mattdu61
Posts: 2
Joined: Wed Apr 06, 2011 3:15 am

Have measures every five seconds

Post by mattdu61 »

Hello!
Firstly, I'm french so my english isn't very good. Please excuse me. :)

I have a project to do:

I must have measurement of network equipment with SNMP. This works, but every minutes. I want to have new values every five seconds and record them in a XML file.

Can you help me? Because I am a little lost right now with all the settings...

Thanks. 8)
Deele
Posts: 37
Joined: Thu Nov 25, 2010 9:15 am
Location: Latvia, Riga

Re: Have measures every five seconds

Post by Deele »

AFAIK Cacti and *nix CRON can handle events with minimum of 1 minute interval.
mattdu61
Posts: 2
Joined: Wed Apr 06, 2011 3:15 am

Re: Have measures every five seconds

Post by mattdu61 »

Well, for Cron I bypassed the problem. Here is what I did:

Code: Select all

crontab -e
Then I wrote this line:

Code: Select all

*/1 * * * * /home/matthieu/poller.sh
My script, poller.sh:

Code: Select all

#!/bin/sh

nohup php /var/www/cacti/poller.php --force > /dev/null 2>&1 &
sleep 5
nohup php /var/www/cacti/poller.php --force > /dev/null 2>&1 &
sleep 5
nohup php /var/www/cacti/poller.php --force > /dev/null 2>&1 &
sleep 5
nohup php /var/www/cacti/poller.php --force > /dev/null 2>&1 &
sleep 5
nohup php /var/www/cacti/poller.php --force > /dev/null 2>&1 &
sleep 5
nohup php /var/www/cacti/poller.php --force > /dev/null 2>&1 &
sleep 5
nohup php /var/www/cacti/poller.php --force > /dev/null 2>&1 &
sleep 5
nohup php /var/www/cacti/poller.php --force > /dev/null 2>&1 &
sleep 5
nohup php /var/www/cacti/poller.php --force > /dev/null 2>&1 &
sleep 5
nohup php /var/www/cacti/poller.php --force > /dev/null 2>&1 &
sleep 5
nohup php /var/www/cacti/poller.php --force > /dev/null 2>&1 &
sleep 5
exec php /var/www/cacti/poller.php --force > /dev/null 2>&1
And this is a part of my log file (/var/www/cacti/log/cacti.log):

Code: Select all

04/06/2011 03:12:25 PM - SYSTEM STATS: Time:0.1059 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:2 RRDsProcessed:0
04/06/2011 03:12:25 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:25 PM - SYSTEM STATS: Time:0.1063 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:2 RRDsProcessed:0
04/06/2011 03:12:25 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:25 PM - SYSTEM STATS: Time:0.1068 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:6 RRDsProcessed:0
04/06/2011 03:12:27 PM - SYSTEM STATS: Time:0.5229 Method:cmd.php Processes:1 Threads:N/A Hosts:5 HostsPerProcess:5 DataSources:6 RRDsProcessed:2
04/06/2011 03:12:30 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:30 PM - SYSTEM STATS: Time:49.1228 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:2 RRDsProcessed:0
04/06/2011 03:12:30 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:30 PM - SYSTEM STATS: Time:0.1049 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:6 RRDsProcessed:0
04/06/2011 03:12:30 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:30 PM - SYSTEM STATS: Time:0.1052 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:45 RRDsProcessed:0
04/06/2011 03:12:30 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:30 PM - SYSTEM STATS: Time:0.1074 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:2 RRDsProcessed:0
04/06/2011 03:12:30 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:30 PM - SYSTEM STATS: Time:0.1166 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:2 RRDsProcessed:0
04/06/2011 03:12:32 PM - SYSTEM STATS: Time:0.5198 Method:cmd.php Processes:1 Threads:N/A Hosts:5 HostsPerProcess:5 DataSources:2 RRDsProcessed:1
04/06/2011 03:12:35 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:35 PM - SYSTEM STATS: Time:49.1240 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:2 RRDsProcessed:0
04/06/2011 03:12:35 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:35 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:35 PM - SYSTEM STATS: Time:0.1064 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:2 RRDsProcessed:0
04/06/2011 03:12:35 PM - SYSTEM STATS: Time:0.1054 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:2 RRDsProcessed:0
04/06/2011 03:12:35 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:35 PM - SYSTEM STATS: Time:0.1075 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:2 RRDsProcessed:0
04/06/2011 03:12:35 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:35 PM - SYSTEM STATS: Time:0.1206 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:6 RRDsProcessed:0
04/06/2011 03:12:37 PM - SYSTEM STATS: Time:0.5224 Method:cmd.php Processes:1 Threads:N/A Hosts:5 HostsPerProcess:5 DataSources:2 RRDsProcessed:1
04/06/2011 03:12:40 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:40 PM - SYSTEM STATS: Time:49.1217 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:45 RRDsProcessed:0
04/06/2011 03:12:40 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:40 PM - SYSTEM STATS: Time:0.1054 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:6 RRDsProcessed:0
04/06/2011 03:12:40 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:40 PM - SYSTEM STATS: Time:0.1057 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:45 RRDsProcessed:0
04/06/2011 03:12:40 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:40 PM - SYSTEM STATS: Time:0.1060 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:2 RRDsProcessed:0
04/06/2011 03:12:40 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:40 PM - SYSTEM STATS: Time:0.1294 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:45 RRDsProcessed:0
04/06/2011 03:12:41 PM - SYSTEM STATS: Time:0.1097 Method:cmd.php Processes:1 Threads:N/A Hosts:5 HostsPerProcess:5 DataSources:45 RRDsProcessed:1
04/06/2011 03:12:42 PM - CMDPHP: Poller[0] WARNING: SNMP GetNext Timeout for Host:'cc00.6cure.net', and OID:'.1.3'
04/06/2011 03:12:45 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:45 PM - SYSTEM STATS: Time:49.1218 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:2 RRDsProcessed:0
04/06/2011 03:12:45 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:45 PM - SYSTEM STATS: Time:0.1052 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:2 RRDsProcessed:0
04/06/2011 03:12:45 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:45 PM - SYSTEM STATS: Time:0.1061 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:6 RRDsProcessed:0
04/06/2011 03:12:45 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
04/06/2011 03:12:45 PM - SYSTEM STATS: Time:0.1098 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources:2 RRDsProcessed:0
Poller runs every five seconds(approximatively), but I can't see those measures on my XML files. ( I create them with rrdtool dump...)

Does anyone have an idea?
Thanks.
User avatar
Alice
Cacti User
Posts: 111
Joined: Tue Oct 28, 2003 4:54 pm
Location: Bucharest, RO.

Re: Have measures every five seconds

Post by Alice »

AFAIK rrdtool minimum granularity is 1 minute.
[url=http://www.x-graphs.com/]http://www.x-graphs.com[/url] [color=red]X[/color]-[color=blue]graphs[/color] :: All kind of graphs
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests