CN109725984A - A kind of method for the Shell order that long-range stopping is carrying out - Google Patents

A kind of method for the Shell order that long-range stopping is carrying out Download PDF

Info

Publication number
CN109725984A
CN109725984A CN201811584238.8A CN201811584238A CN109725984A CN 109725984 A CN109725984 A CN 109725984A CN 201811584238 A CN201811584238 A CN 201811584238A CN 109725984 A CN109725984 A CN 109725984A
Authority
CN
China
Prior art keywords
order
executes
server
shell
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811584238.8A
Other languages
Chinese (zh)
Other versions
CN109725984B (en
Inventor
陈技伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Electric Fufu Mdt Infotech Ltd
Original Assignee
China Electric Fufu Mdt Infotech Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Electric Fufu Mdt Infotech Ltd filed Critical China Electric Fufu Mdt Infotech Ltd
Priority to CN201811584238.8A priority Critical patent/CN109725984B/en
Publication of CN109725984A publication Critical patent/CN109725984A/en
Application granted granted Critical
Publication of CN109725984B publication Critical patent/CN109725984B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses the method that one kind remotely stops the Shell order being carrying out, step: 1) front end page, which is submitted, executes Shell command request to server-side;2) server-side forwarding executes Shell command request and executes Agent to order;3) order executes Agent and executes Shell order on host;4) server-side caches the PID and globally unique ID that receive Agent end return, and updating execution state is " being carrying out ";5) it is available for updating front end page button of " ceasing and desisting order ";6) it when if you need to the Shell order for stopping currently executing or page close, clicks " ceasing and desisting order " button or listens to page close event, front end page transmission ceases and desist order request to server-side;7) server-side forwarding, which is ceased and desisted order, requests to execute Agent to order;8) order executes after Agent receives and cease and desist order request, executes KILL PID order, terminates corresponding process;9) front end page prompt " process stops successfully ".The present invention can improve the user experience, and avoid system resource waste.

Description

