Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atoomic/filesys-statvfs_statfs_df
Filesys-Statvfs_Statfs_Df from backpan
https://github.com/atoomic/filesys-statvfs_statfs_df
Last synced: 5 days ago
JSON representation
Filesys-Statvfs_Statfs_Df from backpan
- Host: GitHub
- URL: https://github.com/atoomic/filesys-statvfs_statfs_df
- Owner: atoomic
- Created: 2017-04-21T15:00:17.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-05T19:54:35.000Z (over 5 years ago)
- Last Synced: 2024-11-18T19:05:04.495Z (2 months ago)
- Language: Perl
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
README
This distribution contains the modules Filesys::Statfs, Filesys::Statvfs, and Filesys::Df.
This is a new release to support some systems that only have statfs().
If you have problems with this release try using Filesys-Statvfs_Df-0.68.DESCRIPTION
Filesys::Statfs provides an interface between
Perl and the statfs() system call. This module
will only install if you are using Darwin or
certain BSD systems that dont have statvfs().SYNOPSIS Filesys::Statfs
use Filesys::Statfs;
my($ftype, $bsize, $blocks, $bfree, $files,
$ffree, $bavail) = statfs("/tmp");Filesys::Statvfs provides an interface between
Perl and the statvfs() system call.SYNOPSIS Filesys::Statvfs
use Filesys::Statvfs;
my($bsize, $frsize, $blocks, $bfree, $bavail,
$files, $ffree, $favail, $fsid, $basetype, $flag,
$namemax, $fstr) = statvfs("/tmp");Filesys::Df uses Filesys::Statvfs or
Filesys::Statfs to obtain filesystem statistics,
then creates additional filesystem information
such as percent full, user and superuser
differentials, etc ....If the system does not contain the statvfs()
call (Darwin or certain BSD OSes most likely). The
Makefile will try to use the Filesys::Statfs module
instead.Filesys::Df will also let you specify the block
size for the values you wish to see. The default
block size output is 1024 bytes per block.SYNOPSIS Filesys::Df
use Filesys::Df;
my $ref = df("/tmp"); # Default block size of 1024 bytes.
# You can specify a different block
# as a second argument.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";
print"Total Bytes", ($ref->{blocks} * 1024), "\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 installFor this module to install and work properly you will need
to have the statvfs() or statfs() system call supported
by your system.A good way to tell if your system supports them is to
to look for the sys/statvfs.h or sys/statfs.h header in your
include directory (Usually /usr/include/).If there is an error during the 'make', it is possible
that your system does not support statvfs() or statfs().
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. This also applies to statfs().During the 'make test' test.pl will use statvfs() or statfs()
to stat the root directory "/". If it fails it will report
an error, otherwise it will report all the standard
fields in the 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() call.Once installed, run 'perldoc Filesys::Df' for more information.
If you have any problems or questions please email
me at [email protected] with "Filesys Module" in
the subject line. Please include the module version
and if you are using statvfs() or statfs() on your
system.Copyright (c) 2004 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.