Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.474.305 Times

Filesys::Df 0.92

  Date Added: March 04, 2010  |  Visits: 839

Filesys::Df

Report Broken Link
Printer Friendly Version


Product Homepage
Download (91 downloads)



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..

Requirements: No special requirements
Platforms: Linux
Keyword: Blocks Df Disk Space Filesysdf Filesystem Get Information Information Libraries Programming Space Total
Users rating: 0/10

License: Freeware Size: 7.17 KB
USER REVIEWS
More Reviews or Write Review


FILESYS::DF RELATED
Hard Drive Cleaners  -  Disk Space Explorer 6.7
Disk Space Explorer is a freeware interactive disk space analyzer that displays your hard drive with clickable charts, allowing you to spot files and folders that are the most space consuming, and also get an overall idea of how your disk space is...
937.65 KB  
File Cataloguers  -  Disk Space Finder 1
Disk Space Finder helps to visualize your data that is taking up the most space on your computer. This makes it a lot easier to delete anything you no longer need and free up disk space. Disk Space Finder scans your computer to find out...
537.41 KB  
File Cataloguers  -  Disk Space Fan 2.2.7.819
Disk Space Fan is a nice disk space analysis tool for Windows. It helps you to free up disk space by quickly finding and deleting big, useless files. It displays disk space usage with a nice chart. You can navigate the folders easily with the...
1.34 MB  
Dial-up Networking Tools  -  Netwrix Disk Space Monitor 1.249.49
Free disk space on servers is a very important resource that must be proactively managed to avoid failures, lost data, and server downtime. Netwrix Disk Space Monitor is a free monitoring and alerting tool that sends e-mail to server...
1.24 MB  
Utilities  -  Disk Space Fan Free 4.0.1.74
Disk Space Fan Free is an useful disk space analysis tool for your computer. It helps you to free up disk space by quickly finding and deleting big, useless files. It displays disk space usage with a nice chart. You can navigate the folders...
 
Utilities  -  VisDir Free Disk Space Finder 1.3
This free user-friendly utility helps you visualize which programs on your hard drive are using too much disk space. It creates a navigable pie-chart visualization of the space utilization on your computer. This utility is a great helper for when...
709 KB  
Networking  -  Dashboard: Available Disk Space 1.0.3
This plugin displays you available server disk space in main Dashboard window, so you can see when you have to expand your storage plan.
40.96 KB  
Application Add-Ins  -  DAW Disk Space Calc 1.4
Calculate how much disk space needed for digital audio recording based on bit depth, sample rate, length in time, and number of tracks.
 
Video Editors  -  Video Disk Space Calculator 1.1
Video Disk Space Calculator is a free, simple application designed to calculate necessary disk space for video editors. As of version 1.1 it also can calculate length available for a specified disk size.Simply select your desired video codec,...
 
Libraries  -  Filesys::DfPortable 0.85
Filesys::DfPortable is a Perl extension for filesystem disk space information. SYNOPSIS use Filesys::DfPortable; my $ref = dfportable("C:"); # Default block size is 1, which outputs bytes if(defined($ref)) { print"Total bytes:...
7.17 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB