Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'host,': 0.09; 'hosts': 0.09; 'ping': 0.09; 'am,': 0.13; 'received:209.85.214.174': 0.13; 'received:mail-iw0-f174.google.com': 0.13; 'wrote:': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hard- code': 0.16; 'host"': 0.16; 'subject:list': 0.16; 'slightly': 0.19; 'header:In-Reply-To:1': 0.22; 'active.': 0.23; 'end,': 0.23; 'testing': 0.25; 'received:209.85.214': 0.28; 'message- id:@mail.gmail.com': 0.28; "client's": 0.30; 'sun,': 0.30; 'subject:?': 0.31; "won't": 0.32; "who's": 0.32; 'list': 0.32; 'does': 0.32; 'to:addr:python-list': 0.34; 'there': 0.34; 'however,': 0.34; 'someone': 0.34; 'quite': 0.34; '17,': 0.35; 'but': 0.37; 'could': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'user': 0.38; 'subject:: ': 0.38; 'everyone': 0.38; 'case': 0.39; 'to:addr:python.org': 0.39; 'listing': 0.40; 'received:209': 0.40; 'easily': 0.61; 'easy.': 0.67; 'gone': 0.78; 'from.': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=2EATvmqNQYVy7WW2GfEPm7jyx1LauRgDf4Jm2+5bS+g=; b=gjgfwviuDrKOaxvLWs6R92sqAkR6oWUPEExyAWQ4XvAs75fEnc7QHt9TLs4B0RBFyV PYl1fbnpsJaL+v+mSJgrdYDZ2Ic/2vsZDQmNp9ZxpdOPWrs5QI2/rfkw/Dl6QHixEEC6 v2MEW75KgJNDfDKfKE4OCjO/JZD/SPS+bFCE0= MIME-Version: 1.0 In-Reply-To: <4E21D537.1000407@jollybox.de> References: <4E21D537.1000407@jollybox.de> Date: Sun, 17 Jul 2011 04:27:05 +1000 Subject: Re: how to get a list of all the hosts on the intranet around my workstation? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1310840828 news.xs4all.nl 23836 [2001:888:2000:d::a6]:60381 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:9644 On Sun, Jul 17, 2011 at 4:15 AM, Thomas Jollans 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 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