Pssh is a batch operation server software, when the operation and maintenance personnel responsible for a server cluster, the face of twenty or thirty servers, the first of these server IP are written into a document, and then use PSSH with this document, you can operate the twenty or thirty machines in one breath, easy and labor-saving, It's really a physical necessity for home travel.
Installation
Pssh is a script command written on the basis of Python, so Python is the basis for Operation Pssh, and now the Linux and Mac OS come with Python, although the Python version is 2.6.6 but it's enough.
#wget ftp://ftp.freebsd.ch/gentoo/distfiles/ pssh-2.3.1.tar.gz, download pssh-2.3.1.
#tar-ZXVF pssh-2.3.1.tar.gz
#cd pssh-2.3.1
#python setup.py Install
If the installation succeeds, there is a hint:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7E/FD/wKioL1cPOimj4ZyGAABD4R0Xe64378.png "title=" 1.png " alt= "Wkiol1cpoimj4zygaabd4r0xe64378.png"/>
Can see/usr/bin in more than a lot of executable commands, such as PSSH, you can #pssh--help a bit, you know its specific usage.
Parsing and usage of each command
PSSH Multi-host parallel Run command
PSCP transfer files to multiple hosts, he has the same features as the SCP
Pslurp copying files from multiple remote machines
Pnuke Kill remote machine process
Pslurp from the remote host to the local
Prsync using the Rsync protocol to synchronize from the local computer to the remote host, this protocol is important, such as the shopping site, an item only one, once the item has been bought, the database has changed, while using the Prsync command to synchronize data with other hosts, the other servers will be updated "This item is sold out".
Parameters of the Pssh:
-H The list of remote hosts executing the command or-h [email protected]:p ORT file content format [[email protected]]host[:p ORT]
The user name of the-L remote machine
-P One-time maximum allowable number of connections
-O output Redirect to a file
-E Execution error redirected to a file
-T set time-out for command execution
-a prompts for the password and passes the password to SSH
-O to set the specific configuration of the SSH parameters, refer to the Ssh_config configuration file
-X passes multiple SSH commands, with multiple commands separated by spaces, enclosed in quotation marks
-X with-X but can only pass one command at a time
-I displays standard output and standard errors after each host has finished executing
-I reads each input command and passes it to the SSH process to allow the command script to be routed to the standard input
-P Print out
Operation
This article is from "Life is waiting for Gordo" blog, please make sure to keep this source http://chenx1242.blog.51cto.com/10430133/1763781
Installation and simple operation of PSSH