AFS-Command

 view release on metacpan or  search on metacpan

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


=head2 listusers

=over

=item Arguments

The bos help string is:

    bos listusers: list super-users
    Usage: bos listusers -server <machine name> [-cell <cell name>]
			 [-noauth] [-localauth]

The corresponding method invocation looks like:

    my $result = $bos->listusers
      (
       # Required arguments
       server			=> $server,
       # Optional arguments
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=item Return Values

This method returns an AFS::Object::BosServer object, which
contains one attribute.

    my $result = $bos->listusers
      (
       server			=> $server,
       cell			=> $cell,
      ) || die $bos->errors();
    my $users = $result->susers();
    print "Server $server in cell $cell has users:\n"
    foreach my $user ( @$users ) {
        print "\t$user\n";
    }

The object has the following attribute:

B<AFS::Object::BosServer>

    Attributes			Values
    ----------			------
    susers			ARRAY reference of super user names

=back

=head2 status

=over

=item Arguments

The bos help string is:

    bos status: show server instance status
    Usage: bos status -server <machine name> [-instance <server process name>+]
		      [-long] [-cell <cell name>] [-noauth] [-localauth]
    Where: -long       long status

The corresponding method invocation looks like:

    my $result = $bos->status
      (
       # Required arguments
       server			=> $server,
       # Optional arguments
       instance			=> $instance, # OR [ $inst1, $inst2, ... ],
       cell			=> $cell,
       long			=> 1,
       noauth			=> 1,
       localauth		=> 1,
      );

=item Return Values

This method returns an AFS::Object::BosServer object, which
contains one optional attribute, and one or more
AFS::Object::Instance objects, each of which represents a
single instance of a bosserver managed process on the server.

    my $result = $bos->status
      (
       server			=> $server,
       long				=> 1,
      ) || die $bos->errors();
    foreach my $instanceobj ( $result->getInstances() ) {
	my $instance		= $instanceobj->instance();
	my $status			= $instanceobj->status();
	print "Instance $instance has status $status\n";
	foreach my $commandobj ( $instance->getCommands() ) {
	    my $index		= $commandobj->index();
	    my $command		= $commandobj->command();
	    print "\tCmd $index is '$command'\n";
	}
    }

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>

The following attributes are always present:

    Attributes			Values
    ----------			------
    instance			Name of the instance
    status			Status string (running normally, shutdown, etc.)

The following attribute is always present is the instance is of type
'cron':

    Attributes			Values
    ----------			------
    auxiliary			Auxiliary status (date the next execution)

The following attributes are always available when the 'long' argument
is specified:

    Attributes			Values
    ----------			------
    type			"cron", "simple", or "fs"
    startdate			Date when the process was last started
    startcount			Number of times the process has started,
				since the bosserver was started
    exitdate			Date when the process last exited

The following attributes are optionally available, depending on the
state of the instance, when the 'long' argument is specified:

    Attributes			Values
    ----------			------
    notifier			Path to the notifier application for this instance
    state			"temporarily disabled", or "disabled", or "temporarily enabled"
    errorstop			Boolean, indicating the process was
				"stopped for too many errors"
    core			Boolean, indicating the instance has a core file
    errorexitdate		Date when the process last exited with an error
    errorexitdue		"shutdown", or "signal", or "code" (present only when
				"errorexitdate" attribute is present)
    errorexitsignal		Signal that cause the error exit (present only when
				"errorexitdue" eq "signal")
    errorexitcode		Exit code from last error exit (present only when
				"errorexitdue" eq "code")

The following methods can be used to extract the command objects,
which are also only present when the 'long' argument is specified.

    Methods			Returns
    -------			-------
    getCommandIndexes()		list of numeric indexes for the commands
    getCommands()		list of AFS::Object objects for all commands
    getCommand($index)		the AFS::Object object for the command with index $index

B<AFS::Object> (Commands)

The following pair of attributes are always present:

    Attributes			Values
    ----------			------
    index			Numerical index of the command
    command			Command string

=back

=head1 METHODS (with simple return values)

All of the following commands return a simple Boolean (true/false)
value, if they succeed or fail.

=head2 addhost

The bos help string is:

    bos addhost: add host to cell dbase
    Usage: bos addhost -server <machine name> -host <host name>+
		       [-clone] [-cell <cell name>] [-noauth] [-localauth]
    Where: -clone      vote doesn't count

The corresponding method invocation looks like:

    my $result = $bos->addhost
      (
       # Required arguments
       server			=> $server,
       host			=> $host, # OR [ $host1, $host2, ... ]
       # Optional arguments
       clone			=> 1,
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 addkey

The bos help string is:

    bos addkey: add keys to key dbase (kvno 999 is bcrypt)

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

The corresponding method invocation looks like:

    my $result = $bos->addkey
      (
       # Required arguments
       server			=> $server,
       kvno			=> $kvno,
       # Optional arguments
       key			=> $key,
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 adduser

The bos help string is:

    bos adduser: add users to super-user list
    Usage: bos adduser -server <machine name> -user <user names>+
		       [-cell <cell name>] [-noauth] [-localauth]

The corresponding method invocation looks like:

    my $result = $bos->adduser
      (
       # Required arguments
       server			=> $server,
       user			=> $user, # OR [ $user1, $user2, ... ]
       # Optional arguments
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 blockscanner

The bos help string is:

    bos blockscanner: block scanner daemon from making migration requests
    Usage: bos blockscanner -server <machine name> [-cell <cell name>]
			    [-noauth] [-localauth]

The corresponding method invocation looks like:

    my $result = $bos->blockscanner
      (
       # Required arguments
       server			=> $server,
       # Optional arguments
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 create

The bos help string is:

    bos create: create a new server instance
    Usage: bos create -server <machine name> -instance <server process name>
		      -type <server type> -cmd <command lines>+ [-notifier <Notifier program>]
		      [-cell <cell name>] [-noauth] [-localauth]

The corresponding method invocation looks like:

    my $result = $bos->create
      (
       # Required arguments
       server			=> $server,
       instance			=> $instance,
       type			=> $type,
       cmd			=> $cmd, # OR [ $cmd1, $cmd2, ... ]
       # Optional arguments
       notifier			=> $notifier,
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 delete

The bos help string is:

    bos delete: delete a server instance
    Usage: bos delete -server <machine name> -instance <server process name>+
		      [-cell <cell name>] [-noauth] [-localauth]

The corresponding method invocation looks like:

    my $result = $bos->delete
      (
       # Required arguments
       server			=> $server,
       instance			=> $instance, # OR [ $inst1, $inst2, ... ]
       # Optional arguments
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 exec

The bos help string is:

    bos exec: execute shell command on server
    Usage: bos exec -server <machine name> -cmd <command to execute>
		    [-cell <cell name>] [-noauth] [-localauth]

The corresponding method invocation looks like:

    my $result = $bos->exec
      (
       # Required arguments
       server			=> $server,
       cmd			=> $cmd,
       # Optional arguments
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 install

The bos help string is:

    bos install: install program
    Usage: bos install -server <machine name> -file <files to install>+
		       [-dir <destination dir>] [-cell <cell name>] [-noauth] [-localauth]

The corresponding method invocation looks like:

    my $result = $bos->install
      (
       # Required arguments
       server			=> $server,
       file			=> $file, # OR [ $file1, $file2, ... ]
       # Optional arguments
       dir			=> $dir,
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 prune

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


The corresponding method invocation looks like:

    my $result = $bos->removehost
      (
       # Required arguments
       server			=> $server,
       host			=> $host, # OR [ $host1, $host2, ... ]
       # Optional arguments
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 removekey

The bos help string is:

    bos removekey: remove keys from key dbase
    Usage: bos removekey -server <machine name> -kvno <key version number>+
			 [-cell <cell name>] [-noauth] [-localauth]

The corresponding method invocation looks like:

    my $result = $bos->removekey
      (
       # Required arguments
       server			=> $server,
       kvno			=> $kvno, # OR [ $kvno1, $kvno2, ... ]
       # Optional arguments
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 removeuser

The bos help string is:

    bos removeuser: remove users from super-user list
    Usage: bos removeuser -server <machine name> -user <user names>+
			  [-cell <cell name>] [-noauth] [-localauth]

The corresponding method invocation looks like:

    my $result = $bos->removeuser
      (
       # Required arguments
       server			=> $server,
       user			=> $user, # OR [ $user1, $user2, ... ]
       # Optional arguments
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 restart

The bos help string is:

    bos restart: restart processes
    Usage: bos restart -server <machine name> [-instance <instances>+] [-bosserver]
		       [-all] [-cell <cell name>] [-noauth] [-localauth]
    Where: -bosserver  restart bosserver
	   -all        restart all processes

The corresponding method invocation looks like:

    my $result = $bos->restart
      (
       # Required arguments
       server			=> $server,
       # Optional arguments
       instance			=> $instance, # OR [ $inst1, $inst2, ... ]
       bosserver		=> 1,
       all			=> 1,
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 salvage

The bos help string is:

    bos salvage: salvage partition or volumes
    Usage: bos salvage -server <machine name> [-partition <salvage partition>]
		       [-volume <salvage volume number or volume name>]
		       [-file <salvage log output file>] [-all] [-showlog]
		       [-parallel <# of max parallel partition salvaging>]
		       [-tmpdir <directory to place tmp files>]
		       [-orphans <ignore | remove | attach>] [-debug] [-nowrite]
		       [-force] [-oktozap] [-rootfiles] [-salvagedirs] [-blockreads]
		       [-ListResidencies] [-SalvageRemote] [-SalvageArchival]
		       [-IgnoreCheck] [-ForceOnLine] [-UseRootDirACL]
		       [-TraceBadLinkCounts] [-DontAskFS] [-LogLevel <(MR-AFS) log level>]
		       [-rxdebug] [-cell <cell name>] [-noauth] [-localauth]
    Where: -all                 salvage whole server
	   -showlog             display salvage log
	   -debug               (MR-AFS) Run in Debugging mode
	   -nowrite             (MR-AFS) Run readonly/test mode
	   -force               (MR-AFS) Force full salvaging
	   -oktozap             (MR-AFS) Give permission to destroy bogus file residencies/volumes - debugging flag
	   -rootfiles           (MR-AFS) Show files owned by root - debugging flag
	   -salvagedirs         (MR-AFS) Force rebuild/salvage of all directories
	   -blockreads          (MR-AFS) Read smaller blocks to handle IO/bad blocks
	   -ListResidencies     (MR-AFS) Just list affected file residencies - debugging flag
	   -SalvageRemote       (MR-AFS) Salvage storage systems that are not directly attached
	   -SalvageArchival     (MR-AFS) Salvage HSM storage systems
	   -IgnoreCheck         (MR-AFS) Don't perform VLDB safety check when deleting unreferenced files.
					 Only a good idea in single server cell.
	   -ForceOnLine         (MR-AFS) Force the volume to come online, even if it hasn't salvaged cleanly.
	   -UseRootDirACL       (MR-AFS) Use the root directory ACL for lost+found directory if it is created.
	   -TraceBadLinkCounts  (MR-AFS) Print out lines about volume reference count changes.
	   -DontAskFS           (MR-AFS) Don't ask fileserver to take volume offline.  THIS IS VERY DANGEROUS.
	   -rxdebug             (MR-AFS) Write out rx debug information.

The corresponding method invocation looks like:

    my $result = $bos->salvage
      (
       # Required arguments
       server			=> $server,
       # Optional arguments
       partition		=> $partition,

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

       # Required arguments
       server			=> $server,
       authrequired		=> $authrequired,
       # Optional arguments
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 setcellname

The bos help string is:

    bos setcellname: set cell name
    Usage: bos setcellname -server <machine name> -name <cell name>
			   [-cell <cell name>] [-noauth] [-localauth]

The corresponding method invocation looks like:

    my $result = $bos->setcellname
      (
       # Required arguments
       server			=> $server,
       name			=> $name,
       # Optional arguments
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 setrestart

The bos help string is:

    bos setrestart: set restart times
    Usage: bos setrestart -server <machine name> -time <time to restart server>
			  [-general] [-newbinary] [-cell <cell name>]
			  [-noauth] [-localauth]
    Where: -general    set general restart time
	   -newbinary  set new binary restart time

The corresponding method invocation looks like:

    my $result = $bos->setrestart
      (
       # Required arguments
       server			=> $server,
       time			=> $time,
       # Optional arguments
       general			=> 1,
       newbinary		=> 1,
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 shutdown

The bos help string is:

    bos shutdown: shutdown all processes
    Usage: bos shutdown -server <machine name> [-instance <instances>+]
			[-wait] [-cell <cell name>] [-noauth] [-localauth]
    Where: -wait       wait for process to stop

The corresponding method invocation looks like:

    my $result = $bos->shutdown
      (
       # Required arguments
       server			=> $server,
       # Optional arguments
       instance			=> $instance, # OR [ $inst1, $inst2, ... ]
       wait			=> 1,
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 start

The bos help string is:

    bos start: start running a server
    Usage: bos start -server <machine name> -instance <server process name>+
		     [-cell <cell name>] [-noauth] [-localauth]

The corresponding method invocation looks like:

    my $result = $bos->start
      (
       # Required arguments
       server			=> $server,
       # Optional arguments
       instance			=> $instance, # OR [ $inst1, $inst2, ... ]
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 startup

The bos help string is:

    bos startup: start all processes
    Usage: bos startup -server <machine name> [-instance <instances>+]
		       [-cell <cell name>] [-noauth] [-localauth]

The corresponding method invocation looks like:

    my $result = $bos->startup
      (
       # Required arguments
       server			=> $server,
       # Optional arguments
       instance			=> $instance, # OR [ $inst1, $inst2, ... ]
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 stop

The bos help string is:

    bos stop: halt a server instance
    Usage: bos stop -server <machine name> -instance <server process name>+
		    [-wait] [-cell <cell name>] [-noauth] [-localauth]
    Where: -wait       wait for process to stop

The corresponding method invocation looks like:

    my $result = $bos->stop
      (
       # Required arguments
       server			=> $server,
       instance			=> $instance, # OR [ $inst1, $inst2, ... ]
       # Optional arguments
       wait			=> 1,
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 unblockscanner

The bos help string is:

    bos unblockscanner: allow scanner daemon to make migration requests again
    Usage: bos unblockscanner -server <machine name>
			      [-cell <cell name>] [-noauth] [-localauth]

The corresponding method invocation looks like:

    my $result = $bos->unblockscanner
      (
       # Required arguments
       server			=> $server,
       # Optional arguments
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head2 uninstall

The bos help string is:

bos uninstall: uninstall program
Usage: bos uninstall -server <machine name> -file <files to uninstall>+
                     [-dir <destination dir>] [-cell <cell name>] [-noauth] [-localauth]

The corresponding method invocation looks like:

    my $result = $bos->uninstall
      (
       # Required arguments
       server			=> $server,
       file			=> $file, # OR [ $file1, $file2, ... ]
       # Optional arguments
       dir			=> $dir,
       cell			=> $cell,
       noauth			=> 1,
       localauth		=> 1,
      );

=head1 SEE ALSO

AFS::Command(1), AFS::Object(1)



( run in 2.338 seconds using v1.01-cache-2.11-cpan-6aa56a78535 )