Purpose
defhsd - Designates a node as either having or using a hashed shared disk.
Syntax
defhsd hsd_name {protect_lvcb | not_protect_lvcb} stripe_size vsd_name...
Flags
None.
Operands
Description
The defhsd command is used to specify the hsd_name, stripe size and underlying virtual shared disks for the new hashed shared disk.
You can use the System Management Interface Tool (SMIT) to run this command. To use SMIT, enter:
smit vsd_data
and select the Define a Hashed Shared Disk option.
Security
You must be in the AIX bin group and have write access to the SDR to run this command.
Prerequisite Information
PSSP: Managing Shared Disks
Location
/usr/lpp/csd/bin/defhsd
Related Information
Commands: hsdatalst, undefhsd, updatehsd
Refer to PSSP: Managing Shared Disks for information on tuning IBM Virtual Shared Disk performance and sequence numbers.
Examples
The following example adds SDR information indicating a stripe size of 32768, composed of vsd.vsdn101, vsd.vsdn201, and the name hsd1 is defined.
defhsd hsd1 protect_lvcb 32768 vsd.vsdn101 vsd.vsdn201
Purpose
defvsd - Designates a node as either having or using a virtual shared disk.
Syntax
defvsd logical_volume_name global_group_name vsd_name [nocache | cache]
Flags
None.
Operands
|The cache option should only be used if the using application |gains performance by avoiding a 4KB read immediately after a 4KB write. |Refer to PSSP: Managing Shared Disks for additional |information on IBM Virtual Shared Disk tuning.
Description
This command is run to specify logical volumes residing on globally accessible volume groups to be used as virtual shared disks.
You can use the System Management Interface Tool (SMIT) to run the defvsd command. To use SMIT, enter:
smit vsd_data
and select the Define a Virtual Shared Disk option.
Security
You must be in the AIX bin group and have write access to the SDR to run this command.
Prerequisite Information
PSSP: Managing Shared Disks
Related Information
Commands: vsdatalst, vsdvg, undefvsd
Refer to PSSP: Managing Shared Disks for information regarding IBM Virtual Shared Disk performance enhancements.
Examples
defvsd lv1vg1n1 vg1n1 vsd1vg1n1
defvsd lv2vg1n1 vg1n1 vsd1vg2n1 cache
Purpose
delnimclient - Deletes a Network Installation Management (NIM) client definition from a NIM master.
Syntax
delnimclient -h | -l node_list | -s server_node_list
Flags
Operands
None.
Description
Use this command to undefine a node as a NIM client. This is accomplished by determining the node's boot/install server and unconfiguring that client node as a NIM client on that server. When complete, the entry for the specified client is deleted from the NIM configuration database on the server. This command does not change the boot/install attributes for the nodes in the System Data Repository.
|Environment Variables
|PSSP 3.4 provides the ability to run commands using secure remote |command and secure remote copy methods.
|To determine whether you are using either AIX rsh or rcp |or the secure remote command and copy method, the following environment |variables are used. |If no environment variables are set, the defaults are |/bin/rsh and /bin/rcp.
|You must be careful to keep these environment variables consistent. |If setting the variables, all three should be set. The DSH_REMOTE_CMD |and REMOTE_COPY_CMD executables should be kept consistent with the choice of |the remote command method in RCMD_PGM: |
|For example, if you want to run delnimclient using a secure remote |method, enter:
|export RCMD_PGM=secrshell |export DSH_REMOTE_CMD=/bin/ssh |export REMOTE_COPY_CMD=/bin/scp
Standard Error
This command writes error messages (as necessary) to standard error.
Exit Values
Security
You must have root privilege to run this command.
Implementation Specifics
This command is part of the IBM Parallel System Support Programs (PSSP) Licensed Program (LP).
Location
/usr/lpp/ssp/bin/delnimclient
Related Information
Commands: mknimclient, setup_server
Examples
To delete the NIM client definition for nodes 1, 3, and 5 from the NIM database on their respective boot/install servers, enter:
delnimclient -l 1,3,5
Purpose
delnimmast - Unconfigures a node as a Network Installation Management (NIM) master.
Syntax
delnimmast -h | -l node_list
Flags
Operands
None.
Description
Use this command to undefine a node as a NIM master. This command does not change the boot/install attributes for the nodes in the System Data Repository.
|Environment Variables
|PSSP 3.4 provides the ability to run commands using secure remote |command and secure remote copy methods.
|To determine whether you are using either AIX rsh or rcp |or the secure remote command and copy method, the following environment |variables are used. |If no environment variables are set, the defaults are |/bin/rsh and /bin/rcp.
|You must be careful to keep these environment variables consistent. |If setting the variables, all three should be set. The DSH_REMOTE_CMD |and REMOTE_COPY_CMD executables should be kept consistent with the choice of |the remote command method in RCMD_PGM: |
|For example, if you want to run delnimmast using a secure remote |method, enter:
|export RCMD_PGM=secrshell |export DSH_REMOTE_CMD=/bin/ssh |export REMOTE_COPY_CMD=/bin/scp
Standard Error
This command writes error messages (as necessary) to standard error.
Exit Values
Security
You must have root privilege to run this command.
Implementation Specifics
This command is part of the IBM Parallel System Support Programs (PSSP) Licensed Program (LP).
Location
/usr/lpp/ssp/bin/delnimmast
Related Information
Commands: mknimmast, setup_server
Examples
To unconfigure nodes 1, 3, and 5 as NIM masters and delete the NIM file sets, enter:
delnimmast -l 1,3,5
Purpose
dsh - Issues commands to a group of hosts in parallel.
Syntax
Flags
|If -w - is specified, host names are added to the |working collective from standard input by entering host names one line at a |time from standard input. To signal that all host names have been |entered and to exit from standard input, an end-of-file character must be |specified (for example, <Ctrl-d>). When |<Ctrl-d> is pressed, you will be placed into dsh |command line mode (for example, a dsh> prompt) where the commands to be run |on host names are entered. Duplicate host names are included only once |in the working collective.
|The -o "keyword_value" option input to the secure |remote command is not supported by PSSP dsh. For example, |dsh -w host_name -o "-o |'BatchMode yes'" while running a secure remote command |method is not supported. The ability to use the -o |"keyword_value" secure remote command option is provided in the AIX |5L 5.1 dsh located in /opt/bin/dsh.
If the -a, -w, or -N flags are not specified, the WCOLL environment variable contains the name of a file containing host names for the working collective.
Operands
Description
The dsh executes commands against all or any subset of the hosts in a network. If the command operand is not specified, it reads lines from the command line or standard input and executes each as a command on a set of network-connected hosts. To exit the dsh command line mode, type "exit" or press enter at the dsh prompt. Alternatively, a single command in remote command syntax can be specified on the dsh command line.
As each command is read, it is interpreted by passing it to each host in a group called the working collective.
The working collective is obtained from the first existence of one of the following:
If neither of these exist, an error has occurred and no commands are issued.
The working collective file should have one host name per line. Blank lines and comment lines beginning with # are ignored.
|The path used when resolving the dsh command on the target |nodes is the path set by the user with the DSHPATH environment |variable. If DSHPATH is not set, the path used is the rsh or |dsh default path, |/usr/ucb:/bin:/usr/bin:. The DSHPATH |environment variable only works when the user's remote login shell is the |Bourne or Korn shell. An example would be to set DSHPATH to the path |set on the source machine (for example, DSHPATH=$PATH).
|The maximum number of concurrent remote command runs can be |specified with the fanout (-f) flag or via the FANOUT |environment variable. If desired, sequential execution can be obtained |by specifying a fanout value of 1. Results are displayed as remote |commands complete. All remote shell runs in a fanout must complete |before the next set of remote commands runs is started. If fanout is |not specified via FANOUT or the -f flag, runs to 64 hosts are |issued concurrently. Each remote command that dsh runs |requires a reserved TCP/IP port and only 512 such ports are available per |host. With large fanouts, it is possible to exhaust all of the ports on |a host, causing commands that use these ports to be unsuccessful.
|Exit values for the commands are displayed in messages from |dsh if nonzero. (A nonzero return code from the remote command |indicates that the remote command was unsuccessful.) If the remote |command is unsuccessful, that host is removed from the current working |collective (not the current working collective file), unless the |-c flag was set.
|The dsh exit value is 0 if no errors occurred in the |dsh command and all remote commands finished with exit codes of |0. The dsh exit value is more than 0 if internal errors occur |or the remote commands return an error. The exit value is increased by |1 for each remote command error.
No particular error recovery for command errors on remote hosts is provided. The application or user can examine the command results in dsh's standard error and standard output, and take appropriate action.
The dsh command waits until results are in for each command for all hosts and displays those results before reading more input commands.
|The dsh command does not work with interactive commands, |including those that read from standard input. You must ensure that the |interactive commands can run their remote command method without prompts |before using dsh.
The dsh command output consists of the output (standard error and standard output) of the remotely executed commands. The dsh standard output is the standard output of the remote command. The dsh standard error is the standard error of the remote command. Each line is prefixed with the host name of the host from which that output came. The host name is followed by ":" and a line of the command output.
For example, let's say that a command |date was issued to a working collective of host1, host2, and host3. When the command was issued on each of the hosts, the following lines were written by the remote commands:
|For host1 stdout: |Thur Mar 29 07:05:40 EST 2001 | |For host2 stdout: |Thur Mar 29 07:05:40 EST 2001 | |For host3 stdout: |Thur Mar 29 07:05:40 EST 2001 | |For host3 stderr: |date: not found | |dsh stdout will be |host1: Thur Mar 29 07:05:40 EST 2001 |host2: Thur Mar 29 07:05:40 EST 2001 |host3: Thur Mar 29 07:05:40 EST 2001 | |dsh stderr will be |host3: date: not found
A filter to display the output lines by the host is provided separately. See the dshbak command.
If a host is detected as down (for example, a |remote command returns a nonzero return code), subsequent commands are not sent to it on this invocation of dsh, unless the -c (continue) option is specified on the command line.
An exclamation point at the beginning of a command line causes the command to be passed directly to the local host in the current environment. The command is not sent to the working collective.
Signals 2 (INT), 3 (QUIT), and 15 (TERM) are propagated to the remote commands.
Signals 19 (CONT), 17 (STOP), and 18 (TSTP) are defaulted. This means that the dsh command responds normally to these signals, but they do not have an effect on the remotely running commands. Other signals are caught by dsh and have their default effects on the dsh command. In the case of these other signals, all current children, and via propagation their remotely running commands, are terminated (SIGTERM).
Files
|Environment Variables
|The dsh command uses either the AIX rsh command or a |secure remote command of your choice to function depending on the setting of |the DSH_REMOTE_CMD and the RCMD_PGM environment variables. If the |environment variables are not set, the default is DSH_REMOTE_CMD=/bin/rsh and |RCMD_PGM=rsh. If RCMD_PGM=secrshell and DSH_REMOTE_CMD is not |specified, the default is DSH_REMOTE_CMD=/bin/ssh. |
|This environment variable will be used with the dsh -a or |dsh -a -v options to determine whether to use the |reliable_hostname or initial_hostname when building the |working collective. The default is the |initial_hostname.
|The path used when resolving the dsh command on the target |nodes. |
Security
With AIX 4.3.1, rsh has the capability of supporting Kerberos Version 5 in addition to Kerberos Version 4 on the SP. DCE credentials may be required depending on the authentication method set on the host. The AIX command lsauthent or the SP command lsauthpar can be used to find the authentication method currently in use.
|You must have access to the AIX remote commands or the secure remote |commands to run this command.
Restrictions
The command attempts to execute the command string on the remote node, using the current operating locale of the process on the local node from which the command was issued. If this locale is not installed on the remote node, default AIX behavior is used, such that the remote command executes in the default locale defined to AIX on that node.
Location
|/usr/lpp/ssp/bin/dsh
Related Information
PSSP commands: dshbak, sysctl
AIX commands: rsh
|Secure remote commands
Examples
|export WCOLL=/wchosts |dsh ps
dsh -q
dsh -w otherhost1,otherhost2,otherhost3
dsh -w host1,host2,host3 -a cat /etc/passwd | dshbak
dsh -w otherhost cat remotefile '>>' otherremotefile
dsh -if 1 -a < commands_file > results 2>&1
dsh ps -ef | grep root
dsh 'ps -ef | grep root'
or
dsh ps -ef "|" grep root
dsh -w host1 cat /etc/passwd | cut -d: -f2- | cut -c2- > myetcpasswd
dsh -N my_nodes ps
|dsh -w -
|You will know that you are in standard input because a new line is |provided that has no prompt. When you complete the list of host names, |press <Ctrl-d> to drop into dsh command line mode (for |example, dsh>. At the dsh> prompt, specify the |command you want run on the target hosts, in this case date.
|The output will be similar to the following:
|#dsh -w - |host1 |host2 |host3 |Ctrl-d |dsh> date |host1: Fri Mar 23 08:46:59 EST 2001 |host2: Fri Mar 23 08:46:59 EST 2001 |host3: Fri Mar 23 08:46:59 EST 2001 |dsh> exit |#
dsh -D otherhost /bin/rm /tmp/error.log
|dsh -w host1 -o "-t5" date
|export RCMD_PGM=secrshell | |export DSH_REMOTE_CMD=/usr/local/bin/ssh | |dsh -o "-v" date
|export HN_METHOD=reliable |dsh -a date
|dsh -t csh date
|dsh -t csh -o "-t5" date
Purpose
dshbak - Presents formatted output from the dsh and sysctl commands.
Syntax
dshbak [-c]
Flags
Operands
None.
Description
The dshbak command takes lines in the following format:
host_name: line of output from remote command
The dshbak command formats them as follows and writes them to standard output. Assume that the output from host_name3 and host_name4 is identical and the c option was specified:
HOSTS ----------------------------------------------------------------- host_name1 ----------------------------------------------------------------------- . . lines from dsh or sysctl with host_names stripped off . . HOSTS ----------------------------------------------------------------- host_name2 ----------------------------------------------------------------------- . . lines from dsh or sysctl with host_names stripped off . . HOSTS ----------------------------------------------------------------- host_name3 host_name4 ----------------------------------------------------------------------- . . lines from dsh or sysctl with host_names stripped off . .
When output is displayed from more than one host in collapsed form, the host names are displayed alphabetically.
When output is not collapsed, output is displayed sorted alphabetically by host name.
The dshbak command writes "." for each 1000 lines of output filtered.
Standard Error
|When the dshbak filter is used, and standard error messages |are generated, all error messages (on standard error) will appear before all |standard output messages. This is true with and without |-c specified. For example:
[k7s][/]> dsh -w k7n01,k7n08 lsauthent | dshbak -c k7n08: rshd: Kerberos 5 Authentication Failed: User hosts/k7cw.ppd.pok. ibm.com/self@k7dcecell is not authorized to login to account root. k7n08: rshd: Kerberos Authentication Failed: Access denied because of improper credentials. k7n08: spk4rsh: 0041-004 Kerberos rcmd failed: rcmd protocol failure. HOSTS ----------------------------------------------------------------- k7n01 k7n08 ----------------------------------------------------------------------- Kerberos 5 Kerberos 4 Standard Aix
Location
/usr/sbin/dshbak
Related Information
Commands: dsh, sysctl
Examples
dsh -w host1,host2,host3 cat /etc/passwd | dshbak
dsh -w host1,host2,host3 pwd | dshbak -c
Purpose
dsrvtgt - Gets DCE credentials as a service principal, or as a user using a keyfile.
Syntax
dsrvtgt {-h | [-f] service-name | user-principal keytab-path}
Flags
Operands
Description
The dsrvtgt command uses the private key of a principal stored in a keytab file to obtain credentials as a DCE principal, rather than a password. It prints to standard output the value that must be assigned to the KRB5CCNAME environment variable to allow the credentials to be used by the invoking process. It is the responsibility of the calling process to remove the credentials using the kdestroy command.
If Kerberos 5 is not an active authentication method for AIX remote commands and DCE is not an active authentication method for SP trusted services, this command performs no function and generates no output, but returns successfully.
Files
The credentials cache file created by DCE in /opt/dcelocal/var/security/creds.
The spsec_defaults configuration file located in /usr/lpp/ssp/config.
The spsec_overrides configuration file located in /spdata/sys1/spsec.
A keytab file. For a service principal, it will be named /spdata/sys1/keyfiles/principal.
Standard Output
If DCE credentials are obtained, this command writes the name of the credentials cache file that was created prefixed by "FILE:".
Standard Error
Output consists of error messages, when the command cannot complete successfully.
There are no unique consequences of command errors.
Exit Values
Security
The dsrvtgt command can be used by any user who owns a keytab file. When the operand is a service-name, the command must be run by the AIX userid under which the server daemon runs. For example, to log in as a service principal whose keyfile is owned by root, you must be root.
Implementation Specifics
This command is part of the IBM Parallel System Support Programs (PSSP) Licensed Program (LP) (file set ssp.clients).
Prerequisite Information
The online AIX DCE publications for administrators and users.
The chapters on security in the PSSP: Administration Guide.
Location
/usr/lpp/ssp/bin/dsrvtgt
Related Information
Commands: spmankey
Examples
# Get DCE credentials and set KRB5CCNAME, if required nkrb5=$(/bin/dsrvtgt ssp/spbgroot 2>&1) if [[ $? -ne 0 ]] then print ''$nkrb5'' nkrb5='''' fi if [[ `''$nkrb5'' != '''' ]] then okrb5=$KRB5CCNAME export KRB5CCNAME=$nkrb5 fi # Use the credentials to access the SDR SDRChangeAttrValues .. # Get rid of DCE credentials after use if [[ ''$nkrb5'' != ```` ]] then /bin/kdestroy >/dev/null 2>&1 if [[ ''$okrb5'' != ```` ]] then export KRB5CCNAME=$okrb5 else unset KRB5CCNAME fi fi
export KRB5CCNAME=$(/bin/dsrvtgt ralph /home/ralph/keyfile)