IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32233


Ignore:
Timestamp:
Aug 30, 2011, 8:55:46 PM (15 years ago)
Author:
watersc1
Message:

Put output files into nebulous.

File:
1 edited

Legend:

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

    r32230 r32233  
    33
    44use Sys::Hostname;
    5 
     5use PS::IPP::Config;
    66%stages = ("RAW" => '.ota',
    77           "DIST" => 'dist',
     
    1414           "MAGIC" => '.mgc.',
    1515           "DETREND" => '.det'
    16 
    1716    );
    18 
    1917
    2018@products = ('.log','.trace','.mdc$','.stats$',
     
    5149    $neb = "${hostname}.0";
    5250}
     51my $ipprc = PS::IPP::Config->new("GPC1");
     52my $nebcon = $ipprc->nebulous();
     53
     54my @lt = localtime;
     55$lt[5] += 1900;
     56$lt[4] += 1;
     57$lt[3] -= $lt[6];
     58my $datestring = sprintf("%04d-%02d-%02d",$lt[5],$lt[4],$lt[3]);
     59my $outfile = "neb:///ipp_diskspace/${datestring}/${neb}.neb_usage.dat";
     60my $out_fh = $ipprc->file_create_open($outfile);
    5361
    5462my $neb_dir = "/data/${neb}/nebulous/";
     
    8290    $volume{$stage}{$product} += $size;
    8391}
     92close(FIND);
     93
     94
    8495
    8596foreach $s (sort (keys %count)) {
    8697    foreach $p (sort (keys %{ $count{$s} })) {
    87        
    88         print "$s $p $count{$s}{$p} $volume{$s}{$p}\n";
     98        print $out_fh "$s $p $count{$s}{$p} $volume{$s}{$p}\n";
    8999    }
    90100}
    91101
     102close($out_fh);
     103
    92104
    93105       
Note: See TracChangeset for help on using the changeset viewer.