473,395 Members | 2,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Win32 ping

Does anyone know of an ping module that will work with Windows?

I'm currently using os.popen("ping -n1 host") but it's terribly slow
when using it a few hundred times.

After enumerating my domain of machines I'm trying to ping them to
determine if they are active before connecting to them via WMI (which
takes forever to timeout).

--
Sean

Jul 18 '05 #1
3 8392
Sean Cody wrote:
Does anyone know of an ping module that will work with Windows?


Jeremy Hylton's code works well on Windows. It's fairly straightforward
to code up an asynchronous loop to allow pinging a few hundred ip
addresses (using the ping module primarily to properly encode the
packets). I'm wondering, however, if you couldn't simply set the
timeout lower for the connections?

HTH,
Mike

_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/


Jul 18 '05 #2
On Fri, 22 Aug 2003 14:23:46 -0500, rumours say that Sean Cody
<nu*********************@tfh.ca> might have written:
I tried that but it complains about not having os.fork() available.
dir(os) does not contain fork.


Huh?

You may try downloading this file:

http://www.sil-tec.gr/~tzot/python/wiping.tgz

Inside, there are the ping, icmp, inet and ip modules that (I believe) I
found in Jeremy Hylton's page; you can study their usage in the
wiping.py file (which is a quick-and-dirty rewrite of one of my first
Tkinter python programs, so I am not very proud of the state of the
code; just check the ping module use). Standard disclaimers apply.
--
TZOTZIOY, I speak England very best,
Microsoft Security Alert: the Matrix began as open source.
Jul 18 '05 #3
On Fri, 22 Aug 2003 14:23:46 -0500, rumours say that Sean Cody
<nu*********************@tfh.ca> might have written:
I tried that but it complains about not having os.fork() available.
dir(os) does not contain fork.


Huh?

You may try downloading this file:

http://www.sil-tec.gr/~tzot/python/wiping.tgz

Inside, there are the ping, icmp, inet and ip modules that (I believe) I
found in Jeremy Hylton's page; you can study their usage in the
wiping.py file (which is a quick-and-dirty rewrite of one of my first
Tkinter python programs, so I am not very proud of the state of the
code; just check the ping module use). Standard disclaimers apply.
--
TZOTZIOY, I speak England very best,
Microsoft Security Alert: the Matrix began as open source.
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jason Rodman | last post by:
I have downloaded every example on how to create a ping utility in .Net in both VB and C#, but have been disappointed with the results. I have YET to find an example that returns consistent results...
9
by: Mantorok | last post by:
Hi all I want to ping an ipaddress/host to check for a response. Is there any easy way in C#/.Net to do this? Thanks Kev
0
by: Ed | last post by:
I've attached some VB.NET code I've hacked together (some taken from MS examples & newsgroup postings) that will perform a ping or IcmpSendEcho using the icmp.dll (see this for more info:...
0
by: scotty | last post by:
I need to do a ping scan of a subnet. I can Enum through the IPs and do this, but it takes over 5 minutes as I can only create 1 process at a time. Does anyone know how I can create multiple Ping...
21
by: Neel | last post by:
I am trying to "ping" a remote host in my C++/Redhat Linux code to check whether that host is connected or not. if (0 == system("ping -w 2 192.168.0.2)) But, in both cases...
5
by: Deepak | last post by:
I am programing a ping application which pings various centers . I used timer loop and it pings one by one. Now when i finish pinging one center it should wait for the ping_completed function to...
1
by: Krish | last post by:
All, I have an offline application that works online for some data syncronization. For data syncronization I access a webservice. I want to show whether my application is online or not by checking...
3
by: imughal | last post by:
I got the perl script which does following task. This solution reads in a line from a text file that is passed in as input parameter 1 to a Perl script. This script will then ping the machine...
6
by: Dave Marden | last post by:
I currently use this routine in vbscript to ping computers and get the status of ping to determine whether to try to backup a machine, I am trying to change it to work with vb2003.net I am...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.