2014-11-03 70 views
0

我的pdsh只能讀取/ etc /性別進行分組,但我不知道如何爲它生成性別文件。我更喜歡使用dsh樣式組文件(/ etc/dsh/group/nodes),但模塊dshgroup不能被激活。 我在Debian的7:如何爲pdsh創建組?

$ uname -r 
Linux version 3.2.0-4-amd64 ([email protected]) (gcc version 4.6.3 (Debian 4.6.3-14)) #1 SMP Debian 3.2.63-2 
$ pdsh -L 
4 modules loaded: 

Module: rcmd/exec 
Author: Mark Grondona <[email protected]> 
Descr: arbitrary command rcmd connect method 
Active: yes 

Module: misc/genders 
Author: Jim Garlick <[email protected]> 
Descr: target nodes using libgenders and genders attributes 
Active: yes 
Options: 
-g query,...  target nodes using genders query 
-X query,...  exclude nodes using genders query 
-F file   use alternate genders file `file' 
-i    request alternate or canonical hostnames if applicable 
-a    target all nodes except those with "pdsh_all_skip" attribute 
-A    target all nodes listed in genders database 

Module: rcmd/rsh 
Author: Jim Garlick <[email protected]> 
Descr: BSD rcmd connect method 
Active: yes 

Module: rcmd/ssh 
Author: Jim Garlick <[email protected]> 
Descr: ssh based rcmd connect method 
Active: yes 

$ cat /etc/pdsh/machines 
10.0.0.1 
10.0.0.101 

$ cat /etc/dsh/group/nodes 
10.0.0.101 

$ pdsh -a uptime 
no remote hosts specified 
$ pdsh -g nodes uptime 
no remote hosts specified 

$ ls -l /etc/genders 
-rw-r--r-- 1 root root 0 Nov 3 19:49 /etc/genders 

的/ etc /性別是空的,因爲我不知道如何生成。

如果我刪除的/ etc /性別:

$ sudo rm /etc/genders 
$ pdsh -a uptime 
/etc/genders: error opening genders file 

如何做的pdsh閱讀DSH風格組文件?

回答