LoginSignup
6
5

More than 5 years have passed since last update.

pdsh Tips

Last updated at Posted at 2013-04-04

複数台サーバのコマンド同時実行

コマンドの実行

$ /usr/bin/pdsh -w xxx.xxx.xxx.xxx コマンド
$ /usr/bin/pdsh -g aplfp コマンド
-w:ホスト名,IPアドレス
-g:グループ

グループの参照

$ ls /etc/dsh/group/
all  apl  aplfp  aplsp  db  web

$ cat /etc/dsh/group/aplfp
apl1
apl2
apl3

出力の整形

パイプで、dshbak -c をつける。

pdsh -g apl 'cat /etc/redhat-release' | dshbak -c
6
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5