From 01b524cb33e4d36c39e2506456a04e90d88821d8 Mon Sep 17 00:00:00 2001 From: Stephen Soltesz Date: Thu, 12 Feb 2009 21:20:51 +0000 Subject: [PATCH] easily run findbad, fbpcu and sitebad for web. all at once. --- findall.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 findall.py diff --git a/findall.py b/findall.py new file mode 100755 index 0000000..8be5b27 --- /dev/null +++ b/findall.py @@ -0,0 +1,37 @@ +#!/usr/bin/python + +from monitor import parser as parsermodule +from findbad import main as findbad_main +from findbadpcu import main as findbadpcu_main +from sitebad import main as sitebad_main +import sys + +if __name__ == '__main__': + + parser = parsermodule.getParser(['nodesets']) + + parser.set_defaults( increment=False, dbname="findbad", cachenodes=False, + force=False,) + parser.add_option("", "--cachenodes", action="store_true", + help="Cache node lookup from PLC") + parser.add_option("", "--dbname", dest="dbname", metavar="FILE", + help="Specify the name of the database to which the information is saved") + parser.add_option("-i", "--increment", action="store_true", dest="increment", + help="Increment round number to force refresh or retry") + parser.add_option("", "--force", action="store_true", dest="force", + help="Force probe without incrementing global 'round'.") + + parser = parsermodule.getParser(['defaults'], parser) + + cfg = parsermodule.parse_args(parser) + + try: + findbad_main() + findbadpcu_main() + sitebad_main() + except Exception, err: + import traceback + print traceback.print_exc() + print "Exception: %s" % err + print "Saving data... exitting." + sys.exit(0) -- 2.43.0