IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 7, 2011, 1:39:50 PM (15 years ago)
Author:
watersc1
Message:

Fix external usage calculator to not return a lie because it failed to parse the df information correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/diskspace/nebulous_data.pl

    r32602 r32625  
    6363my $total_volume = 0;
    6464my $used_volume  = 0;
    65 open(DF,"df -B 1 /data/${neb}/ |") || die "Cannot run df\n";
     65open(DF,"df -B 1 /export/${neb}/ |") || die "Cannot run df\n";
    6666while(<DF>) {
    6767    chomp;
     
    113113    }
    114114}
    115 my $external_volume = $used_volume - $total_volume;
    116 print $out_fh "EXTERNAL UNKNOWN 1 $external_volume\n";
    117 
     115if ($used_volume > 0) {
     116    my $external_volume = $used_volume - $total_volume;
     117    print $out_fh "EXTERNAL UNKNOWN 1 $external_volume\n";
     118}
    118119close($out_fh);
    119120
Note: See TracChangeset for help on using the changeset viewer.