POV-Ray : Newsgroups : povray.off-topic : Hey Andrew... : Re: Hey Andrew... Server Time
10 Oct 2024 19:22:24 EDT (-0400)
  Re: Hey Andrew...  
From: Invisible
Date: 27 Feb 2008 04:33:52
Message: <47c52e80$1@news.povray.org>
Darren New wrote:
> Remember that code you talked about that ran "ping" continuously and 
> then analyzed the results to say exactly when things went down and came 
> back? Can I have a copy?  I could recreate it myself, but it would 
> probably take a couple hours, and our ISP doesn't believe we're losing 
> connectivity for a couple minutes at a time.  Thanks!

Here you go - Pinger v1.21.

I haven't touched the code in an age, so it may have bit-rotted by now. 
I usually run it using FreeWrap, but no reason why it shouldn't work 
with some other Tcl interpretter. [I'm pretty sure it doesn't use 
anything special other than Tk.]

If it works properly, you should be able to just 'source' it and then 
say "Do www.google.co.uk" [or whoever you want to ping] and it will 
create a file called Log--2008-Feb-27--www.google.co.uk.txt containing a 
summary of the ping results. It also shows an interactive display 
indicating whether pinging is currently succeeding or failing, and 
exactly when the status last changed. [And also some trivial statistics 
for ping times if pinging is currently working.]

All this is ASSUMING IT WORKS. It works by doing an 'exec ping' and 
parsing the output. As such, it only works with one version of the ping 
command - and I'm not actually sure whether it's set up for Windows NT 
or Windows XP. If it doesn't work out of the box, poke the 'Ping' proc. 
(Duh!) Note that the console window [assuming you didn't hide it] 
scrolls some potentially useful debug data during pinging.

There is also a glitch where if a host doesn't answer ping initially, 
the code things it's a DNS error [even if you use an IP address] and 
stops pinging.

In short, it's buggy. But it might do what you want... Please enjoy 
responsibly.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message


Attachments:
Download 'us-ascii' (7 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.