################################################################################ our $debug = 0; # switch on debuging our $verbose = 0; # important info to STDOUT my $help = 0; # show usage my $force = 0; # run even if less than 5 since last run my $slowdown = 0; # run slow (useful to test locking) my $test = 0; # send no events my $clean_cache = 0; # clean ep cache of obsolete entries found my $max_probs = 150; # max number ep problems my $sched = 11; # schedule frequency my $monitor_freq = 5; # frequency of string script monitor my $Options_OK= GetOptions ("debug" => \$debug, "verbose" => \$verbose, "help" => \$help, "force" => \$force, "clean" => \$clean, "slow" => \$slowdown, "test" => \$test, "probs=i" => \$max_probs, "schedule=i" => \$sched, ); unless ($Options_OK) { print "Sorry you gave a bad command line option\n"; usage (); exit 1; } if ($help) { usage (); exit 0; } sub usage { print "\nusage: ".SCRIPTNAME."[-debug|-verbose] [-help] [-force] [-clean] [-test] [-probs] [-schedule]\n"; print " -debug = switch on debuging\n"; print " -help = show this usage\n"; print " -verbose = important infor to STDOUT\n"; print " -force = run even if less than 5 mins since last run\n"; print " -clean = clean obsolete entries found in ep cache\n"; print " -test = send no events to T/EC\n"; print " -probs = max number ep problems before complaining\n"; print " -schedule = frequency that script is being run in minutes\n"; print "\n"; print "NOTE: any of the command line options can be abbreviated to the\n"; print "shortest unique string, ie -h for help is good, but if we had\n"; print "options hex & help then you would use -hex and -hel as minimum\n\n"; }