This distribution contains two modules Filesys::Statvfs and Filesys::Df. DESCRIPTION Filesys::Statvfs provides an interface between Perl and the statvfs() system call. Filesys::Df uses Filesys::Statvfs to obtain filesystem statistics then creates additional filesystem information such as percent full, user and superuser differentials, etc. Filesys::Df will also let you specify the block size for the values you wish to see. SYNOPSIS Filesys::Statvfs use Filesys::Statvfs; my($bsize, $frsize, $blocks, $bfree, $bavail, $files, $ffree, $favail, $fsid, $basetype, $flag, $namemax, $fstr)=statvfs("/tmp"); SYNOPSIS Filesys::Df use Filesys::Df; my $ref=df("/tmp", 1024); #1024 block size output print"Percent Full: $ref->{per}\n"; print"Total Blocks: $ref->{blocks}\n"; print"Blocks Available: $ref->{bavail}\n"; print"Blocks Used: $ref->{used}\n"; print"Inode Percent full: $ref->{fper}\n"; print"Inodes Free: $ref->{favail}\n"; print"Inodes Used: $ref->{fused}\n"; #These are just some of the keys that are available. #See the documentation for the others. INSTALL TO INSTALL RUN: perl Makefile.PL make make test make install For this module to install and work properly you will need to have statvfs() on your system. A good way to tell if you have it is to look for the sys/statvfs.h header in your include directory. (Usually /usr/include/) If there is an error during the 'make', it is possible that you do not have statvfs() on your system. Another possible reason may be that the statvfs structure defined in statvfs.h does not contain one or more of the fields that are defined in Statvfs.xs. During the 'make test' test.pl will use statvfs() to stat the root directory "/". If it fails it will report an error, otherwise it will report all the standard fields in the statvfs structure. If you are running any flavor of Digital Unix, or IRIX, the fstr value may be NULL. The 'make test' will then proceed to test df(). Once installed, run 'perldoc Filesys::Statvfs' and 'perldoc Filesys::Df' for more information. In the future I plan on having support for statfs(). I also plan on having all of the fields available for statvfs() depending on the OS type. For instance HP-UX 10x has two extra non standard fields in their statvfs structure. This has been tested successfully on HP-UX 10x, IRIX 6.3, Solaris 2.6, RH Linux 6.5, AIX 4.3 and some Digital Unix. NOTE: the fsid field on Linux and AIX will be zeroed. It will be like this until I have time to add support for their fsid type. I doubt anyone out there will use the fsid field anyway. :-P Also please note that if the paticualr OS you are using does not support some of the values returned by Statvfs::statvfs() they will be zeroed or NULLed depending on whether they are integers or string values. If you have any problems or questions please email me at IGuthrie@aol.com with "Filesys Module" in the subject line. Copyright (c) 1998 Ian Guthrie. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.