Pssh

Allikas: Kuutõrvaja

Üks paljudest sarnastest serveritest koosneva süsteemis tekkivaid küsimusi on see, et kuidas saaks mingeid standartseid käske korraga kõigis masinates käivitada. Openssh kahjuks ise lahendust ei paku ja tuleb pöörduda teiste lisaprogrammide poole

  • pssh – is a program for running ssh in parallel on a multiple remote hosts.
  • pscp – is a program for copying files in parallel to a number of hosts.
  • Pscp – Copy/Transfer Files Two or More Remote Linux Servers
  • prsync – is a program for efficiently copying files to multiple hosts in parallel.
  • pnuke – kills processes on multiple remote hosts in parallel.
  • pslurp – copies files from multiple remote hosts to a central host in parallel.

pssh-hosts file

192.168.0.10:22
192.168.0.11:22

Küsime kõigilt hosts failis olevatelt masinatelt nende uptime

pssh -h pssh-hosts -l root -A -i "uptime"

skripti käivitamine

pssh -h serverlist -i -I < info.sh

Kõigi java protsesside seiskamiseks

pnuke -h ips.txt -l irb2 java
   Success on 128.112.152.122:22
   Success on 18.31.0.190:22
   Success on 128.232.103.201:22