Ping graph shows pinging what?

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

Moderators: Developers, Moderators

Post Reply
mengesb
Posts: 16
Joined: Fri Jun 08, 2007 4:41 pm

Ping graph shows pinging what?

Post by mengesb »

After a few struggles I got cacti up and configured, but I got some questions.

Cacti running for the localhost shows 100ms ping constantly... but what's it pinging? it shouldn't be that high, and I'm not finding the target?!

When I setup a second target to graph, a non-local system, the pings report within normal ranges... less than 2 ms...

Under the device management, both systems list as under 3ms, which is to be expected... but why is my localhost graph showing results in the 100ms range?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The ping test will always ping the IP@/host name given in the target device's edit screen. This may/may not inlcude a name service lookup.
Apart from that, it will depend on the excat script that is used. Hmm, counting those that I'm aware of gives me the number of at least 4 (one of them is my personal version, not yet published).
Please tell us, what exact script you are using ATM
Reinhard
mengesb
Posts: 16
Joined: Fri Jun 08, 2007 4:41 pm

Post by mengesb »

gandalf wrote:The ping test will always ping the IP@/host name given in the target device's edit screen. This may/may not inlcude a name service lookup.
Apart from that, it will depend on the excat script that is used. Hmm, counting those that I'm aware of gives me the number of at least 4 (one of them is my personal version, not yet published).
Please tell us, what exact script you are using ATM
Reinhard
Using the default built in template script, I've not added or modified anything.

Also, I installed and am using Version 0.8.6j

Graph example (what's wrong):
http://www.cat6wired.net/cacti/graph.ph ... rra_id=all

Graph example (what's right):
http://www.cat6wired.net/cacti/graph.ph ... rra_id=all
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

So the scripts should look like

Code: Select all

#!/usr/bin/perl 

open(PROCESS, "ping -c 1 $ARGV[0] | grep icmp_seq |");
$ping = <PROCESS>;
close(PROCESS);
$ping =~ m/(.*time=)(.*) (ms|usec)/; 

print $2; 
That's a quite standard ping. But see the way it extracts the time. It could be in ms or in usec.
Reinhard
mengesb
Posts: 16
Joined: Fri Jun 08, 2007 4:41 pm

Post by mengesb »

That's the exact script that I have.

So why for one server is it showing such a different reporting?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Is it possible, that obe of them reports in "msec" while the other reports in "usec", which makes a difference of 1000?
Reinhard
mengesb
Posts: 16
Joined: Fri Jun 08, 2007 4:41 pm

Post by mengesb »

gandalf wrote:Is it possible, that obe of them reports in "msec" while the other reports in "usec", which makes a difference of 1000?
Reinhard
I did see that, and I'm guessing that's what is happening. Is there a way to force it to report in msec's, because usecs are quite annoying and I don't need that finite detail.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Sure. You can change the script to your likings or you can introduce a CDEF=CURRENT_DATA_SOURCE,1000,* to do maths
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests