Changeset 30250 for trunk/tools/czarpoll.pl
- Timestamp:
- Jan 12, 2011, 2:52:40 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/tools/czarpoll.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/czarpoll.pl
r30100 r30250 1 1 #!/usr/bin/perl -w 2 3 ########################################################################### 4 # 5 # Main polling program for czartool. Grabs stuff from various sources every few minutes. 6 # 7 ########################################################################### 2 8 3 9 use warnings; … … 7 13 8 14 # local classes 15 use czartool::Config; 9 16 use czartool::CzarDb; 10 17 use czartool::Gpc1Db; … … 17 24 18 25 my $period = 60; 19 my $czarDbName = "czardb"; # TODO variables for other Db stuff, host etc20 26 my $save_temps = 0; 21 27 22 28 GetOptions ( 23 29 "period|p=s" => \$period, # TODO more Db args 24 "dbname|d=s" => \$czarDbName,25 30 ); 26 31 27 my $czarDb = new czartool::CzarDb($czarDbName, "ippdb01", "ipp", "ipp", 0, $save_temps); # TODO last arg here is save_temps, should get as arg 28 my $gpc1Db = new czartool::Gpc1Db("gpc1", "ippdb01", "ippuser", "ippuser"); 32 my $config = new czartool::Config(); 33 my $czarDb = $config->getCzarDbInstance(); 34 my $gpc1Db = $config->getGpc1Instance; 29 35 my $nebulous = new czartool::Nebulous($czarDb); 30 36 my $pantasks = new czartool::Pantasks(); 31 my $plotter = czartool::Plotter->new_file($ gpc1Db, $czarDb, "/tmp", $save_temps);37 my $plotter = czartool::Plotter->new_file($config, "/tmp", $save_temps); 32 38 my $burntool = new czartool::Burntool(); 33 39 34 35 $czarDb->setDateFormat("%Y%m%d-%H%i%s");36 40 37 41 my @stages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist"); … … 110 114 my $today = undef; 111 115 my $yesterday = undef; 112 my $newDayTime = "18:00";116 my $newDayTime = $config->getMetricsStartTime(); 113 117 my $lastDayDailyTasks = "2010-01-01"; 114 118 … … 136 140 print "* Creating metrics for last 24 hours\n"; 137 141 # TODO hardcoded path needs to be in config 138 my $dayMetrics = new czartool::DayMetrics($gpc1Db, 139 $czarDb, 140 "/data/ipp004.0/ipp/ippMetrics/", 141 1, 0, $today); 142 my $dayMetrics = new czartool::DayMetrics($config, 1, 0, $today); 142 143 $dayMetrics->writeHTML(); 143 144 144 145 # now update metrics index page 145 my $metricsIndex = new czartool::MetricsIndex($gpc1Db, 146 $czarDb, 147 "/data/ipp004.0/ipp/ippMetrics/", 148 1, 0); 146 my $metricsIndex = new czartool::MetricsIndex($config, 1, 0); 149 147 $metricsIndex->writeHTML(); 150 148
Note:
See TracChangeset
for help on using the changeset viewer.
