3 import sys,time,os,os.path
5 logdir="/var/log/peers"
8 # WARNING: the bulk of this output now goes into
13 timestring=time.strftime("%Y-%m-%d-%H-%M-%S")
14 print('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',peername)
15 print('RefreshPeer on %s - starting on %s'%(peername,timestring))
19 result=RefreshPeer(peername)
22 print('Total duration',finish-start)
23 print('xxxxxxxxxx timers:')
24 keys=list(result.keys())
27 print(key,result[key])
31 def RunInLog (peername):
32 monthstring=time.strftime("%Y-%m")
33 if not os.path.isdir(logdir):
35 logname="%s/refresh-peer-%s-%s.log"%(logdir,peername,monthstring)
36 sys.stdout=open(logname,'a')
42 if __name__ == "__main__":
44 for peername in sys.argv[1:]: