AFS-Command
view release on metacpan or search on metacpan
lib/AFS/Command/FS.pod view on Meta::CPAN
path => $path, # OR [ $path1, $path2, ... ]
);
=item Return Values
This method returns an AFS::Object::CacheManager object, which
contains one or more AFS::Object::Path objects, one for each path
specified in the arguments.
my $result = $fs->quota
(
path => [ $afspath, $ufspath, $boguspath ],
) || die $fs->errors();
foreach my $pathobj ( $result->getPaths() ) {
my $path = $pathobj->path();
if ( $pathobj->hasAttribute('error') ) {
print "Path '$path' has errors '" . $pathobj->error() . "'\n";
} else {
print "Path '$path' has quota '" . $pathobj->quota() . "'\n";
}
}
Each of these objects has the following attributes and methods:
B<AFS::Object::CacheManager>
Methods Returns
------- -------
getPathNames() list of strings, each of which is a single pathname
getPaths() list of AFS::Object::Path objects, one for each path
getPath($pathname) a single AFS::Object::Path object, for the pathname $pathname
B<AFS::Object::Path>
If errors were encountered for any given path, then its object will
have the following attributes:
Attributes Values
---------- ------
path The pathname
error The error string for that path
If no errors were encountered, then the following attributes will be present:
Attributes Values
---------- ------
path The pathname
quota The percentage of the allocated quota in use
=back
=head2 storebehind
=over
=item Arguments
The fs help string is:
fs storebehind: store to server after file close
Usage: fs storebehind [-kbytes <asynchrony for specified names>]
[-files <specific pathnames>+] [-allfiles <new default (KB)>]
[-verbose]
Where: -verbose show status
The corresponding method invocation looks like:
my $result = $fs->storebehind
(
# Optional arguments
kbytes => $kbytes,
files => $file, # OR [ $file1, $file2, ... ]
allfiles => $default,
verbose => 1,
);
=item Return Values
This method returns an AFS::Object::CacheManager object, which
contains one or more AFS::Object::Path objects, one for each path
specified in the arguments.
my $result = $fs->quota
(
path => [ $afspath, $ufspath, $boguspath ],
) || die $fs->errors();
foreach my $pathobj ( $result->getPaths() ) {
my $path = $pathobj->path();
if ( $pathobj->hasAttribute('error') ) {
print "Path '$path' has errors '" . $pathobj->error() . "'\n";
} else {
foreach my $attr ( qw( volname quota used percent partition ) ) {
print "Path '$path' has '$attr' of '" . $pathobj->$attr() . "'\n";
}
}
}
Each of these objects has the following attributes and methods:
B<AFS::Object::CacheManager>
Attributes Values
---------- ------
asynchrony Default value (in KB) of asynchronous writes
Methods Returns
------- -------
getPathNames() list of strings, each of which is a single pathname
getPaths() list of AFS::Object::Path objects, one for each path
getPath($pathname) a single AFS::Object::Path object, for the pathname $pathname
B<AFS::Object::Path>
If errors were encountered for any given path, then its object will
have the following attributes:
Attributes Values
---------- ------
path The pathname
error The error string for that path
If no errors were encountered, then the following attributes will be present:
Attributes Values
---------- ------
path The pathname
asynchrony The number of KB of asynchronous writes for this file
=back
=head2 sysname
=over
=item Arguments
The fs help string is:
fs sysname: get/set sysname (i.e. @sys) value
Usage: fs sysname [-newsys <new sysname>+]
The corresponding method invocation looks like:
my $result = $fs->sysname
(
# Optional arguments
newsys => $sysname, # OR [ $sysname1, $sysname2, ... ]
);
=item Return Values
This method returns an AFS::Object::CacheManager object which has one
of two possible attributes.
my $result = $fs->sysname() || die $fs->errors();
my $sysname = $result->sysname();
my $sysnames = $result->sysnames();
print "This client has a primary sysname of '$sysname'\n";
if ( ref $sysnames eq 'ARRAY' ) {
print "This client has a list of sysnames: " . join(" ,",@$sysnames) . "\n";
}
The object has the following attributes:
B<AFS::Object::CacheManager>
Attributes Values
---------- ------
sysname The primary sysname of the client
sysnames An ARRAY reference of sysnames
NOTE: When a list of sysnames has been configured on the client, then
the 'sysname' attribute is simnply the first one in the list.
=back
=head2 whereis
=over
=item Arguments
The fs help string is:
fs whereis: list file's location
Usage: fs whereis [-path <dir/file path>+]
( run in 0.876 second using v1.01-cache-2.11-cpan-2e0ccfb7a10 )