// PDSH on ADAPT

Genders files allow users to send commands to a pre-defined group of systems. The ADAPT team is working on an approach to implement 'pdsh' and an appropriate genders file across ADAPT (see below).

Currently you can utilize "pdsh -w" to execute distributed commands, as shown in the examples below:

For Bash users:
[user@node]$ pdsh -w above101,above102 /bin/date 2>/dev/null
above102: Tue Aug 25 17:25:40 EDT 2020
above101: Tue Aug 25 17:25:40 EDT 2020

For csh/tcsh users:
[user@node]$ pdsh -w above101,above102 /bin/date
{motd output}
above102: Tue Aug 25 17:25:40 EDT 2020
above101: Tue Aug 25 17:25:40 EDT 2020

To suppress the display of motd, add the following to your shell startup script:

For Bash users:
(.bashrc): export PDSH_SSH_ARGS_APPEND="-oLogLevel=Error"

For csh/tcsh users:
(.cshrc): setenv PDSH_SSH_ARGS_APPEND "-oLogLevel=Error"

How to pdsh to groups:

pdsh -g icesat uptime

List of groups accessible by pdsh from ADAPT:

# Above nodes (includes after nodes)
pdsh -g above '(<insert command here>)'

# Crane nodes
pdsh -g crane '(<insert command here>)'

# Drake nodes
pdsh -g drake '(<insert command here>)'

# Ecotone nodes
pdsh -g ecotone '(<insert command here>)'

# ICESat nodes
pdsh -g icesat '(<insert command here>)'

# Ortho nodes
pdsh -g ortho '(<insert command here>)'

# PGDA nodes
pdsh -g pgda '(<insert command here>)'

# Seagull nodes
pdsh -g seagull '(<insert command here>)'