I'm jealous of the Unix ping options (-l preload, -i interval, and -w deadline specifically)... My last attempt to get a .pl ping script going did not scale well at all from my Windows Cacti server. Was incredibly sluggish and would not seem to terminate when a box didn't answer. Blew the 5-minute polling window away when combined with the other tests I was running (big network).
Bear with me here, but I was wondering if it was possible to have Cacti launch a cygwin shell, execute a perl ping script within the shell, and pass the results back out to Cacti? ...and (if that was too easy) do so in a manner of time that wouldn't negate the original objective of getting the ping script response time streamlined.
If this is asking too much, has anyone gotten a ping latency script to scale (even a little bit!) running under Windows? Would appreciate any insight if so.
Thanks all,
Jason
*nix PING via Windows?
Moderators: Developers, Moderators
For the .pl window not closing, did you put something in the script like (batch code, but same idea):
ping -n 2 %CMP% | find "TTL" >NUL
if not errorlevel 1 GOTO MAIN in conjunction with a 'or die' perl command?
Sure, you could launch a cygwin cmd window. I wouldn't think it would have a large performance hit. Could use the unix/cygwin ping or maybe the perl ping has the functionality you want. Heck, there probably is a win32 ping tool that someone has expanded upon with more functionality.
ping -n 2 %CMP% | find "TTL" >NUL
if not errorlevel 1 GOTO MAIN in conjunction with a 'or die' perl command?
Sure, you could launch a cygwin cmd window. I wouldn't think it would have a large performance hit. Could use the unix/cygwin ping or maybe the perl ping has the functionality you want. Heck, there probably is a win32 ping tool that someone has expanded upon with more functionality.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
I can't say that I did.... I had used a script that I recycled off of the forum here, and it admittedly did not have an escape mechanism built in. I'm not overly perl savvy, but I did follow what you're suggesting and will work that into the mix.
Gotta say though, on this latest installation I did yesterday, it has been working like a champ. The new box definitely has a full install of cygwin... Not sure the other one did. I read here yesterday that cactid is dependent on cygwin and scripts may "suffer" w/o full install. So far, I've limited the new Cacti install to just monitoring my 19 most important routers (ping and default "Cisco router" template). I was having some timeouts/unsuccessfuls on the ping tests by the time I got the last few online last night. I get sub 70ms responses on all of them typically, but for the heck of it, I went into Cacti's poller setup page and increased the host-detection "UDP Ping Timeout Value" (I'm using SNMP detection w/ UDP pings currently... may try ICMP pings soon) to 1000 and increased the retries to "2" to see if maybe the script wasn't even getting a chance to run. Since those last two changes, it has been a solid performer. Not sure that I know the underlying reasons "why" it made a difference since it was already at a generous 400ms timeout before... but it did!
Thanks for the suggestion on the escape code for the perl script!
Jason
Gotta say though, on this latest installation I did yesterday, it has been working like a champ. The new box definitely has a full install of cygwin... Not sure the other one did. I read here yesterday that cactid is dependent on cygwin and scripts may "suffer" w/o full install. So far, I've limited the new Cacti install to just monitoring my 19 most important routers (ping and default "Cisco router" template). I was having some timeouts/unsuccessfuls on the ping tests by the time I got the last few online last night. I get sub 70ms responses on all of them typically, but for the heck of it, I went into Cacti's poller setup page and increased the host-detection "UDP Ping Timeout Value" (I'm using SNMP detection w/ UDP pings currently... may try ICMP pings soon) to 1000 and increased the retries to "2" to see if maybe the script wasn't even getting a chance to run. Since those last two changes, it has been a solid performer. Not sure that I know the underlying reasons "why" it made a difference since it was already at a generous 400ms timeout before... but it did!
Thanks for the suggestion on the escape code for the perl script!
Jason
Just in case here is is windows ping alternative I was using for some time. It has much more parameters to tune the operation.
http://www.kwakkelflap.com/fping.html
- Piotr
http://www.kwakkelflap.com/fping.html
- Piotr
Who is online
Users browsing this forum: No registered users and 2 guests