#
# Faiyaz Ahmed <faiyaza@cs.princeton.edu>
#
-# $Id: $
+# $Id: monitor.py,v 1.4 2006/11/14 19:20:13 faiyaza Exp $
import sys
import os
# The meat of it.
# Nodes to check. Queue of all sick nodes.
- toCheck = Queue.Queue()
+ toCheck = Queue.Queue()
# Nodes that are sick w/o tickets
sickNoTicket = Queue.Queue()
# Comon DB of all nodes
# Nodes that are down. Use this to maintain DB; cleanup.
#alldown = Queue.Queue()
# RT DB
- tickets = {}
+ tickets = {}
# Nodes we've emailed.
# host - > (type of email, time)
emailed = {}
startThread(cm1,"comon")
# Wait for threads to init. Probably should join, but work on that later.
- time.sleep(10)
+ time.sleep(15)
+# while toCheck.empty() == false:
+# time.sleep(10)
+#
# Start Sending Emails
+ time.sleep(30)
startThread(pol, "policy")
-
- # Wait to finish
- while (sickNoTicket.empty() == False) or (toCheck.empty() == False):
- time.sleep(15)
-
-
+ time.sleep(10)
# Store state of emails
- pol.emailedStore("WRITE")
+# pol.emailedStore("WRITE")
# Email what we did.
- pol.status()
+# pol.status()
logger.info('Monitor Exitted')
#if not debug: