Linux Bulk Management tool PSSH

Source: Internet
Author: User
Tags snmp pscp

The pssh command is a python-written tool that can execute commands on multiple servers while supporting the copying of files, which is excellent in the same kind of tool, similar to the PDSH, which individuals consider to be relatively pdsh easier, use must be configured on each server for key authentication access .

PSSH Command Installation

Introduction to the installation and source installation of Yum in the CentOS system environment: Yum Installation: Yum install pssh source installation: Wget http://parallel-ssh.googlecode.com/files/ Pssh-2.3.1.tar.gztar XF pssh-2.3.1.tar.gzcd pssh-2.3.1/python setup.py Install

= = parameter Command Introduction = =

"Introducing Pssh parameters" pssh running commands in parallel on multiple hosts

Options

--version: View version <br>--help: View Help, this information <br>-h: Host file list, content format "[[Email protected]]host[:p ort] '-H: List of remote hosts executing commands Or-h [email protected]:p ORT file content format [[email protected]]host[:p ort]-P: Number of concurrent threads, maximum allowable connection at one time-o: Output redirected to a file-e: Execution error redirected to a file -T: Set timeout for command execution, 0 unrestricted-O: Set the specific configuration of SSH parameters, refer to Ssh_config profile-V: Verbose mode-A: Enter the password mode manually, prompt for password and pass the password to ssh-x: Pass multiple SSH commands, multiple commands separated by spaces, Enclose in quotation marks-x: Same-X but only one command at a time-P: Execution output execution information-I display standard output and standard error after each host has finished executing



" Other Commands" '

PSCP transfer files to multiple hosts, similar to SCP

Pslurp copy files from multiple remote machines to local

Pnuke parallel in remote host kill process

Prsync synchronizing from the local computer to a remote host using the Rsync protocol


= = Instance = =

Pssh

# pssh -h ip.txt -l root chkconfig -- Level 2345 snmpd on  [1] 10:59:29 [success] ... ...  [2 ]&NBSP;10:59:29&NBSP;[SUCCESS]&NBSP;...&NBSP;...&NBSP;&NBSP;[3]&NBSP;10:59:29&NBSP;[SUCCESS]&NBSP;...&NBSP, .....   # pssh -h ip.txt -i uptime[1] 11:15:03 [SUCCESS]  Mar.mars.he 11:15:11 up 4 days, 16:25, 1 user, load average:  0.00, 0.00, 0.00[2] 11:15:03 [success] jan.mars.he 11:15:12 up 3  days, 23:26, 0 users, load average: 0.00, 0.00, 0.00[3]  11:15:03 [success] feb.mars.he 11:15:12 up 4 days, 16:26, 2 users ,  load average: 0.08, 0.02, 0.01 

Pscp

$ pscp-h ip.txt-l root/etc/snmp/snmpd.conf/etc/snmp/snmpd.conf [1] 11:00:42 [SUCCESS] ...  [2] 11:00:42 [SUCCESS] ... [3] 11:00:42 [SUCCESS] ...


This article is from the "It Struggle" blog, please be sure to keep this source http://qiangsh.blog.51cto.com/3510397/1844898

Linux Bulk Management tool PSSH

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.