AFS-Command
view release on metacpan or search on metacpan
lib/AFS/Command/BOS.pod view on Meta::CPAN
=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
( run in 0.769 second using v1.01-cache-2.11-cpan-39bf76dae61 )