hello,

> mert csak? Mondom, valami miatt teljesen elonek latszik a kapcsolat, 
> csak eppen kozepen lesz egy fekete lyuk gondolom, ami mindent benyel, ha 
> jon, ha megy a csomag. Az a legbajabb, hogy nincs egy fix ip cimu eszkoz 
> sem a tuloldalon.

a gateway sem?

tulképp mit szeretnél? végigpingetni az összes hosztot? abból
kiderül a VPN állapota?


Egyébként:

==%==
#!/usr/bin/python

import os
import re
import time
import sys
from threading import Thread

class testit(Thread):
   def __init__ (self,ip):
      Thread.__init__(self)
      self.ip = ip
      self.status = -1
   def run(self):
      pingaling = os.popen("ping -q -c2 "+self.ip,"r")
      while 1:
        line = pingaling.readline()
        if not line: break
        igot = re.findall(testit.lifeline,line)
        if igot:
           self.status = int(igot[0])

testit.lifeline = re.compile(r"(\d) received")
report = ("No response","Partial Response","Alive")

print time.ctime()

pinglist = []

for host in range(1,255):
   ip = "194.24.131."+str(host)
   current = testit(ip)
   pinglist.append(current)
   current.start()

for pingle in pinglist:
   pingle.join()
   print "Status from ",pingle.ip,"is",report[pingle.status]

print time.ctime()

==%== 


11sec körül lefut a teljes /24-re.


a.
_________________________________________________
linux lista      -      [email protected]
http://mlf2.linux.rulez.org/mailman/listinfo/linux

válasz