A kind of method for the Shell order that long-range stopping is carrying out
Technical field
The present invention relates to the methods that one kind remotely stops the Shell order being carrying out.
Background technique
Shell order is remotely executed by front end page at present, if necessary to stop the order being carrying out, needs to pass through It executes PS order acquirement PID and passes through the order that PID stopping is carrying out again.It is in execution if there is a plurality of order of the same name Any make manpower intervention also be difficult accurate judgement item order needs to be stopped.In addition remote Shell life is executed in front end page When enabling, frequently encounter order execute the time it is too long, especially certain inquiry class orders mainly return to query result to executor, such as Fruit execute the time it is long, executor has been switched off the page, then at this time order continue to execute it is nonsensical, to system resource Cause unnecessary consumption.
Summary of the invention
It can be improved the user experience the object of the present invention is to provide a kind of, avoid the long-range stopping of system resource waste just In the method for the Shell order of execution.
To achieve the above object, the invention adopts the following technical scheme:
A kind of method for the Shell order that long-range stopping is carrying out, the described method comprises the following steps:
1) front end page, which is submitted, executes Shell command request to server-side, and the content of execution Shell command request includes one Completely new globally unique ID, and start a thread poll services end implementing result;
2) after server-side receives the execution Shell command request of front end, forwarding executes Shell command request and executes to order Agent, executing Shell command request content includes the globally unique ID that front end page sends over;
3) order executes after Agent receives execution Shell command request and executes Shell order on host, returns immediately after execution It returns, and the PID and globally unique ID that execute Shell order is returned into server-side;
4) server-side caches the PID and globally unique ID that receive Agent end return, and updating execution state is " to hold Row ";
5) it is " being carrying out " that front end page, which is polled to server-side and executes Status Change, while updating front end page " ceasing and desisting order " Button is available;
6) it when if you need to the Shell order for stopping currently executing or page close, clicks " ceasing and desisting order " button or listens to Page close event, front end page transmission cease and desist order request to server-side, and the content for request of ceasing and desisting order is raw comprising step 1) At globally unique ID;
7) server-side receives request of ceasing and desisting order, and forwarding, which is ceased and desisted order, requests to execute Agent, request content of ceasing and desisting order to order The globally unique ID sended over comprising front end page;
8) order executes after Agent receives and cease and desist order request, executes KILL PID order, terminates corresponding process, and will hold Row result returns to server-side;
9) implementing result is returned to front end page by server-side, and front end page prompts " process stops successfully ".
The invention adopts the above technical scheme, has the advantages that
1, the order being carrying out can be stopped at any time, improve the usage experience that front end remotely executes Shell order.
2, stop the order being carrying out when closing the page, avoid system resource waste.
Specific embodiment
The method that one kind of the invention remotely stops the Shell order being carrying out, the described method comprises the following steps:
1) front end page, which is submitted, executes Shell command request to server-side, and the content of execution Shell command request includes one Completely new globally unique ID, and start a thread poll services end implementing result;
2) after server-side receives the execution Shell command request of front end, forwarding executes Shell command request and executes to order Agent, executing Shell command request content includes the globally unique ID that front end page sends over;
3) order executes after Agent receives execution Shell command request and executes Shell order on host, returns immediately after execution It returns, and the PID and globally unique ID that execute Shell order is returned into server-side;
4) server-side caches the PID and globally unique ID that receive Agent end return, and updating execution state is " to hold Row ";
5) it is " being carrying out " that front end page, which is polled to server-side and executes Status Change, while updating front end page " ceasing and desisting order " Button is available;
6) it when if you need to the Shell order for stopping currently executing or page close, clicks " ceasing and desisting order " button or listens to Page close event (monitor page close be can selection operation), front end page transmission cease and desist order request to server-side, stop life The globally unique ID for enabling the content of request generate comprising step 1);
7) server-side receives request of ceasing and desisting order, and forwarding, which is ceased and desisted order, requests to execute Agent, request content of ceasing and desisting order to order The globally unique ID sended over comprising front end page;
8) order executes after Agent receives and cease and desist order request, executes KILL PID order, terminates corresponding process, and will hold Row result returns to server-side;
9) implementing result is returned to front end page by server-side, and front end page prompts " process stops successfully ".
The present invention, which can apply, is ordering execution of long duration, is not desired to wait, or wait nonsensical scene, can To execute operation of ceasing and desisting order automatically, avoid unnecessary waiting when user closes the page or actively clicks stop button. It improves the user experience, avoids system resource waste.
Above the preferred embodiment of the patent is described in detail, but this patent is not limited to above-mentioned embodiment party Formula within the knowledge of one of ordinary skill in the art can also be under the premise of not departing from this patent objective It makes a variety of changes.

Claims (1)

1. the method that one kind remotely stops the Shell order being carrying out, it is characterised in that: the described method comprises the following steps:
1) front end page, which is submitted, executes Shell command request to server-side, and the content of execution Shell command request includes one Completely new globally unique ID, and start a thread poll services end implementing result;
2) after server-side receives the execution Shell command request of front end, forwarding executes Shell command request and executes to order Agent, executing Shell command request content includes the globally unique ID that front end page sends over;
3) order executes after Agent receives execution Shell command request and executes Shell order on host, returns immediately after execution It returns, and the PID and globally unique ID that execute Shell order is returned into server-side;
4) server-side caches the PID and globally unique ID that receive Agent end return, and updating execution state is " to hold Row ";
5) it is " being carrying out " that front end page, which is polled to server-side and executes Status Change, while updating front end page " ceasing and desisting order " Button is available;
6) it when if you need to the Shell order for stopping currently executing or page close, clicks " ceasing and desisting order " button or listens to Page close event, front end page transmission cease and desist order request to server-side, and the content for request of ceasing and desisting order is raw comprising step 1) At globally unique ID;
7) server-side receives request of ceasing and desisting order, and forwarding, which is ceased and desisted order, requests to execute Agent, request content of ceasing and desisting order to order The globally unique ID sended over comprising front end page;
8) order executes after Agent receives and cease and desist order request, executes KILL PID order, terminates corresponding process, and will hold Row result returns to server-side;
9) implementing result is returned to front end page by server-side, and front end page prompts " process stops successfully ".
CN201811584238.8A 2018-12-24 2018-12-24 Method for remotely stopping executing Shell command Active CN109725984B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811584238.8A CN109725984B (en) 2018-12-24 2018-12-24 Method for remotely stopping executing Shell command

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811584238.8A CN109725984B (en) 2018-12-24 2018-12-24 Method for remotely stopping executing Shell command

