AFS-Command
view release on metacpan or search on metacpan
lib/AFS/Command/FS.pod view on Meta::CPAN
);
=item Return Values
This method returns an AFS::Object::CacheManager object which contains
one or more AFS::Object::Cell objects.
my $result = $fs->getcellstatus
(
cell => [ $cell1 , $cell2 ],
) || die $fs->errors();
foreach my $cellobj ( $result->getCells() ) {
my $cell = $cellobj->cell();
if ( $cellobj->status() ) {
print("This client allows setuid binaries from cell '$cell'\n";
} else {
print("This client does NOT allow setuid binaries from cell '$cell'\n";
}
}
The objects have the following attributes and methods:
B<AFS::Object::CacheManager>
Methods Returns
------- -------
getCellNames() list of cell names
getCells() list of AFS::Object::Cell objects
getCell($cell) the AFS::Object::Cell object for cell $cell
B<AFS::Object::Cell>
Attributes Values
---------- ------
cell AFS cell name
status Boolean, true indicating setuid/gid bits are allowed,
false indicating they are not
=back
=head2 getclientaddrs
=over
=item Arguments
The fs help string is:
fs getclientaddrs: get client network interface addresses
Usage: fs getclientaddrs
The corresponding method invocation looks like:
my $result = $fs->getclientaddrs();
=item Return Values
This method returns an AFS::Object::CacheManager object with one attribute.
my $result = $fs->getclientaddrs() || die $fs->errors();
print "This client has the following addressed configured for AFS:\n";
foreach my $address ( @{$result->addresses()} ) {
print "\t$address\n";
}
The object has the following attribute:
B<AFS::Object::CacheManager>
Attributes Values
---------- ------
addresses ARRAY reference of IP addresses
=back
=head2 getcrypt
=over
=item Arguments
The fs help string is:
fs getcrypt: set cache manager encryption flag
Usage: fs getcrypt
The corresponding method invocation looks like:
my $result = $fs->getcrypt();
=item Return Values
This method returns an AFS::Object::CacheManager object with one attribute.
my $result = $fs->getcrypt() || die $fs->errors();
print "This client has encryption turned " . ( $result->crypt() ? "on" : "off" ) . "\n";
The object has the following attribute:
B<AFS::Object::CacheManager>
Attributes Values
---------- ------
crypt Boolean, indicating whether or not encryption is enabled
=back
=head2 getserverprefs
=over
=item Arguments
The fs help string is:
fs getserverprefs: get server ranks
Usage: fs getserverprefs [-file <output to named file>] [-numeric] [-vlservers]
Where: -numeric addresses only
-vlservers VL servers
The corresponding method invocation looks like:
lib/AFS/Command/FS.pod view on Meta::CPAN
negative).
my $result = $fs->listacl
(
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 $type ( qw( normal negative ) ) {
my $acl = $pathobj->getACL($type);
my %entries = $acl->getEntries();
foreach my $principal ( keys %entries ) {
my $rights = $acl->getRights($principal);
print "$type rights for $principal are $rights\n";
}
}
}
}
The objects have 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>
Methods Returns
------- -------
getACLNormal() the AFS::Object::ACL object for the normal rights
getACLNegative() the AFS::Object::ACL object for the negative rights
getACL($type) the AFS::Object::ACL object for rights of type $type,
where $type is either 'normal' or 'negative'
B<AFS::Object::ACL>
Methods Returns
------- -------
getPrincipals() a list of the principals (users, groups) on the ACL
getRights($principal) the rights (permissions) of the specified $principal
getEntries() a list of key/value pairs, where the keys are the principals,
and the values are the rights for that principal
=back
=head2 listaliases
=over
=item Arguments
The fs help string is:
fs listaliases: list configured cell aliases
Usage: fs listaliases
The corresponding method invocation looks like:
my $result = $fs->listaliases();
=item Return Values
This method returns an AFS::Object::CacheManager object, which
contains one or more AFS::Object::Cell objects.
my $result = $fs->listaliases() || die $fs->errors();
foreach my $cellobj ( $result->getCells() ) {
my $cell = $cellobj->cell();
my $alias = $cellobj->alias();
print "Cell '$cell' has alias '$alias'\n";
}
The objects have the following attributes and methods:
B<AFS::Object::CacheManager>
Methods Returns
------- -------
getCellNames() list of cell names
getCells() list of AFS::Object::Cell objects
getCell($cell) the AFS::Object::Cell object for cell $cell
B<AFS::Object::Cell>
Attributes Values
---------- ------
cell AFS cell name
alias Alias name for this cell
=back
=head2 listcells
=over
=item Arguments
The fs help string is:
fs listcells: list configured cells
Usage: fs listcells [-numeric]
Where: -numeric addresses only
The corresponding method invocation looks like:
my $result = $fs->listcells
(
# Optional arguments
numeric => 1,
);
=item Return Values
This method returns an AFS::Object::CacheManager object, which
contains one or more AFS::Object::Cell objects.
my $result = $fs->listcells() || die $fs->errors();
foreach my $cellobj ( $result->getCells() ) {
my $servers = $cellobj->servers();
print "Cell $cell has servers " . join(" ",@$servers) . "\n";
}
The objects have the following attributes and methods:
B<AFS::Object::CacheManager>
Methods Returns
------- -------
getCellNames() list of cell names
getCells() list of AFS::Object::Cell objects
getCell($cell) the AFS::Object::Cell object for cell $cell
B<AFS::Object::Cell>
Attributes Values
---------- ------
cell AFS cell name
servers ARRAY reference of strings, each of which is
the hostname of a server
=back
=head2 listquota
=over
=item Arguments
The fs help string is:
fs listquota: list volume quota
Usage: fs listquota [-path <dir/file path>+]
The corresponding method invocation looks like:
my $result = $fs->listquota
(
# Optional arguments
path => $path, # OR [ $path1, $path2, ... ]
);
lib/AFS/Command/FS.pod view on Meta::CPAN
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>+]
The corresponding method invocation looks like:
my $result = $fs->whereis
(
# Optional arguments
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->whereis
(
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' is on hosts " . join(" ,",@{pathobj->hosts()}) . "\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
lib/AFS/Command/FS.pod view on Meta::CPAN
# Optional arguments
path => $path, # OR [ $path1, $path2, ... ]
);
=head2 flushvolume
The fs help string is:
fs flushvolume: flush all data in volume
Usage: fs flushvolume [-path <dir/file path>+]
The corresponding method invocation looks like:
my $result = $fs->flushvolume
(
# Optional arguments
path => $path, # OR [ $path1, $path2, ... ]
);
=head2 messages
The fs help string is:
fs messages: control Cache Manager messages
Usage: fs messages [-show <[user|console|all|none]>]
The corresponding method invocation looks like:
my $result = $fs->messages
(
# Optional arguments
show => $show,
);
=head2 mkmount
The fs help string is:
fs mkmount: make mount point
Usage: fs mkmount -dir <directory> -vol <volume name> [-cell <cell name>] [-rw] [-fast]
Where: -rw force r/w volume
-fast don't check name with VLDB
The corresponding method invocation looks like:
my $result = $fs->mkmount
(
# Required arguments
dir => $dir,
vol => $vol,
# Optional arguments
cell => $cell,
rw => 1,
fast => 1,
);
=head2 newalias
The fs help string is:
fs newalias: configure new cell alias
Usage: fs newalias -alias <alias name> -name <real name of cell>
The corresponding method invocation looks like:
my $result = $fs->newalias
(
# Required arguments
alias => $alias,
name => $name,
);
=head2 newcell
The fs help string is:
fs newcell: configure new cell
Usage: fs newcell -name <cell name> -servers <primary servers>+
[-linkedcell <linked cell name>]
The corresponding method invocation looks like:
my $result = $fs->newcell
(
# Required arguments
name => $name,
servers => $server, # OR [ $server1, $server2, ... ]
# Optional arguments
linkedcell => $linkedcell,
);
=head2 rmmount
The fs help string is:
fs rmmount: remove mount point
Usage: fs rmmount -dir <directory>+
The corresponding method invocation looks like:
my $result = $fs->rmmount
(
# Required arguments
dir => $dir, # OR [ $dir1, $dir2, ... ]
);
=head2 rxstatpeer
The fs help string is:
fs rxstatpeer: Manage per peer RX statistics
Usage: fs rxstatpeer [-enable] [-disable] [-clear]
Where: -enable Enable RX stats
-disable Disable RX stats
-clear Clear RX stats
The corresponding method invocation looks like:
my $result = $fs->rxstatpeer
(
# Optional arguments
enable => 1,
disable => 1,
clear => 1,
);
=head2 rxstatproc
The fs help string is:
fs rxstatproc: Manage per process RX statistics
Usage: fs rxstatproc [-enable] [-disable] [-clear]
Where: -enable Enable RX stats
-disable Disable RX stats
-clear Clear RX stats
The corresponding method invocation looks like:
( run in 2.798 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )