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 attributes.

    my $result = $fs->checkservers() || die $fs->errors();
    my @servers = $result->servers();
    foreach my $server ( @servers ) {
        print "Server $server appears to be down\n";
    }

The object has the following attributes:

    Attributes			Values
    ----------			------
    servers			ARRAY reference of strings, each of which is
				the hostname of a server which is down
    interval			The value of the probe interval, in seconds

Note that the interval attribute is only present of the internal
argument was specified, and the servers list will be empty if nothing
was down.

=back

=head2 diskfree

=over

=item Arguments

The fs help string is:

    fs diskfree: show server disk space usage
    Usage: fs diskfree [-path <dir/file path>+]

The corresponding method invocation looks like:

    my $result = $fs->diskfree
      (
       # 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->diskfree
      (
       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 used total avail percent ) ) {
		print "Path '$path' has '$attr' of '" . $pathobj->$attr() . "'\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
    volname			The AFS volume name that contains the pathname
    total			The size (in KB) of the partition that contains 'volname'
    used			The amount of space (in KB) used on that partition
    avail			The amount of space (in KB) available on that partition
    percent			The amount of space used, as a percentage

=back

=head2 examine

=over

=item Arguments

The fs help string is:

    fs examine: display volume status
    Usage: fs examine [-path <dir/file path>+]

The corresponding method invocation looks like:

    my $result = $fs->examine
      (
       # 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->examine
      (
       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( id volname quota used avail total ) ) {
		print "Path '$path' has '$attr' of '" . $pathobj->$attr() . "'\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
    ----------			------

lib/AFS/Command/FS.pod  view on Meta::CPAN

	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, ... ]
      );

=item Return Values

=back

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->listquota
      (
       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>

    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
    volname			The AFS volume name that contains the pathname
    quota			Volume quota, in KB
    used			The amount of space (in KB) used in that volume
    percent			The percentage of the allocated quota in use
    partition			The percentage of space used on the partition where the volume resides

=head2 lsmount

=over

=item Arguments

The fs help string is:

    fs lsmount: list mount point
    Usage: fs lsmount -dir <directory>+

The corresponding method invocation looks like:

    my $result = $fs->lsmount
      (
       # Required arguments
       dir			=> $dir, # OR [ $dir1, $dir2, ... ]
      );

=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->lsmount
      (
       dir			=> [ $dir1, $dir2 ],
      ) || 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 {
            my $volname = $pathobj->volname();
            my $cell = $pathobj->cell();
            print("Path '$path' is a mtpt for volume $volname" .
                  ( $cell ? ", in cell '$cell'\n" : "\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


=item Arguments

The fs help string is:

    fs quota: show volume quota usage
    Usage: fs quota [-path <dir/file path>+]

The corresponding method invocation looks like:

    my $result = $fs->quota
      (
       # 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->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



( run in 0.730 second using v1.01-cache-2.11-cpan-39bf76dae61 )