Method and apparatus for carrying out batch processing on lots of hosts in CDN network

A batch processing and mainframe technology, applied in data exchange networks, digital transmission systems, electrical components, etc., can solve problems such as the inability to identify the boundaries of command output content, inconsistent command prompt formats, etc.

CN102523124AActive Publication Date: 2012-06-27CHINACACHE INT HLDG
4 Cites 3 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2012-06-27

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention discloses a method for carrying out batch processing on lots of hosts in a CDN network, wherein the method is applied to the CDN network host operation and maintenance technology filed. The method comprises the following steps that: a task description file is obtained, a task that is to be executed is determined and a detailed list of hosts that are required to execute the task is obtained; according to the generated number of working processes, the corresponding number of target hosts are obtained from the host detailed list as well as login information of the target hosts is respectively pushed to all idle working processes; and after a task execution result is received, it is determined whether there is any host that has not been processed in the host detailed list; if so, login information of any host that has not been processed is obtained and is pushed to the working process. According to the provided method and the provided apparatus in the invention, a data packet that is returned by a secure shell (SSH) protocol can be directly received, so that a problem that it is difficult to determine a boundary of an output content of a command in the prior art can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field

[0001] The present invention relates to the technical field of CDN network host operation and maintenance, in particular to a method and device for batch processing a large number of hosts in a CDN network. Background technique

[0002] Between various hosts in the CDN network, it is often necessary to remotely log in and operate through the SSH (Secure Shell) protocol. The SSH protocol daemon sshd can authenticate the session initiated by the operator. After the session is authenticated, it can repeatedly accept the commands input by the operator, execute and output the execution results.

[0003] CDN network host operation and maintenance personnel often use the SSH protocol to install software, view the running status of the device, diagnose and repair abnormalities. The typical way of working is to input a command, view its output result, get some useful information from it and make a judgment based on the obtained information, and determine the next command t...

Examples

Embodiment Construction

[0021] The embodiment of the present invention provides a method for batch processing a large number of hosts in a CDN network. The method includes: obtaining a task description file, determining a task to be executed, and obtaining a list of hosts that need to perform the task, and the host list includes host logins Information; obtain a corresponding number of target hosts from the host list according to the number of generated worker processes, and push the login information of the target host to each idle worker process, so that the idle worker process executes tasks to the target host through the SSH protocol The tasks included in the description file; after receiving the task execution result, determine whether there are any unprocessed hosts provided in the host list, and if so, obtain the login information of any unprocessed host and push it to the work process.

[0022] Such as figure 1 As shown, the embodiment of the present invention provides a method for batch processi...