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