Hi Guys
i have a nice little piece of code then i need to modify so that is does not look at /Voulmes/*
thanks
sub disk_full {
my $i = 0;
open( DF, "df -l|" );
while (<DF>) {
#chomp();
next if (/^\/proc\b/);
$i++;
next if ( $i == 1 );
my ( $Filesystem, $blocks, $Used, $Available, $Use_perc, $Mounted ) =
split( " ", $_ );
next if (/\/dev*$/);
next if (/\/dev\/shm$/);
next if (/\/Volumes\/*$/i);
#next if (/\/.automont\/hosts\/*$/);
$Use_perc =~ s/\%//g;
if ( $Use_perc > 90 ) {
my $msg = $Mounted . " is " . $Use_perc . "% full ; ";
push(@errors, $msg);
}
}
close(DF);
any ideas - as you can see i have tired but it does not work?
thanks
Adam