NAME
HPUX::FS - Perl function to handle HPUX filesystem stats
SYNOPSIS
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"
);
DESCRIPTION
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.
FUNCTION
new()
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
EXAMPLE
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'
traverse()
example method that traverses the main object.
get_all_filesystems()
returns an array refrence to and array containing all the filesystems
get_filesystem_attr( filesystem => "/dev/vg00/lvol1", attribute => "percent_used", )
returns the scalar value of the attribute requested.
CAVEATS
None known yet.
AUTHOR
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!
NAME
HPUX::FS - Perl extension for blah blah blah
SYNOPSIS
use HPUX::FS;
blah blah blah
DESCRIPTION
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.
EXPORT
None by default.
AUTHOR
A. U. Thor, <a.u.thor@a.galaxy.far.far.away>
SEE ALSO
perl.