CN113766024B - Remote instruction management system and method for remote server - Google Patents

Remote instruction management system and method for remote server Download PDF

Info

Publication number
CN113766024B
CN113766024B CN202111041425.3A CN202111041425A CN113766024B CN 113766024 B CN113766024 B CN 113766024B CN 202111041425 A CN202111041425 A CN 202111041425A CN 113766024 B CN113766024 B CN 113766024B
Authority
CN
China
Prior art keywords
instruction
remote
remote server
module
terminal
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.)
Active
Application number
CN202111041425.3A
Other languages
Chinese (zh)
Other versions
CN113766024A (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.)
Ultimate Attainment Interactive Network Technical Concern Co ltd In Xiamen
Original Assignee
Ultimate Attainment Interactive Network Technical Concern Co ltd In Xiamen
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 Ultimate Attainment Interactive Network Technical Concern Co ltd In Xiamen filed Critical Ultimate Attainment Interactive Network Technical Concern Co ltd In Xiamen
Priority to CN202111041425.3A priority Critical patent/CN113766024B/en
Publication of CN113766024A publication Critical patent/CN113766024A/en
Application granted granted Critical
Publication of CN113766024B publication Critical patent/CN113766024B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a remote instruction management system and a remote instruction management method for a remote server, wherein the system is connected with a terminal and the remote server and comprises a command line identification module, an instruction configuration module, an instruction synchronization module, a remote operation module, a thermal update module, a remote monitoring module and a remote debugging module; the method is implemented based on the system. The system of the invention realizes remote monitoring, operation, updating and debugging of the remote server, and ensures that the development and management efficiency is more efficient and convenient.

Description

