What script is creating this graph?
Moderators: Developers, Moderators
What script is creating this graph?
Can someone please tell me where the script is to creat this graph? I've seen it on several peoples Cacti pages, but it doesn't appear to have been included in my Cacti distribution. I thought at first it was a custom script someone made, but I've seen it on more than one site. Where can I get instructions on doing this?
- SCaRaBaeuS
- Posts: 22
- Joined: Tue Mar 30, 2004 9:42 am
i think that is the ping host, lemme see
http://www.only4clans.com/stats/graph.p ... graph_id=6
yupz allmost the same only abit changed
http://www.only4clans.com/stats/graph.p ... graph_id=6
yupz allmost the same only abit changed
latency script
I believe I got this from the cacti board. It works fine for me.
I use it to check latency across my own network and from my network to a popular site.
I use it to check latency across my own network and from my network to a popular site.
Code: Select all
#!/usr/bin/perl
$count = $ARGV[0];
$host = $ARGV[1];
open (PING, "ping -nqc$count $host|");
while (<PING>) {
/(\d+)% packet loss/ && ($loss = $1);
/= (.+)\/(.+)\/(.+)\/(.+) ms/ && (($min,$avg,$max,$dev) = ($1,$2,$3,$4));
};
close (PING);
print "min:$min avg:$avg max:$max dev:$dev loss:$loss";
~
Ok, I have this running on my system. Been running so far, so good. I would like to change the variables though. Current, they are setup in 10 percent increments. On our network (WISP) 1-2% is enough to cause customers to call in and anything over 11% is pretty much unusable. What is the best way to edit this so that I have these values:
0%
1-2 %
3-5%
6-10%
11-100%
I'm not sure what to edit for this to happen - data values, data queries, graph/data templates.. What specifically needs to be changed ?
0%
1-2 %
3-5%
6-10%
11-100%
I'm not sure what to edit for this to happen - data values, data queries, graph/data templates.. What specifically needs to be changed ?
More Information
I am a new Cacti user, and *really* want to get the above graph setup. I have the script going, data template & graph template but things aren't working as they should.
Can someone provide a little more detail or template that I can import?
Thanks,
A.
Can someone provide a little more detail or template that I can import?
Thanks,
A.
- twistedmonkey
- Posts: 2
- Joined: Fri Sep 17, 2004 4:19 pm
- Location: Portugal
- twistedmonkey
- Posts: 2
- Joined: Fri Sep 17, 2004 4:19 pm
- Location: Portugal
More Information
I have a script that outputs the average, minimum, maximum and deviation of the latency, in addition to the packet loss.
I have a simple graph that uses the maximum and loss values, but it doesn't quite represent the data. How do I divide the loss up into sections like the above graph? What to the settins for AVERAGE, MAXIMUM, etc mean?
Thanks,
A.
I have a simple graph that uses the maximum and loss values, but it doesn't quite represent the data. How do I divide the loss up into sections like the above graph? What to the settins for AVERAGE, MAXIMUM, etc mean?
Thanks,
A.
Technologist
Here is the same script I modified for use on Windows-based servers. I also adjusted the output to include everything, including sent/received/lost totals.
hope this helps anyone.
hope this helps anyone.
#!/usr/bin/perl
$count = $ARGV[0];
$host = $ARGV[1];
open (PING, "ping -n $count $host|");
while (<PING>)
{
/(\d+)% loss/ && ($pct = $1);
/Sent = (\d+), Received = (\d+), Lost = (\d+)/ && (($snt,$rcv,$lst) = ($1,$2,$3));
/Minimum = (\d+)ms, Maximum = (\d+)ms, Average = (\d+)ms/ && (($min,$max,$avg) = ($1,$2,$3));
};
close (PING);
print "ping_sent:$snt ping_recv:$rcv ping_lost:$lst ping_pct:$pct ping_min:$min ping_max:$max ping_avg:$avg";
^
chkaotic
chkaotic
Who is online
Users browsing this forum: No registered users and 2 guests