Ping monitor - monitor ip in the background?
mylists at pinesalad.net
Sun Nov 2 11:47:43 CET 2008
Andrey - Thank you very much for the example.
Is something missing after the def start(self): or should def run(): not
I think I understand the idea your showing though and working on
Jorgen - yes that is very true in regards to the *nix comment.
I will change that comment to "for my *nix environment" to be more
precise in the future.
It was posted as an example of what I'm doing rather than a global ping
solution for all.
I deploy an alternative set of common tools (ping being one of them)
amongst our various platforms so the options in this case isn't an issue
A built in ping method would be better was being looked into but wanted
to get this part finished first.
-------- Original Message --------
Subject: Re: Ping monitor - monitor ip in the background?
From: Jorgen Grahn <grahn+nntp at snipabacken.se>
Date: Sun, November 02, 2008 1:04 am
To: python-list at python.org
On Sat, 01 Nov 2008 20:26:43 -0700, ScottZ <mylists at pinesalad.net>
> if os.name == "nt": # Windows
> pcmd = "ping -n 1 -w 1000 "
> else: # *nix
> pcmd = "ping -c1 -W1 "
Not really correct. Unfortunately there are many variants of ping for
Unix, and they don't take the same flags. In Solaris, for example, -c
is not a count, and -W doesn't seem to exist at all.
If I recall correctly, you can't even count on Linux installations to
have compatible pings.
Too bad that you cannot easily implement ping in your program -- it
needs extra privileges in order to handle ICMP.
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.se> R'lyeh wgah'nagl fhtagn!
More information about the Python-list