[Kc] Solaris Error
Emmanuel Mejias
emmanuel.mejias at gmail.com
Wed Dec 24 08:12:41 PST 2008
oh yeah, duh! sorry bout that. i got that error when i ran make test during
the installing of the Filesys::DiskSpace module.
#!/usr/bin/perl
use strict;
use warnings;
*use Filesys::DiskSpace;*
my $space_limit = 5; #If less than 5%, scream
if ($#ARGV ==1) {
print "Usage is $0 <fs> [<fs>....]\n";
exit (8);
}
# Loop through each directory in the list.
foreach my $dir (@ARGV) {
# Get the file system info
my ($fs_type, $fs_desc, $used,
$avail, $fused, $favail) = df $dir;
# The amount of free space
my $per_free = (($avail) / ($avail+$used)) * 100.0;
if ($per_free < $space_limit) {
# Tailor this command to meet your needs
my $msg = sprintf(
"WARNING: FREE SPACE on $dir ".
"has dropped to %0.2f%%",
$per_free);
system("wall '$msg'");
}
}
On Wed, Dec 24, 2008 at 9:31 AM, Randall Munden <randall.munden at gmail.com>wrote:
> It would be very helpful if we knew what your script is trying to do.
> Are you using the the perl and modules that installed from the solaris
> package or is this a home rolled perl?
>
> On Wed, Dec 24, 2008 at 9:13 AM, Emmanuel Mejias
> <emmanuel.mejias at gmail.com> wrote:
> > Hey mongers, I'm not sure if this is the appropriate place to post, but I
> > just wanted to see if any has seen this error before when trying to run a
> > script (with a module) on Solaris 10.
> >
> > solaris-ufs....An error occured. statvfs failed. Did you run h2ph?
> > I'm not able to find any useful info to correct this and it's annoying.
> > Should I maybe hit up Solaris forums instead of Perl?
> >
> > Thanks,
> > em
> > _______________________________________________
> > kc mailing list
> > kc at pm.org
> > http://mail.pm.org/mailman/listinfo/kc
> >
>
>
>
> --
> -- Knowing is not enough; we must apply. Willing is not enough; we must
> do.
>
> http://www.librarything.com/profile/blather
> http://blather.smugmug.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/kc/attachments/20081224/f64445e6/attachment.html>
More information about the kc
mailing list