> *** Tim Reimers <[EMAIL PROTECTED]>
> *** [2004-05-11 12:05:07]:
> I'm trying to get ping-probe working on our LAN-
> It's working fine for hosts off the local LAN (my webserver at home)
> It's not working here-
> when I run the script, it returns '0 0' as values...
>
> And, of course, there are no graphs--
>
> I expect that the reason this is happening is because the ping time is
> less than 1 MS on our Gigabit core network-
>
> But, it _does_ still return values:
> PING 10.10.1.109 (10.10.1.109) from 10.10.1.182 : 56(84) bytes of data.
> 64 bytes from 10.10.1.109: icmp_seq=1 ttl=128 time=0.629 ms
> 64 bytes from 10.10.1.109: icmp_seq=2 ttl=128 time=0.241 ms
> 64 bytes from 10.10.1.109: icmp_seq=3 ttl=128 time=0.440 ms
> 64 bytes from 10.10.1.109: icmp_seq=4 ttl=128 time=0.322 ms
> 64 bytes from 10.10.1.109: icmp_seq=5 ttl=128 time=0.281 ms
> 64 bytes from 10.10.1.109: icmp_seq=6 ttl=128 time=0.336 ms
Hello Tim,
there are two reasons why this is happening,
mrtg wants integers and no fractions ...,
and I wrote mrtg-ping-probe to monitor WAN links ;-)
possible solutions include:
* use smokeping -- very cool, sexy tool from Tobias
http://people.ee.ethz.ch/~oetiker/webtools/smokeping/
* i find the time to add a "multiplier", where I multiply the
return values by e.g. 1000 to return us instead of ms.
or try this quick hack in the script (assuming you run mrtg-ping-probe
on Unix and not Windows):
***************
*** 268,274 ****
# try to find round trip times
if ($ping_output =~
m@(?:round-trip|rtt)(?:\s+\(ms\))?\s+min/avg/max(?:/(?:m|std)-?dev)?\s+=\s+(\d+(?:\.\d+)?)/(\d+(?:\.\d+)?)/(\d+(?:\.\d+)?)@m)
{
! $pt{min} = $1; $pt{avg} = $2; $pt{max} = $3;
}
elsif ($ping_output =~ [EMAIL
PROTECTED](\d+(?:\.\d+)?)ms,\s+\w+\s+=\s+(\d+(?:\.\d+)?)ms,\s+\w+\s+=\s+(\d+(?:\.\d+)?)[EMAIL
PROTECTED]) {
# this should catch most windows locales
--- 268,274 ----
# try to find round trip times
if ($ping_output =~
m@(?:round-trip|rtt)(?:\s+\(ms\))?\s+min/avg/max(?:/(?:m|std)-?dev)?\s+=\s+(\d+(?:\.\d+)?)/(\d+(?:\.\d+)?)/(\d+(?:\.\d+)?)@m)
{
! $pt{min} = $1 * 1000; $pt{avg} = $2 * 1000; $pt{max} = $3 *
1000;
}
elsif ($ping_output =~ [EMAIL
PROTECTED](\d+(?:\.\d+)?)ms,\s+\w+\s+=\s+(\d+(?:\.\d+)?)ms,\s+\w+\s+=\s+(\d+(?:\.\d+)?)[EMAIL
PROTECTED]) {
# this should catch most windows locales
looks almost like modem line noise ;-),
basically you just multiply the ping time ($pt) with 1000,
don't forget to adapt the legend for the graphs to note the
numbers are microseconds and not milliseconds.
Hope this helps
--pwo
[Slogan of the moment]
>>>>> And Now For Something Completely Different ...
Join AAAAAAA - American Association Against Acronym And Abbreviation Abuse
--
Peter W. Osel Principal - Development Systems
Infineon Technologies Email: [EMAIL PROTECTED]
North America Corp. Phone: +1.408.501.6321
1730 North First Street Fax: +1.408.501.2410
San Jose, CA 95112, USA WWW: http://pwo.de/
pgp key fingerprint = 79 2D DD 49 C0 AA D8 CF 2C F9 A5 6A BA 37 0E 28
--
Unsubscribe mailto:[EMAIL PROTECTED]
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi