From UF HPC Wiki
Distribution Commands
will ssh to all machines in /etc/pdsh-machines
- pdsh -R ssh -g compute -X down <command>
ssh into all non-down compute nodes
- pdsh -R ssh -g compute,test -X down -x r2a-s21,r2a-s22 <command>
will ssh to the groups (-g) compute,test excluding the group (-X) down group, and excluding the machine (-x) r2a-s21
pdsh uses the /etc/netgroup file for group management
- for i in `pbsnodes | grep ^[a-z]`; do ssh -x $i <command>; done
will ssh to each of the nodes that torque considers to exist and execute the command on them
Copy Commands
- rsync -av --delete <original> <destination>
One Liners
- How many procs are in the cluster, according to torque?
for i in `pbsnodes | grep np | awk '{print $3}'`; do sum=$((sum + $i)); done; echo $sum; sum=0