You can use environment variables to control the shell script.
Name | Meaning | Default |
---|---|---|
$RAHBUFDIR | directory for buffer | /tmp/$USER |
$RAHBUFNAME | filename for buffer | rahout |
$RAHOSTFILE | pathname of file containing list of hosts | <db2instance_home_dir>/sqllib/db2nodes.cfg |
$RAHOSTLIST | list of hosts as a string | extracted from $RAHOSTFILE |
$RAHCHECKBUF | if set to "no", bypass checks | not set |
$RAHSLEEPTIME | time in secs this script will wait for initial output from commands run in parallel | 86400 sec for db2_kill, 200 sec for all other |
$RAHWAITTIME | interval in secs between successive checks that remote jobs are still running and "rah: waiting for <pid> ..." messages. Specify any positive integer. Prefix value with a leading zero to suppress messages for example, export RAHWAITTIME=045. (Note - not necessary to specify a low value as rah does not rely on these checks to detect job completion). | 45 sec |
$RAHENV | specifies filename to be executed if $RAHDOTFILES=E or K or PE or B | $ENV |
$RAHUSER | userid under which the remote command is to be run | $USER |
Note: | For $RAHENV, the value of $RAHENV where rah is run is used, not the value (if any) set by the remote shell. |
Following are the .files that are run if no prefix sequence is specified:
Note: | If your login shell is not kornshell, any dot files which you specify to be
executed will be executed in a kornshell process and so must conform to
kornshell syntax. So, for example, if your login shell is csh, then to have
your .cshrc environment set up for commands executed by rah, you should either
create a kornshell $HOME/.profile equivalent to your .cshrc and
specify in your $HOME/.cshrc
setenv RAHDOTFILES Por you should create a kornshell $HOME/.kshrc equivalent to your .cshrc and specify in your $HOME/.cshrc setenv RAHDOTFILES E setenv RAHENV $HOME/.kshrcAlso, it is essential that your .cshrc does not write to stdout if there is no tty (as when invoked by rsh). You can ensure this by enclosing any lines which write to stdout by, for example, if { tty -s } then echo "executed .cshrc"; endif |