Sun Microsystems V40Z Server User Manual


 
Chapter 4 Further Management Information 61
Guidelines for Writing Server Management
Command Scripts
This section describes some basic guidelines for managing your systems by writing
scripts for remote execution on one or more SPs.
Shell Scripts: You should be familiar with standard shell scripting. Refer to
“Using Shell Scripts” on page 56.
SSH: You must currently use an SSH (Secure Shell) client to execute automated
command scripts. Refer to “Remote Scripting Using SSH” on page 56.
Authentication: To avoid being prompted each time you run a script on an SP,
upload a public key or trusted host key to each SP. Refer to “Creating Trusted
Host Relationships” on page 58 and “Adding Public Keys” on page 58.
Authorization Levels: Access changes (such as adding users or uploading keys)
typically requires manager-level access while most other management tasks can
be performed by an administrator level user.
Return Codes: Every subcommand returns a return code upon completion.
Nowait Argument: Most commands complete their execution fairly quickly and
are therefore performed synchronously. For some longer operations (such as
rebooting the platform) a --nowait option is provided so that a script can
initiate the operation without waiting for it to return.
Quiet Argument: The delete and update operations (such as access delete
user, sp delete event) accept multiple targets. To ensure a certain set of
targets is deleted on a set of SPs, you can use the --quiet argument to suppress
errors if one of the targets is not found, or to suppress interactive warning
messages from the platform command.
Command Output
The following list defines common general output:
Commands that complete successfully return 0 with no success return string.
Some exceptions are commands that also return vital information.
Table output, interactive warnings, and any other non-error messages are directed
to standard output.
Commands that return errors display the return codes and a descriptive error
string.
Following are common characteristics of table output from a get command:
Heading columns are provided by default for output with more than one column.
Single column output does not include a heading.
To suppress headings, use the -H argument.