Remote instruction management system and method for remote server
Technical Field
The invention relates to the technical field of computers, in particular to a remote instruction management system and method for a remote server.
Background
In the development and production stages of the server, developers need to maintain, manage, debug and repair the server frequently, quickly master the running state inside the server, analyze problems and immediately replace fault codes so as to quickly adapt to the change of the production environment and cope with program faults occurring in the external network at any time.
In the prior art, most developers can call the method through a web end by newly adding an HTTP port, but when a fault problem is encountered and a corresponding interface is not available, information can be obtained only through a log, and the problem can not be analyzed and positioned in the fastest time by analyzing the condition of an external tool, so that the problem is slow to be dragged, and further loss is caused due to the problem deterioration.
Disclosure of Invention
In order to solve the above problems, the present invention provides a remote instruction management system and method for a remote server.
The invention adopts the following technical scheme:
a remote instruction management system for a remote server, the system connecting a terminal and the remote server, the system comprising:
the command line identification module is used for carrying out pattern matching on user input and forming a first instruction;
the instruction configuration module is used for configuring the first instruction and generating a second instruction, and the configuration comprises information configuration and instruction configuration; the second instruction comprises configuration information and user parameters;
the instruction synchronization module is used for constructing a new internal process in the remote server as an interpretation running environment of the second instruction;
and the remote operation module receives a third instruction from the terminal, interprets and executes the second instruction and returns a function operation result and operation steps.
Further, the system further comprises:
the hot updating module is used for pushing the compiled byte code file to the remote server and replacing fault codes in the remote server;
the remote monitoring module is used for monitoring the memory information of the remote server;
and the remote debugging module is used for debugging the progress of each module in the terminal, the node and the system.
Further, the internal process adopts a tracking mode, and the process tracking is realized by marking a process dictionary of the process.
The remote instruction management method of the remote server is realized based on the remote instruction management system of the remote server, and comprises the following steps:
s1, when a terminal has user input, the system carries out pattern matching on the user input, if an instruction input by the user meets the pattern matching, an effective first instruction is formed, and if the instruction input by the user does not meet the pattern matching, all the steps are terminated;
s2, configuring information of the first instruction and assembling to generate a second instruction;
s3, initiating a TCP request to the remote server through the second instruction to establish connection access, establishing a new internal process in the remote server as an interpretation operation environment of the second instruction, and sending the second instruction to the interpretation operation environment;
s4, receiving a third instruction from the terminal, interpreting and executing the second instruction, and returning a function operation result and an operation step to the terminal.
Further, the configuration information includes an address and a Cookie of a remote server, and the remote server trusts connection access only when the Cookie of the remote server and the second instruction are consistent.
Further, in the step S4, when executing the second instruction, the system marks the process dictionary state of the internal process and the overhead condition of performance at the same time, and records the operation process of the CPU.
Further, the method also comprises a step S5, wherein the terminal displays the function operation result and the operation step to a user.
Further, the method further includes step S6 of monitoring memory information of the remote server, and the step S6 includes the following steps:
s61, compiling and packaging the etop instruction into an information acquisition module;
s62, pushing the information acquisition module into an internal process of the remote server;
s63, calling an operation function of the information acquisition module to acquire memory information of the remote server;
s64, returning a memory information acquisition result to the terminal.
Further, the memory information includes memory overhead, scheduling times, current operation functions and process mailbox queues.
Further, in step S62, the information collecting module is compiled into a byte code and uploaded as a user parameter of the second instruction to an internal process of the remote server.
After the technical scheme is adopted, compared with the background technology, the invention has the following advantages:
the system has the function of monitoring the states of the remote server and the process in real time, can discover and position the problems at the first time, in addition, the first instruction is assembled to form the second instruction with configuration information and user parameters, a new internal process is constructed in the remote server as a working environment for interpretation and operation of the second instruction, and when the remote server receives the third instruction, the second instruction is executed to complete the updating and replacement of fault codes of the remote server, and meanwhile, the whole function operation result and operation steps are returned, so that the operation process of the system is conveniently shown to a user of the terminal; the whole process can realize remote monitoring and thermal updating of a remote server without additionally arranging an HTTP port, and realize more efficient and convenient management.
Drawings
Fig. 1 is a schematic diagram of a system structure according to the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Example 1
As shown in fig. 1, a remote instruction management system of a remote server, the system connecting a terminal and the remote server, the system comprising:
(1) The command line identification module is used for carrying out pattern matching on user input and forming a first instruction;
the pattern matching of the embodiment matches the instruction input by the user through the pattern of < command > [ < arg > ] [ options ], thereby improving the normalization and the effectiveness of the matching command, the parameter and the user option; the matching information in the pattern matching comprises the following setting contents:
the torchptop matching instruction is used for finding out a process with higher consumption of the target server;
the torchpstate matching instruction is used for checking whether the state of the target process is abnormal or not;
the torchpinfo matching instruction is used for checking the internal condition scheduling condition and the current running condition of the process;
the torch redug matching instruction is used for debugging the suspicious point function and follows the stack process;
the torch update matching instruction is used for updating instruction codes;
the torch script matching instruction is used for establishing tasks or recovering abnormal data through scripts;
the torch run matching instruction is used for executing a target server designated function;
the torch sysinfo matching instruction is used for checking system information;
the torch-h/-v match instruction is used to present a help or version number, where-h represents the help information presentation of the specified command after command, -v is the version number.
The above settings: the first parameter torch is the name of the system, the second parameter ptop, pstate, pinfo is an instruction, the third parameter uses minus sign as prefix to represent user options, and the-c is a cookie.
If the first instruction is matched with the matching information, namely the first instruction passes verification, an effective first instruction is formed; if the match is not passed, all steps are ended.
(2) The instruction configuration module is used for configuring the first instruction and generating a second instruction, and the configuration comprises information configuration and instruction configuration; the second instruction includes configuration information and user parameters.
The information configuration is a second instruction configuration such as: the name, address and configuration information such as Cookie code used for establishing trust of the remote server; the format of the configuration information is as follows: configuration information is in brackets, data is in brackets, and is presented in a KV key value pair mode, such as: [ { node, 'tst@localhost', { cookie, 'abc',} ];
the instruction configuration is to configure an instruction for a second instruction as a user parameter of the second instruction, and the user parameter is in the format: { commands, [ { cookies, $c, 'Erlang cookie to use' } ] }, wherein $c is replaced and used as option-c, so that the command system has very good expansion in the framing, namely, the continuous integration problem caused by the insufficient expansibility is solved.
The module is mainly used for configuring the address of the remote server and establishing the Cookie code trusted by the remote server, and only if the remote server is consistent with the Cookie code of the system, the remote server trusts the connection access.
(3) The instruction synchronization module is used for constructing a new internal process in the remote server as an interpretation running environment of the second instruction; and the internal process adopts a tracking mode, and the process tracking is realized by marking a process dictionary of the process.
In this embodiment, the state of the internal process is marked as a hidden node process, and when the system and the remote server establish a connection, the remote server is not visible to the system, so that the problem that the remote server mistakenly considers the system as a service child node thereof is avoided, thereby causing confusion in recognition, and meanwhile, a developer does not need to care about the identity of a visitor.
Then, the second instruction extracts the server address and the Cookie code of the server, a TCP request is initiated, the remote server firstly receives the handshake request of the SOCKET, the server compares the Cookie code again, and the connection is marked as effective connection after the Cookie code is confirmed to be consistent.
Then, the configuration information of the second instruction and relevant user parameters are simultaneously sent to the interpretation operation environment of the second instruction under the system, and a third instruction is waited. After receiving the confirmation of completion of construction of the second instruction environment of the server, the system sends a third instruction, and the purpose of the instruction is to explain and execute the instruction content of the second instruction, so that the whole instruction synchronization process is completed.
(4) And the remote operation module receives a third instruction from the terminal, interprets and executes the second instruction and returns a function operation result and operation steps.
The third instruction is to execute the second instruction, then the second instruction runs, the running will generate two results, the first is the result of running the designated function, and the second is the result of running the running step of the process stack process, and the two results will be returned to the terminal through the connection and presented to the user of the system. And after the dispatching is completed, the terminal finishes displaying the result, closes the instruction process of the server side, closes the terminal session and exits, and the life cycle of one instruction is finished.
(5) The hot updating module is used for pushing the compiled byte code file to the remote server and replacing fault codes in the remote server;
firstly, preparing a module code to be updated, compiling the module code into a byte code file, and transmitting the byte code file to a root directory operated by a terminal; secondly, the system reads the compiled file in a binary mode, takes the byte code as a user parameter of a second instruction, starts to receive a file stream after the target server receives the second instruction, and returns to the terminal after completion of file receiving; and finally, the terminal confirms that the second instruction is finished, namely, the load_binary instruction is sent before the third instruction, the target server receives the load_binary to be loaded to the static code module stack in a binary mode, and then returns the completion of loading the alternative reference to the terminal.
(6) The remote monitoring module is used for monitoring the memory information of the remote server;
the configuration of the top instruction with the monitoring attribute is assembled into a second instruction, and the user parameter serving as the second instruction is uploaded into an internal process to collect the memory overhead, the scheduling times, the current operation function and the process mailbox queue of the system process, so that the ordering is performed.
(7) And the remote debugging module is used for debugging the progress of each module in the terminal, the node and the system.
The system of the embodiment can receive and identify a first instruction input by a user, generate a second instruction by combining system configuration information and user parameters, connect and inject the second instruction into a corresponding business internal process in a server according to the server name or address in the configuration information, and mark the running environment of the internal process and the stacking process in a process dictionary; finally, confirming that the second instruction of the server is received and completed, sending a third instruction to the marked process, explaining and executing the second instruction, and returning a result and a process marked running process after completion; therefore, the requirements of a developer on remote monitoring, operation, updating and debugging of the remote server are met, and development and management efficiency is more efficient and convenient.
Example two
A remote instruction management method for a remote server, the method being implemented by the remote instruction management system for a remote server according to the first embodiment, the method comprising the steps of:
s1, when a terminal has user input, the system carries out pattern matching on the user input, if an instruction input by the user meets the pattern matching, an effective first instruction is formed, and if the instruction input by the user does not meet the pattern matching, all the steps are terminated;
s2, configuring the first instruction and assembling to generate a second instruction; the configuration comprises information configuration and instruction configuration; the second instruction includes configuration information and user parameters.
The configuration information comprises the address and the Cookie code of the remote server, and the remote server trusts connection access only when the Cookie code of the remote server is consistent with the Cookie code of the second instruction.
The user parameters include specific instruction information.
The information configuration is a second instruction configuration such as: the name, address and configuration information such as Cookie code used for establishing trust of the remote server; the format of the configuration information is as follows: configuration information is in brackets, data is in brackets, and is presented in a KV key value pair mode, such as: [ { node, 'tst@localhost', { cookie, 'abc',} ];
the instruction configuration is to configure an instruction for a second instruction as a user parameter of the second instruction, and the user parameter is in the format: { commands, [ { cookies, $c, 'Erlang cookie to use' } ] }, wherein $c is replaced and used as option-c, so that the command system has very good expansion in the framing, namely, the continuous integration problem caused by the insufficient expansibility is solved.
S3, initiating a TCP request to the remote server through the second instruction to establish connection access, establishing a new internal process in the remote server as an interpretation operation environment of the second instruction, and sending the second instruction to the interpretation operation environment;
s4, receiving a third instruction from the terminal, interpreting and executing the second instruction, and returning a function operation result and an operation step to the terminal.
In the step S4, when executing the second instruction, the system marks the process dictionary state of the internal process and the overhead condition of performance at the same time, and records the operation process of the CPU.
And S5, the terminal displays the function operation result and the operation steps to a user.
S6, monitoring the memory information of the remote server, wherein the step S6 comprises the following steps:
s61, compiling and packaging the etop instruction into an information acquisition module;
s62, pushing the information acquisition module into an internal process of the remote server; the information acquisition module is compiled into byte codes and is used as a user parameter of the second instruction to be uploaded into an internal process of the remote server;
s63, calling an operation function of the information acquisition module to acquire memory information of the remote server; the memory information comprises memory overhead, scheduling times, current operation functions and a process mailbox queue;
s64, returning a memory information acquisition result to the terminal.
The present invention is not limited to the above-mentioned embodiments, and any changes or substitutions that can be easily understood by those skilled in the art within the technical scope of the present invention are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (9)

1. A remote command management system for a remote server, characterized in that: the system connects a terminal and a remote server, the system comprising:
the command line identification module is used for carrying out pattern matching on user input and forming a first instruction;
the instruction configuration module is used for configuring the first instruction and generating a second instruction, and the configuration comprises information configuration and instruction configuration; the second instruction comprises configuration information and user parameters;
the instruction synchronization module is used for constructing a new internal process in the remote server as an interpretation running environment of the second instruction;
the remote operation module receives a third instruction from the terminal, interprets and executes the second instruction, and returns a function operation result and an operation step;
the hot updating module is used for pushing the compiled byte code file to the remote server and replacing fault codes in the remote server;
the remote monitoring module is used for monitoring the memory information of the remote server;
and the remote debugging module is used for debugging the progress of each module in the terminal, the remote server and the system.
2. A remote instruction management system for a remote server as claimed in claim 1, wherein: and the internal process adopts a tracking mode, and the process tracking is realized by marking a process dictionary of the process.
3. A remote instruction management method of a remote server is characterized in that: the method is implemented based on a remote instruction management system of a remote server according to any of claims 1 to 2, the method comprising the steps of:
s1, when a terminal has user input, the system carries out pattern matching on the user input, if an instruction input by the user meets the pattern matching, an effective first instruction is formed, and if the instruction input by the user does not meet the pattern matching, all the steps are terminated;
s2, configuring information of the first instruction and assembling to generate a second instruction;
s3, initiating a TCP request to the remote server through the second instruction to establish connection access, establishing a new internal process in the remote server as an interpretation operation environment of the second instruction, and sending the second instruction to the interpretation operation environment;
s4, receiving a third instruction from the terminal, interpreting and executing the second instruction, and returning a function operation result and an operation step to the terminal.
4. A remote instruction management method for a remote server as claimed in claim 3, wherein: the configuration information comprises the address and the Cookie code of the remote server, and the remote server trusts connection access only when the Cookie code of the remote server is consistent with the Cookie code of the second instruction.
5. The remote instruction management method of claim 4, wherein: in the step S4, when executing the second instruction, the system marks the process dictionary state of the internal process and the overhead condition of performance at the same time, and records the operation process of the CPU.
6. The remote instruction management method of claim 5, wherein: the method further comprises a step S5, wherein the terminal displays the function operation result and the operation step to a user.
7. The remote instruction management method of claim 6, wherein: the method further comprises a step S6 of monitoring the memory information of the remote server, wherein the step S6 comprises the following steps:
s61, compiling and packaging the etop instruction into an information acquisition module;
s62, pushing the information acquisition module into an internal process of the remote server;
s63, calling an operation function of the information acquisition module to acquire memory information of the remote server;
s64, returning a memory information acquisition result to the terminal.
8. The remote instruction management method of claim 7, wherein: the memory information comprises memory overhead, scheduling times, current operation functions and process mailbox queues.
9. The remote instruction management method of claim 8, wherein: in step S62, the information collecting module is compiled into a byte code and uploaded as a user parameter of the second instruction to an internal process of the remote server.
CN202111041425.3A 2021-09-07 2021-09-07 Remote instruction management system and method for remote server Active CN113766024B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111041425.3A CN113766024B (en) 2021-09-07 2021-09-07 Remote instruction management system and method for remote server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111041425.3A CN113766024B (en) 2021-09-07 2021-09-07 Remote instruction management system and method for remote server

Publications (2)

Publication Number Publication Date
CN113766024A CN113766024A (en) 2021-12-07
CN113766024B true CN113766024B (en) 2024-03-22

Family

ID=78793259

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111041425.3A Active CN113766024B (en) 2021-09-07 2021-09-07 Remote instruction management system and method for remote server

Country Status (1)

Country Link
CN (1) CN113766024B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1848764A (en) * 2005-12-22 2006-10-18 华为技术有限公司 Server and network equipment long-distance management maintenance system and realizing method
CN102480749A (en) * 2010-11-25 2012-05-30 ***通信集团浙江有限公司 Method, device and system for remotely collecting host process information
KR20140049824A (en) * 2012-10-18 2014-04-28 서울대학교병원 (분사무소) System for remotely debugging an application programming and controlling method therefor
CN106708489A (en) * 2015-11-17 2017-05-24 杭州海康威视数字技术股份有限公司 Debugging method and system of equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1848764A (en) * 2005-12-22 2006-10-18 华为技术有限公司 Server and network equipment long-distance management maintenance system and realizing method
CN102480749A (en) * 2010-11-25 2012-05-30 ***通信集团浙江有限公司 Method, device and system for remotely collecting host process information
KR20140049824A (en) * 2012-10-18 2014-04-28 서울대학교병원 (분사무소) System for remotely debugging an application programming and controlling method therefor
CN106708489A (en) * 2015-11-17 2017-05-24 杭州海康威视数字技术股份有限公司 Debugging method and system of equipment

Also Published As

Publication number Publication date
CN113766024A (en) 2021-12-07

Similar Documents

Publication Publication Date Title
CN107704395B (en) Cloud platform automation test implementation method and system based on Openstack
CN1525318B (en) Remote program installing system and method for mobile computing device
CN109561104A (en) A kind of communication protocol conversion method and device
CN110198247A (en) Interface test method and system
CN111708702A (en) Simulation test method, client, server, system and readable storage medium
CN112073471A (en) Device control method and apparatus, storage medium, and electronic apparatus
CN113110864B (en) Application program updating method and device and storage medium
CN111159019B (en) Application program testing method, testing control terminal and testing terminal
CN112988485A (en) Simulation test method and device for power Internet of things equipment
CN108268365B (en) Abnormal task injection method, device and system
CN104754608A (en) Method and system for monitoring performances of mobile terminal
CN110932918A (en) Log data acquisition method and device and storage medium
CN112636966A (en) Application batch deployment method based on remote debugging protocol
WO2011153792A1 (en) Method and system for running state detection
CN112328470A (en) Automatic operation and maintenance testing method, device, equipment and storage medium
CN111885174A (en) Method and system for processing nodes of different network segments
EP2908498B1 (en) Integrated application generating system and method for internet of things terminal
CN114398115A (en) Visual pipeline generation method and device, storage medium and electronic equipment
CN113766024B (en) Remote instruction management system and method for remote server
CN112583663B (en) Automatic network performance testing method based on domestic operating system
CN111930565B (en) Process fault self-healing method, device and equipment for components in distributed management system
CN112559124A (en) Model management system and target operation instruction processing method and device
CN112615831A (en) Vulnerability scanning platform, method, equipment and medium based on industrial internet
CN113411214B (en) Operation maintenance method and device of base station equipment
CN113992739B (en) Local area network OTA firmware upgrading device, method and system

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