usages
-
steps
-
install
$ brew install pdsh
-
usage
$ pdsh -w "node[1-4]" -l root date $ pdsh -w "node[1-4]" -l root uptime
-
sync ntp
$ pdsh -w "node[1-4]" -l root service ntpd stop $ pdsh -w "node[1-4]" -l root ntpdate 192.168.100.101 $ pdsh -w "node[1-4]" -l root service ntpd start
-
-
use hosts file
-
hosts file
$ nano hosts.txt node1 node2 node3 node4
-
usage
$ pdsh -R ssh -w ^hosts.txt -l root date
-