diff --git a/watcharnsberg b/hbd similarity index 87% rename from watcharnsberg rename to hbd index c787226..5c61c32 100755 --- a/watcharnsberg +++ b/hbd @@ -1,5 +1,5 @@ #!/usr/bin/env python -# $Id: watcharnsberg,v 1.5 2005/05/06 14:39:27 andreas Exp $ +# $Id: hbd,v 1.1 2005/07/14 19:26:01 andreas Exp $ # Wait for heartbeat messages and act on them (or their absence) # import time, os, string, sys, socket, curses, atexit, select, SocketServer @@ -304,34 +304,6 @@ def updatestats(): # # # -def genhtml(now): - f=open("/home/andreas/public_html/private/watcharnsberg.html","w") - f.write("") - f.write("
") - f.write("\n" % 10) - f.write("") - f.write('') - f.write("| Host | State | IP Addr | Res | Last change |
|---|---|---|---|---|
| %-24s | %-7s | %-16s | %-3s | %-17s |
")
- for m in msgs[len(msgs)-30:]:
- f.write("%s
" % m)
- os.environ['SCRIPT_FILENAME']="/home/andreas/bin/watcharnsberg"
- g=os.popen("/home/andreas/cgi-bin/trailer.py", "r")
- o=g.readlines()
- g.close()
- f.write(string.join(o,""))
- f.close()
-
-#
-#
-#
-
-
def initcurses():
global stdscr
stdscr = curses.initscr()
@@ -400,11 +372,6 @@ class HtmlHandler(SocketServer.BaseRequestHandler):
res.append("
")
for m in msgs[len(msgs)-30:]:
res.append("%s
" % m)
-# os.environ['SCRIPT_FILENAME']="/home/andreas/bin/watcharnsberg"
-# g=os.popen("/home/andreas/cgi-bin/trailer.py", "r")
-# o=g.readlines()
-# g.close()
-# res.append(string.join(o,""))
try:
self.request.send(string.join(res,"\n"))
@@ -476,8 +443,6 @@ while 1:
next=now+1
if int(now) % INTERVAL == startsec:
updatestats()
-## if int(now) % 60 == 0:
-## genhtml(now)
checkoverdue()
if visual:
stdscr.move(1 , 0)