App-Slaughter

 view release on metacpan or  search on metacpan

lib/Slaughter/API/generic.pm  view on Meta::CPAN

=cut

sub PackageInstalled
{
    print "PackageInstalled - not implemented for $^O\n";
}


=head2 PercentageUsed

Return the percentage of space used in in the given mounted-device.

=for example begin

  foreach my $point ( Mounts() )
  {
     if ( PercentageUsed( Path => $point ) > 80 )
     {
        Alert( To      => "root",
               From    => "root",
               Subject => "$server is running out of space on $point",

lib/Slaughter/API/generic.pm  view on Meta::CPAN

The following parameters are supported:

=over 8

=item Path

The mount-point to the filesystem in question.

=back

The return value will be a percentage in the range 0-100.

B<NOTE>: This primitive invokes C<df> and parses the output.  This
is reasonably portable, but will fail upon systems which have no "df"
binary.  In that case the method will output a stub message to complain
that the function is not implemented.

=cut

sub PercentageUsed
{



( run in 0.464 second using v1.01-cache-2.11-cpan-05162d3a2b1 )