pssh
pssh copied to clipboard
psshlib/cli.py
_DEFAULT_PARALLELISM default 32
if _DEFAULT_PARALLELISM < hostslist
syscheck.sh cli: sys_check.sh ----------------------split line---------------------- sar 1 10 | grep Average | sed -s "s/.* //" free | grep Mem df -k | sed 's/%./%/; s/. //'|xargs ----------------------split line---------------------- pssh cli: ----------------------split line---------------------- pssh -h hostslist -P 'syscheck.sh' > result.log
#error result.log like below host_ip: 99.92 Mem: 264483252 226775872 37707380 0 488104 213974680 Use% 73% 1% 9% 2%
#right result.log like below hostip: 99.92 hostip: Mem: 264483252 226775872 37707380 0 488104 213974680 hostip: Use% 73% 1% 9% 2%