HPUX::FS - Perl function to handle HPUX filesystem stats
use HPUX::FSInfo; my $fsinfo_data = new HPUX::FSInfo( target_type =>"local", persistance =>"new", datafile =>"/tmp/fsdata.dat", access_prog =>"ssh -1", access_system =>"localhost", access_user =>"root" );
This module takes the output from 3 different commands and query the filesystem and then hashes the results.
It utilizes the Storable module for persistance so once called you can then recall it without re-running the command and/or wait for the network by setting persistance from "new" to "old".
Remote node access is supported via remsh or ssh. ssh is highly recommended.
The main object constructor that returns the hash refrence. The keys of the hash are all the logical volumes.
It accepts the following paramters:
target_type values: local(default) or remote persistance values: new(default) or old datafile values: filename and path to presistant data file access_prog values: ssh(default) or remsh access_system values: localhost(default) or remote system name access_user values: root(default) or remote username
The value is another hash ref containing these keys :
backup_freq capture_date directory fstab kbytes kbytes_avail kbytes_used mounted options percent_used type
Here's an example of the structure returned:
$result = '/dev/vg09/lvol1' => HASH(0x404841cc) 'backup_freq' => 3 'capture_date' => 'Tue Nov 13 19:26:02 2001' 'directory' => '/data/dcomm5' 'fstab' => 'yes' 'kbytes' => 8198946 'kbytes_avail' => 7297058 'kbytes_used' => 81993 'mounted' => 'yes' 'options' => 'rw,suid' 'percent_used' => 1 'type' => 'hfs'
example method that traverses the main object.
returns an array refrence to and array containing all the filesystems
returns the scalar value of the attribute requested.
None known yet.
Christopher White <chrwhite@seanet.com>
Copyright (C) 2001 Christopher White. All rights reserved. this program is fre e software; you can redistribute it and/or modify it under the same terms as pe rl itself.
### end
1; __END__ # Below is stub documentation for your module. You better edit it!
HPUX::FS - Perl extension for blah blah blah
use HPUX::FS; blah blah blah
Stub documentation for HPUX::FS, created by h2xs. It looks like the author of the extension was negligent enough to leave the stub unedited.
Blah blah blah.
None by default.
A. U. Thor, <a.u.thor@a.galaxy.far.far.away>
perl.
To install HPUX::FS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HPUX::FS
CPAN shell
perl -MCPAN -e shell install HPUX::FS
For more information on module installation, please visit the detailed CPAN module installation guide.