ping

Cary O'Brien cobrien at Radix.Net
Wed Nov 15 12:17:57 EST 2000


In article <slrn915g9p.ne.matt at happy-hour.mondoinfo.com>,
Matthew Dixon Cowles <matt at mondoinfo.com> wrote:
>On 15 Nov 2000 10:53:20 -0500, Krister Bruhwel
><bruhwel at localhost.localdomain> wrote:
>
>>I would like to write a ping program.  I'm trying to use Python to
>>ping machines and then generate a web page that displays the ping
>>times.  Can anyone point me in a direction towards learning how to
>>ping a machine in Python?
>
>Jeremy Hylton has a version at:
>
>http://the-tech.mit.edu/~jeremy/python/
>
>and my own is at:
>
>ftp://ftp.visi.com/users/mdc/ping.py
>

These have to run as root, which can be ok.  If you don't want to run as
root, and you need to ping a lot of things, you might want to look at the
little ntping program that comes with scotty/tnm[1].  This will do pings
and traceroute.  You set it suid-root so it has permissions.  Oops, looking
at the documentation, it looks as if Juergen is changing to something
called nmicmpd, which has binary interfaces.   Hmm.  Looks faster but
not as nice.

In any case, with ntping you can just popen it and read the results.
( I miss fileevent :( )

Just a thought.

-- cary


>Regards,
>Matt





More information about the Python-list mailing list