don't display deltaT in msg type packets
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# $Id: hbd,v 1.14 2006/11/07 20:25:21 andreas Exp $
|
# $Id: hbd,v 1.15 2006/11/08 15:42:17 andreas Exp $
|
||||||
# Wait for heartbeat messages and act on them (or their absence)
|
# Wait for heartbeat messages and act on them (or their absence)
|
||||||
#
|
#
|
||||||
import time, os, string, sys, socket, atexit, select, SocketServer, getopt, signal, cPickle
|
import time, os, string, sys, socket, atexit, select, SocketServer, getopt, signal, cPickle
|
||||||
@@ -317,7 +317,7 @@ def readsock():
|
|||||||
if boot:
|
if boot:
|
||||||
log("%s booted, deltaT %0.2g sec" % (name, deltaT))
|
log("%s booted, deltaT %0.2g sec" % (name, deltaT))
|
||||||
if msg:
|
if msg:
|
||||||
log("%s %0.2g msg: %s" % (name, deltaT, msg),service=service)
|
log("%s msg: %s" % (name, msg),service=service)
|
||||||
fromaddr(name, addr[0], boot, interval)
|
fromaddr(name, addr[0], boot, interval)
|
||||||
if shutdown:
|
if shutdown:
|
||||||
log("%s shutdown" % name)
|
log("%s shutdown" % name)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
#
|
#
|
||||||
RCSID="$Id: selfcheck,v 1.2 2006/11/08 15:16:41 andreas Exp $"
|
RCSID="$Id: selfcheck,v 1.3 2006/11/08 15:42:17 andreas Exp $"
|
||||||
# check internet connectivity
|
# check internet connectivity
|
||||||
#
|
#
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ def checkall(IF):
|
|||||||
return(Res)
|
return(Res)
|
||||||
|
|
||||||
# ec=os.system("/sbin/ping -n -c 1 %s >/dev/null 2>&1" % "217.237.157.246")
|
# ec=os.system("/sbin/ping -n -c 1 %s >/dev/null 2>&1" % "217.237.157.246")
|
||||||
ec=os.system("/sbin/ping -n -c 1 %s >/dev/null 2>&1" % IF.ipgw)
|
ec=os.system("/sbin/ping -n -c 1 -w 2 %s >/dev/null 2>&1" % IF.ipgw)
|
||||||
if ec == 0:
|
if ec == 0:
|
||||||
Res+=".\nThe gateway is reachable."
|
Res+=".\nThe gateway is reachable."
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user