2014-11-03 76 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风格组文件?

回答