Check patentability & draft patents in minutes with Patsnap Eureka AI!

Processing method for linux shell script parallel execution and timeout automatic exit

A technology of automatic exit and processing method, applied in the field of Linux, can solve the problems of system burden, sub-command timeout not killing, low efficiency of parallel programs, etc., and achieve the effect of high parallel efficiency

Inactive Publication Date: 2014-10-08
LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF6 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] Generally, the linux shell parallel script will need to start parallel command programs in parallel, and then recycle to judge whether each parallel command program times out. Such parallel programs are inefficient; The remaining subcommands are not killed after timeout, causing a burden on the system

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Processing method for linux shell script parallel execution and timeout automatic exit
  • Processing method for linux shell script parallel execution and timeout automatic exit

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0053] Below with reference to accompanying drawing, the present invention is further described by specific embodiment:

[0054] main_proc.sh, the main program of a linux shell script parallelism and timeout automatic exit processing method, it includes:

[0055] 1) Start the subroutine sub_proc.sh in parallel, start 9 parallel subroutines through a for loop, the key code is as follows:

[0056] for i in $nodeList

[0057] do

[0058] sub_proc.sh $i $timeout &

[0059] done

[0060] 2) Wait for the end of the subroutine. Wait for the end of the subroutine through wait. The main program does not need to judge whether the subroutine has timed out. And if the subroutines are allowed to judge whether they time out in parallel, only one time is required.

[0061] sub_proc.sh, a subroutine of a linux shell script parallelism and timeout automatic exit processing method, which includes:

[0062] 1) Execute the command program and process the results obtained by the command ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a processing method for linux shell script parallel execution and timeout automatic exit. The processing method involves a main program and subprograms, the main program is run firstly, the subprograms are started in parallel, and then waiting is kept till all the parallel subprograms are ended, wherein the subprograms execute command programs and process results obtained by the command programs, and if the command programs are not finished within the required time, the subprograms kill the unfinished command programs first and then kill themselves. The processing method is high in parallel efficiency and has the timeout suicide function; the main program does not have to judge whether the parallel subprograms are out of time, and thus the parallel efficiency is high; when the timeout subprograms are not finished, the subprograms automatically kill the commands executed by themselves and then kill themselves, and excessive timeout waiting courses will not be caused to a system.

Description

technical field [0001] The invention relates to the technical field of Linux, in particular to a processing method for parallel execution and timeout automatic exit of a Linux shell script. technical background [0002] Generally, linux shell parallel scripts will need to start parallel command programs in parallel, and then recycle to determine whether each parallel command program times out. Such parallel programs are inefficient; The remaining subcommands are timed out and not killed, causing a burden to the system. Contents of the invention [0003] The technical problem to be solved by the present invention is: a processing method for linux shell script parallelism and timeout automatic exit, which has the advantages of high parallel efficiency and automatic killing of all executed command programs when timeout occurs. [0004] The technical scheme adopted in the present invention is: [0005] A processing method for linux shell script parallel execution and timeout...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/46
Inventor 焦芬芳
Owner LANGCHAO ELECTRONIC INFORMATION IND CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More