Changeset 29320 for trunk/tools/czarplot.pl
- Timestamp:
- Oct 5, 2010, 9:42:28 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/tools/czarplot.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/czarplot.pl
r29119 r29320 17 17 my $begin = undef; 18 18 my $end = undef; 19 my $day = undef; 19 20 my $path = undef; 20 21 my $verbose = undef; … … 32 33 "begin|b=s" => \$begin, 33 34 "end|e=s" => \$end, 35 "day|d=s" => \$day, 34 36 "output|o=s" => \$path, 35 37 "histogram|h" => \$histogram, … … 64 66 print "* OPTIONAL: choose time interval in past -i <'1 hour'|'1 day'|etc> (default=none\n";} 65 67 if (!$begin) { 66 print "* OPTIONAL: choose a begin time -b <datetime> (default= 7am this morning)\n";}68 print "* OPTIONAL: choose a begin time -b <datetime> (default=6:35am this morning)\n";} 67 69 if (!$end) { 68 70 print "* OPTIONAL: choose an end time -e <datetime> (default=now)\n";} 71 if (!$day) { 72 print "* OPTIONAL: choose a single day to plot -d <date> (default=today)\n";} 69 73 if (!$path) { 70 74 print "* OPTIONAL: choose an output location -o <path> (default=none)\n"; … … 84 88 $czarDb->setDateFormat("%Y%m%d-%H%i%s"); 85 89 86 87 # GENE PLOTS my $plotter = new czartool::Plotter($czarDb, "%Y%m%d-%H%M%S", $savingToFile ? "png size 1280,960 font \"/usr/share/fonts/corefonts/arial.ttf\" 12" : "X11", $path, $save_temps); 88 my $plotter = new czartool::Plotter($czarDb, "%Y%m%d-%H%M%S", $savingToFile ? "png font \"/usr/share/fonts/corefonts/arial.ttf\" 8" : "X11", $path, $save_temps); 90 my $plotter = new czartool::Plotter( 91 $czarDb, 92 "%Y%m%d-%H%M%S", 93 $savingToFile ? "png font \"/usr/share/fonts/corefonts/arial.ttf\" 8" : "X11", 94 $path, 95 $save_temps); 89 96 90 97 # sort out times 91 if (!$end) {$end = $czarDb->getNowTimestamp();} 92 if (!$begin) { 93 if ($interval) {$begin = $czarDb->subtractInterval($end, $interval);} 94 else {$begin = strftime('%Y-%m-%d 06:35',localtime);} 98 if($day) { 99 $end = "$day 23:59"; 100 $begin = "$day 06:35"; 95 101 } 102 else { 96 103 104 if (!$end) {$end = $czarDb->getNowTimestamp();} 105 if (!$begin) { 106 107 if ($interval) {$begin = $czarDb->subtractInterval($end, $interval);} 108 else {$begin = strftime('%Y-%m-%d 06:35',localtime);} 109 } 110 } 97 111 my $diskUsage = 1; # TODO 98 112
Note:
See TracChangeset
for help on using the changeset viewer.
