Main > Programming > Libraries >

Filesys::Df 0.92

Filesys::Df 0.92

Sponsored Links

Filesys::Df 0.92 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.007 MB
Platform: Any Platform
License: GPL (GNU General Public License)
Price:
Downloads: 911
Date added: 2007-04-27
Publisher: Ian Guthrie

Filesys::Df 0.92 description

Filesys::Df is a Perl extension for filesystem disk space information.

SYNOPSIS

use Filesys::Df;

#### Get information by passing a scalar directory/filename value
my $ref = df("/tmp"); # Default output is 1K blocks
if(defined($ref)) {
print "Total 1k blocks: $ref->{blocks}n";
print "Total 1k blocks free: $ref->{bfree}n";
print "Total 1k blocks avail to me: $ref->{bavail}n";
print "Total 1k blocks used: $ref->{used}n";
print "Percent full: $ref->{per}n";

if(exists($ref->{files})) {
print "Total inodes: $ref->{files}n";
print "Total inodes free: $ref->{ffree}n";
print "Inode percent full: $ref->{fper}n";
}
}

#### Get information by passing a filehandle
open(FILE, "some_file"); # Get information for filesystem at "some_file"
my $ref = df(*FILE);
#### or
my $ref = df(*FILE);
#### or
my $fhref = *FILE;
my $ref = df($fhref);

#### Get information in other than 1k blocks
my $ref = df("/tmp", 8192); # output is 8K blocks
my $ref = df("/tmp", 1); # output is bytes

This module provides a way to obtain filesystem disk space information. This is a Unix only distribution. If you want to gather this information for Unix and Windows, use Filesys::DfPortable. The only major benefit of using Filesys::Df over Filesys::DfPortable, is that Filesys::Df supports the use of open filehandles as arguments.

The module should work with all flavors of Unix that implement the statvfs() and fstatvfs() calls, or the statfs() and fstatfs() calls. This would include Linux, *BSD, HP-UX, AIX, Solaris, Mac OS X, Irix, Cygwin, etc ...

df() requires a argument that represents the filesystem you want to query. The argument can be either a scalar directory/file name or a open filehandle. There is also an optional block size argument so you can tailor the size of the values returned. The default block size is 1024. This will cause the function to return the values in 1k blocks. If you want bytes, set the block size to 1.

df() returns a reference to a hash. The keys available in the hash are as follows:
{blocks} = Total blocks on the filesystem.
{bfree} = Total blocks free on the filesystem.
{bavail} = Total blocks available to the user executing the Perl application. This can be different than {bfree} if you have per-user quotas on the filesystem, or if the super user has a reserved amount. {bavail} can also be a negative value because of this. For instance if there is more space being used then you have available to you.
{used} = Total blocks used on the filesystem.
{per} = Percent of disk space used. This is based on the disk space available to the user executing the application. In other words, if the filesystem has 10% of its space reserved for the superuser, then the percent used can go up to 110%.
You can obtain inode information through the module as well, but you must call exists() on the {files} key first, to make sure the information is available. Some filesystems may not return inode information, for example some NFS filesystems.
Here are the available inode keys:
{files} = Total inodes on the filesystem.
{ffree} = Total inodes free on the filesystem.
{favail} = Total inodes available to the user executing the application. See the rules for the {bavail} key.
{fused} = Total inodes used on the filesystem.
{fper} = Percent of inodes used on the filesystem. See rules for the {per} key.

There are some undocumented keys that are defined to maintain backwards compatibilty: {su_blocks}, {user_blocks}, etc ...

If the df() call fails for any reason, it will return undef. This will probably happen if you do anything crazy like try to get information for /proc, or if you pass an invalid filesystem name, or if there is an internal error. df() will croak() if you pass it a undefined value.

Filesys::Df 0.92 Screenshot

Advertisements

Filesys::Df 0.92 Keywords

Bookmark Filesys::Df 0.92

Hyperlink code:
Link for forum:

Filesys::Df 0.92 Copyright

WareSeeker periodically updates pricing and software information of Filesys::Df 0.92 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Filesys::Df 0.92 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Filesys::Statvfs is a Perl extension for statvfs() and fstatvfs(). Free Download
Filesys::Ext2 is a Perl interface to ext2 and ext3 filesystem attributes. Free Download
Filesys::DiskFree is a Perl module to perform the Unix command df in a portable fashion. Free Download
Filesys::SamFS is a Perl extension mapping the SamFS API to Perl. Free Download
Filesys::DfPortable is a Perl extension for filesystem disk space information. Free Download
Filesys::DiskSpace is a Perl module as a df replacement. Free Download
Filesys::DiskUsage is a Perl module to estimate file space usage (similar to `du`). Free Download
FUR is a application that let the user mount a Windows CE based device on your Linux file system. Free Download