rah and db2_all command prefix sequences
A prefix sequence is one or more special characters.
- On Linux® and UNIX operating systems:
rah "};ps -F pid,ppid,etime,args -u $USER" db2_all "};ps -F pid,ppid,etime,args -u $USER" - On Windows operating
systems:
rah "||db2 get db cfg for sample" db2_all "||db2 get db cfg for sample"
- Sequence
- Purpose
- |
- Runs the commands in sequence in the background.
- |&
- Runs the commands in sequence in the background and terminates
the command after all remote commands have completed, even if some
processes are still running. This might be later if, for example,
child processes (on Linux and UNIX operating systems) or background
processes (on Windows operating
systems) are still running. In this case, the command starts a separate
background process to retrieve any remote output generated after command
termination and writes it back to the originating computer. Note: On Linux and UNIX operating systems, specifying
°rades performance, because more rsh commands are required. - ||
- Runs the commands in parallel in the background.
- ||&
- Runs the commands in parallel in the background and terminates
the command after all remote commands have completed as described
previously for the |& case. Note: On Linux and UNIX operating systems, specifying
°rades performance, because more rsh commands are required. - ;
- Same as ||&. This is an alternative shorter form. Note: On Linux and UNIX operating systems, specifying ; degrades performance relative to ||, because more rsh commands are required.
- ]
- Prepends dot-execution of user's profile before executing command. Note: Available on Linux and UNIX operating systems only.
- }
- Prepends dot-execution of file named in $RAHENV (probably .kshrc)
before executing command. Note: Available on Linux and UNIX operating systems only.
- ]}
- Prepends dot-execution of user's profile followed by execution
of file named in $RAHENV (probably .kshrc)
before executing command. Note: Available on Linux and UNIX operating systems only.
- )
- Suppresses execution of user's profile and of file named in $RAHENV. Note: Available on Linux and UNIX operating systems only.
- '
- Echoes the command invocation to the computer.
- <
- Sends to all the computers except this one.
- <<-nnn<
Sends to all-but-database partition server nnn (all database partition servers in db2nodes.cfg except for database partition number nnn, see the first paragraph following the last prefix sequence in this table).
nnn is the corresponding 1-, 2-, or 3-digit database partition number to the nodenum value in the db2nodes.cfg file.
<<-nnn< is only applicable to db2_all.
- <<+nnn<
Sends to only database partition server nnn (the database partition server in db2nodes.cfg whose database partition number is nnn, see the first paragraph following the last prefix sequence in this table).
nnn is the corresponding 1-, 2-, or 3-digit database partition number to the nodenum value in the db2nodes.cfg file.
<<+nnn< is only applicable to db2_all.
- (blank character)
- Runs the remote command in the background with
stdin,stdout, andstderrall closed. This option is valid only when running the command in the background, that is, only in a prefix sequence which also includes \ or ;. It allows the command to complete much sooner (as soon as the remote command has been initiated). If you specify this prefix sequence on the rah command line, then either enclose the command in single quotation marks, or enclose the command in double quotation marks, and precede the prefix character by \ . For example,
orrah '; mydaemon'
When run as a background process, the rah command never waits for any output to be returned.rah ";\ mydaemon" - >
- Substitutes occurrences of > with the computer name.
- "
- Substitutes occurrences of () by the computer index, and substitutes
occurrences of ## by the database partition number.
- The computer index is a number that associated with a computer
in the database system. If you are not running multiple logical partitions,
the computer index for a computer corresponds to the database partition
number for that computer in the database partition configuration file. To
obtain the computer index for a computer in a multiple logical partition
database environment, do not count duplicate entries for those computers
that run multiple logical partitions. For example, if MACH1 is running
two logical partitions and MACH2 is also running two logical partitions,
the database partition number for MACH3 is
5in the database partition configuration file. The computer index for MACH3, however, would be 3.- On Windows operating systems, do not edit the database partition configuration file. To obtain the computer index, use the db2nlist command.
- When
"is specified, duplicates are not eliminated from the list of computers.
- The computer index is a number that associated with a computer
in the database system. If you are not running multiple logical partitions,
the computer index for a computer corresponds to the database partition
number for that computer in the database partition configuration file. To
obtain the computer index for a computer in a multiple logical partition
database environment, do not count duplicate entries for those computers
that run multiple logical partitions. For example, if MACH1 is running
two logical partitions and MACH2 is also running two logical partitions,
the database partition number for MACH3 is
Usage notes
- Prefix sequences are considered to be part of the command. If you specify a prefix sequence as part of a command, you must enclose the entire command, including the prefix sequences, in double quotation marks.