AFS-Command

 view release on metacpan or  search on metacpan

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


The objects have the following attributes and methods:

B<AFS::Object::BosServer>

The following attribute is only present when "bos status" reports
inappropriate access on directories:

    Attributes			Values
    ----------			------
    access			Boolean, true indicating a potential security problem

The following methods can be used to extract the instance objects:

    Methods			Returns
    -------			-------
    getInstanceNames()		list of instance names
    getInstances()		list of AFS::Object::Instance objects
    getInstance($name)		one AFS::Object::Instance object for the instance $name

B<AFS::Object::Instance>

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

    my $errors = 0;

    $errors++ unless $self->_exec_cmds();

    my @servers = ();

    while ( defined($_ = $self->{handle}->getline()) ) {

	chomp;

	if ( /The current down server probe interval is (\d+) secs/ ) {
	    $result->_setAttribute( interval => $1 );
	}

	if ( /These servers are still down:/ ) {
	    while ( defined($_ = $self->{handle}->getline()) ) {
		s/^\s+//g;
		s/\s+$//g;
		push(@servers,$_);
	    }
	}

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

=head2 checkservers

=over

=item Arguments

The fs help string is:

    fs checkservers: check local cell's servers
    Usage: fs checkservers [-cell <cell to check>] [-all] [-fast]
			   [-interval <seconds between probes>]
    Where: -all   check all cells
	   -fast  just list, don't check

The corresponding method invocation looks like:

    my $result = $fs->checkservers
      (
       # Optional arguments
       cell			=> $cell,
       interval			=> $interval,

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

    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

lib/AFS/Command/VOS.pm  view on Meta::CPAN

			my $stats = AFS::Object->new
			  (
			   same			=> $same,
			   diff			=> $diff,
			  );

			$raw->_setAttribute( $class	=> $stats );

		    }

		    $int = '0sec' 		if /^0-60 sec/;
		    $int = '1min' 		if /^1-10 min/;
		    $int = '10min' 		if /^10min-1hr/;
		    $int = '1hr' 		if /^1hr-1day/;
		    $int = '1day' 		if /^1day-1wk/;
		    $int = '1wk' 		if /^> 1wk/;

		    if ( $int ) {

			my $file = AFS::Object->new
			  (

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

       localauth                => 1,
       verbose                  => 1,
       encrypt                  => 1,
       # Enhanced arguments
       gzip			=> $gzip,
       bzip2			=> $bzip2,
       filterout		=> [ @command ], # OR [ [ @cmd1 ], [ @cmd2 ], ... ]
      );

The first thing to notice is that 'file' is optional to the vos dump
command itself, but required in this API.  The second thing to notice
is the addition of three new arguments: gzip, bzip2 and filterout.

=over

=item file

This argument specifies the file to which the vos dump output should
be written.  If this file ends in '.gz' or '.bz2', then gzip or bzip2
will be used to compress the output before it is written to the
filesystem.  This is accomplished using a pipe, so there is no

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


    Attributes			Values
    ----------			------
    total			Numeric value
    auth			Numeric value

The 'author' object has the following attributes:

    Attributes			Values
    ----------			------
    0sec			Generic AFS::Object object
    1min			Generic AFS::Object object
    10min			Generic AFS::Object object
    1hr				Generic AFS::Object object
    1day			Generic AFS::Object object
    1wk				Generic AFS::Object object

Each of the above interval value objects has the following attributes:

    Attributes			Values
    ----------			------

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

	      |----------|----------|----------|----------|
    Reads     |      162 |      162 |        6 |        6 |
    Writes    |     1815 |     1815 |        0 |        0 |
	      |-------------------------------------------|
		       Writes Affecting Authorship
	      |-------------------------------------------|
	      |   File Authorship   | Directory Authorship|
	      |----------|----------|----------|----------|
	      |   Same   |   Diff   |    Same  |   Diff   |
	      |----------|----------|----------|----------|
    0-60 sec  |      226 |        0 |      621 |        0 |
    1-10 min  |       87 |        0 |      105 |        0 |
    10min-1hr |       42 |        0 |       44 |        0 |
    1hr-1day  |       18 |        0 |        6 |        0 |
    1day-1wk  |        0 |        0 |        0 |        0 |
    > 1wk     |        1 |        0 |        0 |        0 |
	      |-------------------------------------------|

Since attributes can most easily be accessed by calling the method of
the same name, one can easily dig into the hierarchy as follows:

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

       localauth                => 1,
       verbose                  => 1,
       encrypt                  => 1,
      );

=head2 offline

The vos help string is:

    Usage: vos offline -server <server name> -partition <partition name>
 		       -id <volume name or ID> [-sleep <seconds to sleep>]
                       [-busy] [-cell <cell name>]
 		       [-noauth] [-localauth] [-verbose] [-encrypt]

The corresponding method invocation looks like:

    my $result = $vos->offline
      (
       # Required arguments
       id			=> $id,
       server			=> $server,



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