how to get a list of all the hosts on the intranet around my workstation?

Chris Angelico rosuav at gmail.com
Sat Jul 16 14:27:05 EDT 2011


On Sun, Jul 17, 2011 at 4:15 AM, Thomas Jollans <t at jollybox.de> wrote:
> In the end, there is only one way to get all active machines: Ping
> everyone on the subnet.

But that will list everyone who's _currently_ active; it won't list
everyone who _ought to be_ active. However, the OP was slightly
ambiguous:

On Sun, Jul 17, 2011 at 2:31 AM, Phlip <phlip2005 at gmail.com> wrote:
> The Use Case is a user wants to ping a nearby host, and I provide a
> list of nearby hosts for the user to pick from. Nothing else. Hosts on
> the outernet need not apply.

Does "ping a nearby host" simply mean that you want to ping someone
who's up, as a means of testing the client's own network connection?
Or are you seeking to list all servers and know if any has gone down?

If the former, it's quite easy. In fact, you could just hard-code a
few IPs of key routers and/or servers, and ping those, much more
easily than listing hosts.

ChrisA



More information about the Python-list mailing list