Date: June 4, 2004
PSSP's distributed shell commands "dsh" and "dshbak" are now standard in AIX 5.2. They run commands in parallel on multiple hosts, and format the output. The dsh commands greatly simplify managing server farms.
The set of nodes to which commands are sent can be set on the command line or by the contents of a file named by the DSH_LIST environment variable.
Here are a couple simple examples how these commands can be used. (Assume DSH_LIST has been set to the name of the file containing the list of servers. In this case, just three servers: dodgers, surveyor and pioneer)
Check the clock setting on all servers:
# dsh date dodgers: Fri Jun 4 14:46:06 PDT 2004 surveyor: Fri Jun 4 14:16:18 PDT 2004 pioneer: Fri Jun 4 14:32:28 PDT 2004
Identify servers running fix IX37151
# dsh "instfix -ik IX37659" dodgers: There was no data for IX37659 in the fix database surveyor: All filesets for IY37659 were found pioneer: All filesets for IY37659 were found
Check the hardware error logs on all servers starting 6/4/04
# dsh "errpt -s 0604000004"
Or check the OS level on each server:
# dsh "lslpp -L bos.rte | grep bos.rte"
You can also use "dshbak" to group common output from the # dsh command. This makes it easier to identify differences when you have a lot of servers. For example, we can consolidate the output of the above instfix command as follows.
# dsh "lslpp -L bos.rte" | dshbak HOST: dodgers --------------------- There was no data for IX37659 in the fix database.
HOST: surveyor, pioneer ---------------------------------- All filesets for IY37659 were found
Both commands are located in the /opt/csm/bin directory. They require a little customization. Check the AIX documentation for more information.
June 4, 2004