Nothing Special   »   [go: up one dir, main page]

CN113766024A - 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
CN113766024A
CN113766024A CN202111041425.3A CN202111041425A CN113766024A CN 113766024 A CN113766024 A CN 113766024A CN 202111041425 A CN202111041425 A CN 202111041425A CN 113766024 A CN113766024 A CN 113766024A
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.)
Granted
Application number
CN202111041425.3A
Other languages
Chinese (zh)
Other versions
CN113766024B (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

Images

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)
  • Computer And Data Communications (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a remote instruction management system and a 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 hot update module, a remote monitoring module and a remote debugging module; the method is realized based on the system. The system of the invention realizes remote monitoring, operation, updating and debugging of the remote server, and enables the development and management efficiency to be 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 frequently maintain, manage, debug and repair the server, 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 deal with program faults occurring at any time in an external network.
In the prior art, most developers can call methods through a web end by adding an HTTP port, but when a fault problem occurs and no corresponding interface exists, information can be obtained only through logs, the situation is analyzed through an external tool, the problem cannot be analyzed and positioned in the fastest time, and therefore slowness is caused, and further loss is caused due to problem deterioration.
Disclosure of Invention
In order to solve the above problems, the present invention provides a remote command management system and method for a remote server.
The invention adopts the following technical scheme:
a remote instruction management system of 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 mode 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 to serve as an interpretation and operation 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 an operation step.
Further, the system further comprises:
a hot update module for pushing the compiled bytecode file to the remote server and replacing a fault code 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 the terminal, the node and each module in the system.
Furthermore, the internal process adopts a tracking mode, and the process tracking is realized by marking a process dictionary of the process.
A remote instruction management method of a remote server is realized based on the remote instruction management system of the remote server, and comprises the following steps:
s1, when a user inputs at the terminal, the system carries out pattern matching on the user input, if the 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 steps are terminated;
s2, performing information configuration on 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 inside the remote server as an interpretation and operation environment of the second instruction, and sending the second instruction to the interpretation and operation environment;
and S4, receiving a third instruction from the terminal, interpreting and executing the second instruction, and returning the function operation result and the operation step to the terminal.
Further, the configuration information includes an address and a 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 that of the second instruction.
Further, in step S4, when the second instruction is executed, the system marks the process dictionary status and the performance overhead of the internal process at the same time, and records the operation process of the CPU.
Further, the method further includes step S5, and the terminal presents the function execution result and the executing step to the user.
Further, the method further includes step S6, monitoring the 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 to an internal process of the remote server;
s63, calling an operation function of the information acquisition module to acquire the memory information of the remote server;
and S64, returning the result of the memory information acquisition to the terminal.
Further, the memory information includes memory overhead, scheduling times, current operation function, and process mailbox queue.
Further, in step S62, the information collection module is compiled into bytecode and uploaded to the internal process of the remote server as the user parameter of the second instruction.
After adopting the technical scheme, compared with the background technology, the invention has the following advantages:
the system has the function of monitoring the state of the remote server and the process in real time, can find and position problems at the first time, and in addition, a second instruction with configuration information and user parameters is formed by assembling the first instruction, a new internal process is constructed in the remote server to serve as the working environment for explaining and operating the second instruction, when the remote server receives a third instruction, the second instruction is executed to complete the updating and replacing of the fault code of the remote server, and meanwhile, the whole function operation result and the operation step are returned, so that the operation process of the remote server can be conveniently displayed for a user of a terminal; the whole process can realize remote monitoring and hot updating of the remote server without additionally arranging an HTTP port, and more efficient and convenient management is realized.
Drawings
FIG. 1 is a schematic diagram of the system of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Example one
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 mode 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 matching commands, parameters and user options; the matching information in the pattern matching includes 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 emotion scheduling condition and the current running condition of the process;
the torch recog matching instruction is used for debugging the suspicious function and tracking the stack process;
the torch update matching instruction is used for updating an instruction code;
the torch script matching instruction is used for establishing a task or recovering abnormal data through a script;
the torch run matching instruction is used for executing a target server specified function;
the torch sysinfo matching instruction is used for viewing system information;
the torch-h/-v match instruction is used to expose help or version number, where-h after command represents help information exposure for a specified command, -v is version number.
The setting is as follows: the first parameter, torch, is the name of the system, the second parameter, ptop, pstate, pinfo, etc. are instructions, and the third parameter, prefixed by a minus number, represents a user option, e.g., -c is a cookie.
If the first instruction is matched with the matching information, the first instruction passes verification to form an effective first instruction; and if the matching is not passed, finishing all the steps.
(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 and address of the remote server and configuration information such as Cookie codes for establishing the trust of the remote server; the format of the configuration information is as follows: the configuration information is in middle brackets, the data is in curly brackets, and the configuration information is presented in KV key value pairs, 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 format of the user parameter is as follows: { commands, [ { cookie, $ c, ' Erlang cookie to use ' }, where $ c is replaced and used as option-c, makes a very good extension on the command system's framework, i.e., solves the persistent integration problem caused by insufficient extensibility.
The module is mainly used for configuring the address of the remote server and the Cookie code used for establishing the trust of the remote server, and the remote server trusts the connection access only if the Cookie code of the remote server is consistent with that of the system.
(3) The instruction synchronization module is used for constructing a new internal process in the remote server to serve as an interpretation and operation environment of the second instruction; 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 hidden node process, and when the system establishes connection with the remote server, the remote server is invisible to the system, so that not only is the problem that the remote server mistakenly considers the system as a service child node thereof to cause confusion of identification avoided, but also the problem that a developer does not care about the identity of an accessor is avoided.
And then, the second instruction extracts the server address and the Cookie code of the server and initiates a TCP request, 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 system sends the configuration information of the second instruction and the related user parameter to the interpretation running environment of the second instruction at the same time, and waits for a third instruction. After receiving the confirmation that the second instruction environment of the server is constructed, the system sends a third instruction, wherein the purpose of the third 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 an operation step.
The third instruction is to execute the second instruction, and then the second instruction is run, and the running will generate two results, the first is the result of running the specified function, and the second is the result of running 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 scheduling is finished, the terminal displays the result, the server instruction process is closed, the terminal session is closed and quit, and the life cycle of one instruction is finished.
(5) A hot update module for pushing the compiled bytecode file to the remote server and replacing a fault code in the remote server;
firstly, module codes to be updated need to be prepared, then the module codes are compiled into byte code files, and the byte code files are transmitted to a root directory operated by a terminal; the system reads the compiled file in a binary mode, takes the byte codes as user parameters of a second instruction, starts to receive the file stream after the target server receives the second instruction, and returns to the terminal to finish receiving the file after the second instruction is received; and finally, the terminal confirms that the second instruction is finished, namely, the terminal sends a load _ bind instruction before a third instruction, the target server receives the load _ bind and loads the load _ bind to the static code module stack in a binary mode, and then the terminal returns to finish loading the replacement reference.
(6) The remote monitoring module is used for monitoring the memory information of the remote server;
and configuring and assembling the ptop instruction with the monitoring attribute into a second instruction, uploading user parameters serving as the second instruction to an internal process, and collecting memory overhead, scheduling times, a current operation function and a process mailbox queue of a system process so as to perform sequencing.
(7) And the remote debugging module is used for debugging the progress of the terminal, the node and each module in the system.
The system of the embodiment can receive and recognize a first instruction input by a user, and generate a second instruction by combining system configuration information and user parameters, and then the system can connect and inject a corresponding service internal process in a server according to a server name or address in the configuration information, and process marks are carried out on a process dictionary on the running environment and the stack and stack processes of the internal process; finally, the completion of the reception of the second instruction of the server is confirmed, a third instruction is sent to the marked process, the second instruction is explained and executed, and the result and the operation process of the process marking are returned after the completion; therefore, the requirements of a developer on remote monitoring, operation, updating and debugging of the remote server are met, and the development and management efficiency is more efficient and convenient.
Example two
A remote instruction management method for a remote server, the method being implemented based on a remote instruction management system for a remote server according to the first embodiment, the method comprising:
s1, when a user inputs at the terminal, the system carries out pattern matching on the user input, if the 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 steps are terminated;
s2, configuring and assembling the first instruction 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 an address and a 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 that of the second instruction.
The user parameters include specific instruction information.
The information configuration is a second instruction configuration such as: the name and address of the remote server and configuration information such as Cookie codes for establishing the trust of the remote server; the format of the configuration information is as follows: the configuration information is in middle brackets, the data is in curly brackets, and the configuration information is presented in KV key value pairs, 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 format of the user parameter is as follows: { commands, [ { cookie, $ c, ' Erlang cookie to use ' }, where $ c is replaced and used as option-c, makes a very good extension on the command system's framework, i.e., solves the persistent integration problem caused by insufficient extensibility.
S3, initiating a TCP request to the remote server through the second instruction to establish connection access, establishing a new internal process inside the remote server as an interpretation and operation environment of the second instruction, and sending the second instruction to the interpretation and operation environment;
and S4, receiving a third instruction from the terminal, interpreting and executing the second instruction, and returning the function operation result and the operation step to the terminal.
In step S4, when the second instruction is executed, the system marks the process dictionary status and performance overhead of the internal process at the same time, and records the operation process of the CPU.
And S5, the terminal displays the function operation result and the operation step to the 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 to an internal process of the remote server; the information acquisition module is compiled into byte codes and uploaded to an internal process of the remote server as the user parameters of the second instruction;
s63, calling an operation function of the information acquisition module to acquire the memory information of the remote server; the memory information comprises memory overhead, scheduling times, a current operation function and a process mailbox queue;
and S64, returning the result of the memory information acquisition to the terminal.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A remote command management system for a remote server, comprising: the system connects a terminal and a remote server, the system comprising:
the command line identification module is used for carrying out mode 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 to serve as an interpretation and operation 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 an operation step.
2. The remote command management system of claim 1, wherein: the system further comprises:
a hot update module for pushing the compiled bytecode file to the remote server and replacing a fault code 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 the terminal, the remote server and each module in the system.
3. A remote server remote instruction management system according to claim 2, wherein: the internal process adopts a tracking mode, and the process tracking is realized by marking a process dictionary of the process.
4. A remote instruction management method of a remote server is characterized in that: the method is implemented based on a remote server remote instruction management system according to any one of claims 1 to 3, the method comprising the steps of:
s1, when a user inputs at the terminal, the system carries out pattern matching on the user input, if the 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 steps are terminated;
s2, performing information configuration on 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 inside the remote server as an interpretation and operation environment of the second instruction, and sending the second instruction to the interpretation and operation environment;
and S4, receiving a third instruction from the terminal, interpreting and executing the second instruction, and returning the function operation result and the operation step to the terminal.
5. The remote command management method of claim 4, wherein: the configuration information comprises an address and a 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 that of the second instruction.
6. The remote command management method of claim 5, wherein: in step S4, when the second instruction is executed, the system marks the process dictionary status and performance overhead of the internal process at the same time, and records the operation process of the CPU.
7. The remote command management method of claim 6, wherein: the method further comprises a step S5, and the terminal presents the function operation result and the operation step to the user.
8. The remote instruction management method of claim 7, wherein: the method further includes step S6, monitoring the memory information of the remote server, where step S6 includes the following steps:
s61, compiling and packaging the etop instruction into an information acquisition module;
s62, pushing the information acquisition module to an internal process of the remote server;
s63, calling an operation function of the information acquisition module to acquire the memory information of the remote server;
and S64, returning the result of the memory information acquisition to the terminal.
9. The remote instruction management method of claim 8, wherein: the memory information comprises memory overhead, scheduling times, a current operation function and a process mailbox queue.
10. The remote instruction management method of claim 9, wherein: in step S62, the information collection module is compiled into bytecode and uploaded to an internal process of the remote server as the user parameter of the second instruction.
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 true CN113766024A (en) 2021-12-07
CN113766024B 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
CN113766024B (en) 2024-03-22

Similar Documents

Publication Publication Date Title
CN107704395B (en) Cloud platform automation test implementation method and system based on Openstack
CN109492181B (en) Page jump method, device, computer equipment and storage medium
CN106484611B (en) Fuzzy test method and device based on automatic protocol adaptation
CN113110864B (en) Application program updating method and device and storage medium
CN110928625A (en) Application program operation control method and device, electronic equipment and storage medium
CN112636966A (en) Application batch deployment method based on remote debugging protocol
CN111159019A (en) Application program testing method, testing control terminal and testing terminal
CN112181477A (en) Complex event processing method and device and terminal equipment
JP3757235B2 (en) Native compilation method, native compilation preprocessing method, computer program, server, communication system, and mobile communication terminal device
CN115913872A (en) Server monitoring operation and maintenance method, device, equipment and medium
CN115396248A (en) Remote equipment control method, device, system, electronic device and storage medium
CN113766024A (en) Remote instruction management system and method for remote server
CN114398115A (en) Visual pipeline generation method and device, storage medium and electronic equipment
CN103176903B (en) The test method and equipment of MapReduce distributed system program
Hine et al. Scalable emulation of enterprise systems
CN112241356A (en) Page testing method, device, equipment and storage medium
CN114925516B (en) Automatic modeling and simulating method and device
CN113411214B (en) Operation maintenance method and device of base station equipment
CN113992739B (en) Local area network OTA firmware upgrading device, method and system
CN114281563A (en) Application program reconstruction method and device
CN112433938A (en) Method and device for testing application of mobile terminal
CN113420409A (en) Relay protection device operation state prediction method based on deep learning
CN110083363B (en) Method for intercepting wireless data packet in Linux kernel dynamic injection mode
CN114691125B (en) Method, system, medium and electronic equipment for applying resource mapping conversion
CN110377463A (en) Interface test method, device, terminal and computer readable storage medium

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