How to run a command in all the segment simultaneously
Post date: Feb 06, 2014 12:26:24 AM
[gpadmin@sachi ~]$ gpssh -f hostlist_singlenode
=> hostname
[sachi] sachi
=> tar czfv `hostname`.network_backup.tar.gz /etc/sysconfig/network-scripts
[sachi] tar: Removing leading `/' from member names
[sachi] /etc/sysconfig/network-scripts/
[sachi] /etc/sysconfig/network-scripts/ifdown-tunnel
[sachi] /etc/sysconfig/network-scripts/network-functions
[sachi] /etc/sysconfig/network-scripts/ifdown-post
[sachi] /etc/sysconfig/network-scripts/ifdown-sit
[sachi] /etc/sysconfig/network-scripts/ifup-isdn
[sachi] /etc/sysconfig/network-scripts/ifcfg-lo
[sachi] /etc/sysconfig/network-scripts/ifcfg-eth0
[sachi] /etc/sysconfig/network-scripts/ifup-plusb
[sachi] /etc/sysconfig/network-scripts/ifdown-routes
[sachi] /etc/sysconfig/network-scripts/ifup-ppp
[sachi] /etc/sysconfig/network-scripts/ifup-post
[sachi] /etc/sysconfig/network-scripts/ifup-aliases
[sachi] /etc/sysconfig/network-scripts/net.hotplug
[sachi] /etc/sysconfig/network-scripts/ifup
[sachi] /etc/sysconfig/network-scripts/ifup-wireless
[sachi] /etc/sysconfig/network-scripts/ifdown-ippp
[sachi] /etc/sysconfig/network-scripts/ifup-bnep
[sachi] /etc/sysconfig/network-scripts/ifup-sit
[sachi] /etc/sysconfig/network-scripts/init.ipv6-global
[sachi] /etc/sysconfig/network-scripts/ifup-routes
[sachi] /etc/sysconfig/network-scripts/ifdown-ipv6
[sachi] /etc/sysconfig/network-scripts/network-functions-ipv6
[sachi] /etc/sysconfig/network-scripts/ifup-ipv6
[sachi] /etc/sysconfig/network-scripts/ifdown-eth
[sachi] /etc/sysconfig/network-scripts/ifup-eth
[sachi] /etc/sysconfig/network-scripts/ifup-ippp
[sachi] /etc/sysconfig/network-scripts/ifup-plip
[sachi] /etc/sysconfig/network-scripts/ifdown-isdn
[sachi] /etc/sysconfig/network-scripts/ifup-tunnel
[sachi] /etc/sysconfig/network-scripts/ifdown
[sachi] /etc/sysconfig/network-scripts/ifdown-bnep
[sachi] /etc/sysconfig/network-scripts/ifdown-ppp
=> ls `hostname`.network_backup.tar.gz
[sachi] sachi.network_backup.tar.gz
=>