Batch Linux server management through dsh (1)

Source: Internet
Author: User

BKJIA exclusive Article] At present, more and more Linux servers are emerging in the enterprise network, and how to conveniently and efficiently manage a large number of Linux servers is a matter of great concern to system administrators. A large number of open-source management tools are available to implement such a management tool. Now we will introduce dsh, a tool that effectively manages a large number of Linux systems through command lines.

Dsh is designed to run Shell commands on a remote system. It simplifies operations on a large number of computers. The dsh command syntax is as follows:

Dsh [-m machinename |-a |-g groupname] [-f machinefile] [-M] [-q] [-- wait-shell] -- commandline

Common options:

-M: When the output of remote command execution is displayed, add the host name to the front.

-A: If you often operate on the same group of computers, you can create a group of global sets. The $ HOME/. dsh/machines. list file defines a global set. The IP address of each computer in the file. After-a is specified, dsh executes the specified command on all computers listed in machines. list.

-Q: Specifies the quiet mode output.

-M machinename: Specifies the computer on which the specified command is to be executed.

-G groupname: Specifies the computer group for which the specified command is to be executed. The host name group is in $ HOME /. the dsh/group/directory is defined. Each computer group has one file, and the file name is the IP address of each computer in the file.

-F machinefile: Specifies the computer list file.

-Wait-shell: by default, dsh runs commands on the computer in parallel. If you want to run commands sequentially, specify -- wait-shell.


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.