IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 6, 2013, 2:34:49 PM (13 years ago)
Author:
eugene
Message:

merging changes from trunk

Location:
branches/eam_branches/ipp-20121219
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121219

  • branches/eam_branches/ipp-20121219/ippMonitor

  • branches/eam_branches/ipp-20121219/ippMonitor/Makefile.in

    r34903 r35096  
    215215$(DESTWWW)/simplePlotStackImage.php \
    216216$(DESTWWW)/simplePlotStaticskyImage.php \
    217 $(DESTWWW)/newsimplePlotStaticskyImage.php \
    218217$(DESTWWW)/simplePlotSkycalImage.php \
    219218$(DESTWWW)/histogramBackgroundImage.php \
  • branches/eam_branches/ipp-20121219/ippMonitor/czartool/czarDbSchema.sql

    r33434 r35096  
    7878  `total` float default NULL,
    7979  `available` float default NULL,
     80  `usable` float default NULL,
    8081  `used` float default NULL,
    8182  `hostsOver98` smallint(6) default NULL,
  • branches/eam_branches/ipp-20121219/ippMonitor/czartool/czartool/CzarDb.pm

    r34096 r35096  
    99
    1010my @stages = (
    11         "chip", 
    12         "cam", 
    13         "fake", 
    14         "warp", 
    15         "stack", 
    16         "diff", 
    17         "dist", 
     11        "chip",
     12        "cam",
     13        "fake",
     14        "warp",
     15        "stack",
     16        "diff",
     17        "dist",
    1818        "pub",
    1919        "chipbackground"); # TODO put elsewhere
     
    6464    SELECT DISTINCT label
    6565        FROM processed
    66         WHERE timestamp >= '$begin' 
    67         AND timestamp <= '$end' 
     66        WHERE timestamp >= '$begin'
     67        AND timestamp <= '$end'
    6868SQL
    6969
     
    109109
    110110    SELECT DISTINCT label
    111         FROM chip 
    112         WHERE timestamp >= '$begin' 
    113         AND timestamp <= '$end' 
     111        FROM chip
     112        WHERE timestamp >= '$begin'
     113        AND timestamp <= '$end'
    114114        AND label NOT LIKE '%_ud%'
    115115        AND label NOT LIKE 'update%'
     
    153153
    154154    my $query = $self->{_db}->prepare(<<SQL);
    155     SELECT reverting 
     155    SELECT reverting
    156156        FROM reverts
    157          WHERE stage LIKE '$stage'; 
     157         WHERE stage LIKE '$stage';
    158158SQL
    159159
     
    171171
    172172    my $query = $self->{_db}->prepare(<<SQL);
    173      UPDATE reverts 
    174          SET reverting = $reverting 
     173     UPDATE reverts
     174         SET reverting = $reverting
    175175         WHERE stage LIKE '$stage';
    176176SQL
     
    188188
    189189    my $query = $self->{_db}->prepare(<<SQL);
    190      UPDATE current_labels 
    191          SET priority = $priority 
    192          WHERE label LIKE '$label' 
     190     UPDATE current_labels
     191         SET priority = $priority
     192         WHERE label LIKE '$label'
    193193         AND server LIKE 'stdscience';
    194194SQL
     
    323323###########################################################################
    324324sub insertNewClusterSpace {
    325     my ($self, $total, $available, $used, $hostsOver98) = @_;
     325    my ($self, $total, $available, $usable, $used, $hostsOver98) = @_;
    326326
    327327    my $query = $self->{_db}->prepare(<<SQL);
    328328    INSERT INTO cluster_space
    329         (total, available, used, hostsOver98)
     329        (total, available, usable, used, hostsOver98)
    330330        VALUES
    331         ( $total, $available, $used, $hostsOver98);
     331        ( $total, $available, $usable, $used, $hostsOver98);
    332332SQL
    333333
     
    362362
    363363    my $query = $self->{_db}->prepare(<<SQL);
    364     SELECT 
    365         DATE_FORMAT(MAX(timestamp),'$self->{_dateFormat}'), 
     364    SELECT
     365        DATE_FORMAT(MAX(timestamp),'$self->{_dateFormat}'),
    366366        DATE_FORMAT(MIN(timestamp),'$self->{_dateFormat}'),
    367367        TIME_TO_SEC(TIMEDIFF(max(timestamp ), min(timestamp)))
    368             FROM $stage 
     368            FROM $stage
    369369            WHERE label LIKE '$label'
    370             AND timestamp >= '$fromTime' AND timestamp <= '$toTime'; 
     370            AND timestamp >= '$fromTime' AND timestamp <= '$toTime';
    371371SQL
    372372
     
    413413###########################################################################
    414414#
    415 # Analysis this stage between these times 
     415# Analysis this stage between these times
    416416#
    417417###########################################################################
     
    429429
    430430    my $query = $self->{_db}->prepare(<<SQL);
    431     SELECT 
    432         timestamp, pending, faults, processed 
    433         FROM $stage 
    434         WHERE label LIKE '$label' 
    435         AND timestamp >= '$fromTime' AND timestamp <= '$toTime' 
     431    SELECT
     432        timestamp, pending, faults, processed
     433        FROM $stage
     434        WHERE label LIKE '$label'
     435        AND timestamp >= '$fromTime' AND timestamp <= '$toTime'
    436436        ORDER BY timestamp;
    437437SQL
     
    452452        # get linear values
    453453        if($lastProcessed != -1 && $thisProcessed > $lastProcessed) {
    454            
     454
    455455            $totalProcessed = $totalProcessed + ($thisProcessed - $lastProcessed);
    456456        }
     
    480480    my $started = undef;
    481481    my $finished = undef;
    482    
     482
    483483    my ($have25, $have50, $have75, $have90, $have95, $have100) = 0;
    484484
     
    492492        # get linear values
    493493        if($lastProcessed != -1 && $thisProcessed > $lastProcessed) {
    494            
     494
    495495            $linearProcessed = $linearProcessed + ($thisProcessed - $lastProcessed);
    496496        }
     
    508508
    509509            my $timeDiff = $self->diffTimesInSecs($thisTimestamp, $lastTimestamp) + 0.001;
    510                
     510
    511511            if ($thisProcessed >= $lastProcessed){
    512                 $derivProcessed = abs($thisProcessed - $lastProcessed)/$timeDiff; 
     512                $derivProcessed = abs($thisProcessed - $lastProcessed)/$timeDiff;
    513513            }
    514514            else {$derivProcessed = 0;}
    515             $derivPending = abs($thisPending - $lastPending)/$timeDiff;   
    516             $derivFaults = abs($thisFaults - $lastFaults)/$timeDiff;   
     515            $derivPending = abs($thisPending - $lastPending)/$timeDiff;
     516            $derivFaults = abs($thisFaults - $lastFaults)/$timeDiff;
    517517        }
    518518        else {
    519        
     519
    520520            $derivProcessed = 0;
    521521            $derivPending = 0;
     
    539539            else {
    540540                if (defined $notProcessing) {
    541                    
    542                     $notProcessing = undef; 
    543                     $stuck = undef; 
     541
     542                    $notProcessing = undef;
     543                    $stuck = undef;
    544544                }
    545545                if (!defined $started) {
    546546
    547547                    $started = $lastTimestamp;
    548                     $finished = undef; 
     548                    $finished = undef;
    549549                }
    550550            }
     
    564564            # how long not processing?
    565565            if (defined $notProcessing) {
    566                
     566
    567567                $howLongNotProcessing = $self->diffTimes($lastTimestamp, $notProcessing);
    568568                $notProcessingLongerThanInterval = $self->isBefore($interval, $howLongNotProcessing);
    569569            }
    570570            else {
    571            
     571
    572572                $howLongNotProcessing = 0;
    573573                $notProcessingLongerThanInterval = 0;
     
    611611
    612612    if (!defined $started){
    613    
     613
    614614        $stageMetrics->setStarted(undef);
    615615    }
    616616    else {
    617    
     617
    618618        my $rate = ($stageMetrics->getProcessed()/$self->getTimeInSecs($stageMetrics->getTotalTime) ) * 3600.0;
    619619        $stageMetrics->setRate($rate);
     
    625625    }
    626626    else {
    627    
     627
    628628        $stageMetrics->setStuck(undef);
    629629    }
     
    642642    my $query = $self->{_db}->prepare(<<SQL);
    643643    SELECT  COUNT(*)
    644         FROM $stage 
     644        FROM $stage
    645645        WHERE label LIKE '$label'
    646         AND timestamp >= '$fromTime' AND timestamp <= '$toTime'; 
     646        AND timestamp >= '$fromTime' AND timestamp <= '$toTime';
    647647SQL
    648648
     
    657657    # grab all the data for the provided time range
    658658    $query = $self->{_db}->prepare(<<SQL);
    659     SELECT 
    660         timestamp, pending, faults, processed 
    661         FROM $stage 
    662         WHERE label LIKE '$label' 
    663         AND timestamp >= '$fromTime' AND timestamp <= '$toTime' 
     659    SELECT
     660        timestamp, pending, faults, processed
     661        FROM $stage
     662        WHERE label LIKE '$label'
     663        AND timestamp >= '$fromTime' AND timestamp <= '$toTime'
    664664        ORDER BY timestamp;
    665665SQL
     
    724724            $diffFaults = $thisFaults - $lastFaults;
    725725
    726             # First, look for large positive jumps in processed, most likely a label 
     726            # First, look for large positive jumps in processed, most likely a label
    727727            # added, and store value to subtract from linear value below. If > 1000
    728728            # processed per hour, then it must be wrong
     
    741741            }
    742742            else {
    743            
     743
    744744                $diffProcessed = 0;
    745745                $linearProcessed = $linearProcessed;
     
    747747
    748748            # calculate first derivative in units of images per hour
    749             $derivPending = $diffPending/($timeSep/3600); 
    750             $derivFaults = $diffFaults/($timeSep/3600); 
    751             $derivProcessed = $diffProcessed/($timeSep/3600); 
     749            $derivPending = $diffPending/($timeSep/3600);
     750            $derivFaults = $diffFaults/($timeSep/3600);
     751            $derivProcessed = $diffProcessed/($timeSep/3600);
    752752
    753753        }
    754754        # first time in
    755755        else {
    756        
     756
    757757            $derivPending = 0;
    758758            $derivFaults = 0;
     
    777777            my $totalPending = 0;
    778778            my $totalFaults = 0;
    779             for (my $i=$size-1; $i>=($size - $range); $i--) { 
    780                
     779            for (my $i=$size-1; $i>=($size - $range); $i--) {
     780
    781781                $totalPending = $totalPending + $ratePending[$i];
    782782                $totalFaults = $totalFaults + $rateFaults[$i];
     
    833833    # get earliest time for this label
    834834    my $query = $self->{_db}->prepare(<<SQL);
    835     SELECT GREATEST(MIN(timestamp), now() - INTERVAL $interval) 
     835    SELECT GREATEST(MIN(timestamp), now() - INTERVAL $interval)
    836836        FROM $stage
    837         WHERE label LIKE '$label'; 
    838 SQL
    839     $query->execute;
    840 
    841 my $timestamp = $query->fetchrow_array(); 
     837        WHERE label LIKE '$label';
     838SQL
     839    $query->execute;
     840
     841my $timestamp = $query->fetchrow_array();
    842842
    843843    $query = $self->{_db}->prepare(<<SQL);
    844     SELECT faults 
     844    SELECT faults
    845845        FROM $stage
    846         WHERE label LIKE '$label' 
     846        WHERE label LIKE '$label'
    847847        AND timestamp <= '$timestamp' LIMIT 1;
    848848SQL
     
    861861
    862862    my $query = $self->{_db}->prepare(<<SQL);
    863     SELECT pending - faults 
    864         FROM $stage 
    865         WHERE label LIKE '$label' 
     863    SELECT pending - faults
     864        FROM $stage
     865        WHERE label LIKE '$label'
    866866        ORDER BY timestamp DESC LIMIT 1;
    867867SQL
     
    880880
    881881    my $query = $self->{_db}->prepare(<<SQL);
    882     SELECT 
    883         pending, faults 
     882    SELECT
     883        pending, faults
    884884        FROM $stage
    885885        WHERE label LIKE '$label'
     
    890890    if (!$query->execute) {return 0;}
    891891
    892     (${$pending}, ${$faults}) = $query->fetchrow_array();   
     892    (${$pending}, ${$faults}) = $query->fetchrow_array();
    893893
    894894    ${$processed} = $self->countProcessed($label, $stage, $fromTime, $toTime);
     
    912912
    913913    my $query = $self->{_db}->prepare(<<SQL);
    914     SELECT 
    915         host, used, available, writable, readable 
     914    SELECT
     915        host, used, available, writable, readable
    916916        FROM hosts
    917917        ORDER BY host;
     
    926926
    927927        my ($host, $used, $available, $writable, $readable) = @row;
    928    
    929         if (($used+$available) == 0) {
    930           $underLimit = 1;
    931         } elsif (($used/($used+$available))*100 > $limit) {
    932           $underLimit = 0;
    933         } else {
    934           $underLimit = 1;
    935         }
     928
     929        if (($used+$available) == 0) {
     930          $underLimit = 1;
     931        } elsif (($used/($used+$available))*100 > $limit) {
     932          $underLimit = 0;
     933        } else {
     934          $underLimit = 1;
     935        }
    936936
    937937        # Col 1: host
    938938        print GNUDAT "$host";
    939        
     939
    940940        # Col 2: available, readable used space under limit
    941941        if ($readable && $underLimit) {print GNUDAT " $used";}
     
    973973
    974974    my $query = $self->{_db}->prepare(<<SQL);
    975     SELECT used/total*100 
    976         FROM cluster_space 
     975    SELECT used/total*100
     976        FROM cluster_space
    977977        ORDER BY timestamp DESC LIMIT 1;
    978978SQL
     
    983983###########################################################################
    984984#
    985 # Gets time series data for cluster storage and saves it to file 
     985# Gets time series data for cluster storage and saves it to file
    986986#
    987987###########################################################################
    988988sub createStorageTimeSeriesData {
    989989    my ($self, $tmpFile, $fromTime, $toTime, $minX, $maxX, $minY, $maxY, $timeDiff) = @_;
     990    my $maxAvailable;
     991    my $maxUsable;
     992    my $minAvailable;
     993    my $minUsable;
    990994
    991995    open (GNUDAT, ">".$tmpFile->filename);
    992996
    993997    my $query = $self->{_db}->prepare(<<SQL);
    994     SELECT 
    995         MAX(available), MIN(available),  
    996         DATE_FORMAT(MAX(timestamp),'$self->{_dateFormat}'), 
     998    SELECT
     999        MAX(available), MIN(available), MAX(usable), MIN(usable),
     1000        DATE_FORMAT(MAX(timestamp),'$self->{_dateFormat}'),
    9971001        DATE_FORMAT(MIN(timestamp),'$self->{_dateFormat}'),
    9981002        TIME_TO_SEC(TIMEDIFF(max(timestamp ), min(timestamp)))
    999             FROM cluster_space 
    1000             WHERE timestamp >= '$fromTime' AND timestamp <= '$toTime'; 
     1003            FROM cluster_space
     1004            WHERE timestamp >= '$fromTime' AND timestamp <= '$toTime';
    10011005SQL
    10021006
    10031007    if (!$query->execute) {return undef;}
    10041008
    1005     (${$maxY}, ${$minY}, ${$maxX}, ${$minX}, ${$timeDiff}) = $query->fetchrow_array();
    1006 
     1009    ($maxAvailable, $minAvailable, $maxUsable, $minUsable, ${$maxX}, ${$minX}, ${$timeDiff}) = $query->fetchrow_array();
     1010    ${$maxY} = ($maxAvailable > $maxUsable ? $maxAvailable : $maxUsable);
     1011    ${$minY} = ($minAvailable > $minUsable ? $minAvailable : $minUsable);
    10071012
    10081013    if (!${$maxY} || !${$minY} || !${$maxX} || !${$minX} || !${$timeDiff}) {return 0;}
    10091014
    10101015    $query = $self->{_db}->prepare(<<SQL);
    1011     SELECT 
    1012         DATE_FORMAT(timestamp, '$self->{_dateFormat}'), available 
    1013         FROM cluster_space 
    1014         WHERE timestamp >= '$fromTime' AND timestamp <= '$toTime' 
     1016    SELECT
     1017        DATE_FORMAT(timestamp, '$self->{_dateFormat}'), available, usable
     1018        FROM cluster_space
     1019        WHERE timestamp >= '$fromTime' AND timestamp <= '$toTime'
    10151020        ORDER BY timestamp;
    10161021SQL
     
    10211026    while (my @row = $query->fetchrow_array()) {
    10221027
    1023         my ($timestamp, $available) = @row;
    1024         print GNUDAT "$timestamp $available\n";
     1028        my ($timestamp, $available, $usable) = @row;
     1029        print GNUDAT "$timestamp $available $usable\n";
    10251030    }
    10261031
     
    10741079###########################################################################
    10751080#
    1076 # Gets count of processed stuff in a given time period 
     1081# Gets count of processed stuff in a given time period
    10771082#
    10781083###########################################################################
     
    10811086
    10821087    my $query = $self->{_db}->prepare(<<SQL);
    1083     SELECT 
    1084         processed 
     1088    SELECT
     1089        processed
    10851090        FROM $stage
    1086         WHERE label LIKE '$label' 
    1087         AND timestamp >= '$begin' 
    1088         AND timestamp < '$end' 
     1091        WHERE label LIKE '$label'
     1092        AND timestamp >= '$begin'
     1093        AND timestamp < '$end'
    10891094SQL
    10901095        $query->execute;
     
    11681173
    11691174                $query = $self->{_db}->prepare(<<SQL);
    1170                 SELECT COUNT(*) 
    1171                     FROM $stage 
     1175                SELECT COUNT(*)
     1176                    FROM $stage
    11721177                    WHERE timestamp > '$fromTime'
    11731178                    AND timestamp <= '$toTime'
    1174                     AND label = '$label' 
     1179                    AND label = '$label'
    11751180SQL
    11761181
     
    11811186
    11821187                $query = $self->{_db}->prepare(<<SQL);
    1183                 DELETE FROM $stage 
    1184                     WHERE timestamp > '$fromTime' 
    1185                     AND timestamp <= '$toTime' 
     1188                DELETE FROM $stage
     1189                    WHERE timestamp > '$fromTime'
     1190                    AND timestamp <= '$toTime'
    11861191                    AND label = '$label' ORDER BY timestamp DESC LIMIT $toDelete
    11871192SQL
     
    12031208
    12041209                $query = $self->{_db}->prepare(<<SQL);
    1205                 SELECT COUNT(*) 
    1206                     FROM servers 
     1210                SELECT COUNT(*)
     1211                    FROM servers
    12071212                    WHERE timestamp > '$fromTime'
    12081213                    AND timestamp <= '$toTime'
    1209                     AND server = '$server' 
     1214                    AND server = '$server'
    12101215SQL
    12111216                    $query->execute;
     
    12151220
    12161221                    $query = $self->{_db}->prepare(<<SQL);
    1217                     DELETE FROM servers 
    1218                         WHERE timestamp > '$fromTime' 
    1219                         AND timestamp <= '$toTime' 
     1222                    DELETE FROM servers
     1223                        WHERE timestamp > '$fromTime'
     1224                        AND timestamp <= '$toTime'
    12201225                        AND server = '$server' ORDER BY timestamp DESC LIMIT $toDelete
    12211226SQL
     
    12291234        # now deal with cluster_space table
    12301235        $query = $self->{_db}->prepare(<<SQL);
    1231         SELECT COUNT(*) 
    1232             FROM cluster_space 
     1236        SELECT COUNT(*)
     1237            FROM cluster_space
    12331238            WHERE timestamp > '$fromTime'
    12341239            AND timestamp <= '$toTime'
     
    12401245
    12411246            $query = $self->{_db}->prepare(<<SQL);
    1242             DELETE FROM cluster_space 
    1243                 WHERE timestamp > '$fromTime' 
    1244                 AND timestamp <= '$toTime' 
     1247            DELETE FROM cluster_space
     1248                WHERE timestamp > '$fromTime'
     1249                AND timestamp <= '$toTime'
    12451250                ORDER BY timestamp DESC LIMIT $toDelete
    12461251SQL
     
    12571262###########################################################################
    12581263#
    1259 # Optimizes all tables that need to be optimized 
     1264# Optimizes all tables that need to be optimized
    12601265#
    12611266###########################################################################
     
    12751280###########################################################################
    12761281#
    1277 # Returns if a particular server has been stopped for a certain interval 
     1282# Returns if a particular server has been stopped for a certain interval
    12781283#
    12791284###########################################################################
     
    12861291###########################################################################
    12871292#
    1288 # Returns if a particular server has been down for a certain interval 
     1293# Returns if a particular server has been down for a certain interval
    12891294#
    12901295###########################################################################
     
    12971302###########################################################################
    12981303#
    1299 # Returns if a particular server has been down for a certain interval 
     1304# Returns if a particular server has been down for a certain interval
    13001305#
    13011306###########################################################################
     
    13041309
    13051310    my $query = $self->{_db}->prepare(<<SQL);
    1306     SELECT COUNT(*) 
     1311    SELECT COUNT(*)
    13071312        FROM servers
    1308         WHERE server = '$server' 
     1313        WHERE server = '$server'
    13091314        AND timestamp > now() - INTERVAL $interval
    13101315SQL
     
    13161321
    13171322    $query = $self->{_db}->prepare(<<SQL);
    1318     SELECT COUNT(*) 
     1323    SELECT COUNT(*)
    13191324        FROM servers
    1320         WHERE server = '$server' 
     1325        WHERE server = '$server'
    13211326        AND timestamp > now() - INTERVAL $interval
    13221327        AND !$mode
     
    13291334
    13301335    $query = $self->{_db}->prepare(<<SQL);
    1331     SELECT 
     1336    SELECT
    13321337        timestamp
    13331338        FROM servers
    13341339        WHERE server = '$server'
    1335         AND $mode 
    1336         ORDER BY timestamp DESC 
     1340        AND $mode
     1341        ORDER BY timestamp DESC
    13371342        LIMIT 1
    13381343
     
    13461351###########################################################################
    13471352#
    1348 # Returns an array of servers 
     1353# Returns an array of servers
    13491354#
    13501355###########################################################################
     
    13691374###########################################################################
    13701375#
    1371 # Returns an array of labels present during the provided time frame 
     1376# Returns an array of labels present during the provided time frame
    13721377#
    13731378###########################################################################
     
    13761381
    13771382    my $query = $self->{_db}->prepare(<<SQL);
    1378     SELECT DISTINCT label 
    1379         FROM $stage 
    1380         WHERE timestamp > '$fromTime' 
     1383    SELECT DISTINCT label
     1384        FROM $stage
     1385        WHERE timestamp > '$fromTime'
    13811386        AND timestamp <= '$toTime';
    13821387SQL
  • branches/eam_branches/ipp-20121219/ippMonitor/czartool/czartool/Nebulous.pm

    r34096 r35096  
    2828###########################################################################
    2929#
    30 # Converts Kb to Tb 
    31 # 
     30# Converts Kb to Tb
     31#
    3232###########################################################################
    3333sub convertKbToTb {
     
    5050###########################################################################
    5151#
    52 # Returns total cluster usage in T 
     52# Returns total cluster usage in T
    5353#
    5454###########################################################################
     
    6161###########################################################################
    6262#
    63 # Returns total cluster space in T 
     63# Returns total cluster space in T
    6464#
    6565###########################################################################
     
    7272###########################################################################
    7373#
    74 # Returns total cluster available in T 
     74# Returns total cluster available in T
    7575#
    7676###########################################################################
     
    8383###########################################################################
    8484#
    85 # Runs neb-df and puts output in gnuplot ready format 
     85# Runs neb-df and puts output in gnuplot ready format
    8686#
    8787###########################################################################
     
    9393    $self->{_totalHosts} = 0;
    9494    $self->{_hostsOverNinetyEightPC} = 0;
     95    $self->{_totalUsable} = 0;
    9596    my $readable;
    9697    my $writable;
     
    100101        if ($line =~ m/.*Filesystem.*/i) {next;}
    101102        elsif ($line =~ m/.*summmary.*/i) {next;}
    102         elsif ($line =~ m/.*total.*/i) {next;}
    103         elsif ($line =~ m/\s+[0-9]+\s+([0-9]+)\s+([0-9]+)\s+.*allocated.*/i) {
     103        elsif ($line =~ m/\s+[0-9]+\s+([0-9]+)\s+([0-9]+)\s+.*total.*/i) {
     104            $self->{_totalUsable} += $self->convertKbToTb($2);
     105        } elsif ($line =~ m/\s+[0-9]+\s+([0-9]+)\s+([0-9]+)\s+.*allocated.*/i) {
    104106
    105107            $self->{_totalUsed} = $self->convertKbToTb($1);
     
    109111
    110112            next;
    111         }
    112         elsif (($line =~ m/(ipp[0-9]+\.[0-9]{1})\s.+[0-9]+\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)%.*/i)||
    113                ($line =~ m/(ippb[0-9]+\.[0-9]{1})\s.+[0-9]+\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)%.*/i) ||
    114                ($line =~ m/(stsci0[0-9]+\.[0-9]{1})\s.+[0-9]+\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)%.*/i)) {
    115        
     113        } elsif (($line =~ m/(ipp[0-9]+\.[0-9]{1})\s.+[0-9]+\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)%.*/i)||
     114               ($line =~ m/(ippb[0-9]+\.[0-9]{1})\s.+[0-9]+\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)%.*/i) ||
     115               ($line =~ m/(stsci0[0-9]+\.[0-9]{1})\s.+[0-9]+\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)%.*/i)) {
     116
    116117            $self->{_totalHosts}++;
    117118            if ($4 >= 98) {$self->{_hostsOverNinetyEightPC}++;}
     
    119120            $self->getReadableWritableStatus($1, \$readable, \$writable);
    120121
    121             $self->{_czarDb}->updateHost($1, 
    122                     $self->convertKbToTb($2+$3), 
    123                     $self->convertKbToTb($3), 
    124                     $self->convertKbToTb($2), 
     122            $self->{_czarDb}->updateHost($1,
     123                    $self->convertKbToTb($2+$3),
     124                    $self->convertKbToTb($3),
     125                    $self->convertKbToTb($2),
    125126                    $readable, $writable);
    126127        }
     
    128129
    129130    $self->{_czarDb}->insertNewClusterSpace(
    130             $self->{_totalCluster},
    131             $self->{_totalAvail}, 
    132             $self->{_totalUsed},
     131            $self->{_totalCluster},
     132            $self->{_totalAvail},
     133            $self->{_totalUsable},
     134            $self->{_totalUsed},
    133135            $self->{_hostsOverNinetyEightPC});
    134136}
     
    136138###########################################################################
    137139#
    138 # Runs neb-host and readable/writable status for this host 
     140# Runs neb-host and readable/writable status for this host
    139141#
    140142###########################################################################
  • branches/eam_branches/ipp-20121219/ippMonitor/czartool/czartool/Plotter.pm

    r34249 r35096  
    630630        set xlabel "Time"
    631631        set ylabel "Available (TB)"
    632         plot "$datFile" using 1:2 title "Available" with lines lt 2 lw 2
     632        plot "$datFile" using 1:2 title "Available" with lines lt 2 lw 2, "$datFile" using 1:3 title "Theoretical" with lines lt 3 lw 2
    633633PLOT
    634634
Note: See TracChangeset for help on using the changeset viewer.