Publications (2)

Publication Number Publication Date
CN109725984A true CN109725984A (en) 2019-05-07
CN109725984B CN109725984B (en) 2023-03-24

Family

ID=66297075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811584238.8A Active CN109725984B (en) 2018-12-24 2018-12-24 Method for remotely stopping executing Shell command

Country Status (1)

Country Link
CN (1) CN109725984B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0768006A (en) * 1993-09-06 1995-03-14 Casio Comput Co Ltd Command processing method
CN101097527A (en) * 2006-06-27 2008-01-02 中国银联股份有限公司 Flowpath scheduling method and system of application progress
CN101916221A (en) * 2010-07-23 2010-12-15 中兴通讯股份有限公司 Method and system for performing unit testing on equipment
CN105099746A (en) * 2014-05-21 2015-11-25 中兴通讯股份有限公司 SHELL execution method and SHELL execution device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0768006A (en) * 1993-09-06 1995-03-14 Casio Comput Co Ltd Command processing method
CN101097527A (en) * 2006-06-27 2008-01-02 中国银联股份有限公司 Flowpath scheduling method and system of application progress
CN101916221A (en) * 2010-07-23 2010-12-15 中兴通讯股份有限公司 Method and system for performing unit testing on equipment
CN105099746A (en) * 2014-05-21 2015-11-25 中兴通讯股份有限公司 SHELL execution method and SHELL execution device

Also Published As

Publication number Publication date
CN109725984B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
WO2019091171A1 (en) Voice control method, device, system, and electronic apparatus for smart home appliance
CN112352276B (en) Coordinated execution of a series of requested actions to be performed via an automated assistant
EP2764657B1 (en) Apparatus and method for preventing command conflicts in a smart grid network
WO2017071612A1 (en) Washing machine control method, control system and washing machine on internet of things
WO2019205134A1 (en) Smart home voice control method, apparatus, device and system
WO2018057951A3 (en) System and method for automatic quality management in a contact center environment
JP2014225235A5 (en)
WO2010030125A3 (en) Unified device management method and system
WO2007131122A3 (en) System and method for managing, routing, and controlling devices and inter-device connections
JP2016076252A5 (en)
JP2008524676A5 (en)
EP2278464A3 (en) Relay device and relay method
US20220405122A1 (en) Systems, methods, and apparatuses for processing routine interruption requests
CN109725984A (en) A kind of method for the Shell order that long-range stopping is carrying out
WO2008105099A1 (en) Application-cooperative controlling program, application-cooperative controlling method, and application-cooperative controlling apparatus
CN101666534B (en) Air conditioner control system
CN107861897A (en) One kind is interrupted and poll triggering method, system, equipment and computer-readable storage medium
WO2012079352A1 (en) Method and system for managing multiple network element devices
CN103237251A (en) Control method of intelligent television system
WO2021057093A1 (en) Robot control method and apparatus, storage medium, and processor
CN112671591A (en) Remote updating method based on OTA technology
CN110580589B (en) Live pig intelligent turning system and turning method thereof
JPWO2022064604A5 (en)
EP1968245A3 (en) Apparatus and method for device control
CN108564424A (en) A kind of method and payment transaction system reducing inquiry Transaction Information error

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant