Skip to main content

Posts

Showing posts from January 12, 2014

Monitor changes in available disk space

for (;;) {         @x = `df /common`;         @y = ($x[2]=~ /(\d+)/g);         $avail = $y[2];         if ($last) {                 my $delta = $avail - $last;                  print "$delta";         }         print $x[2];         $last = $avail;         sleep 5; }