CN111736935A - Method and system for realizing in-band and out-band concurrent detection and in-band operation imaging - Google Patents

Method and system for realizing in-band and out-band concurrent detection and in-band operation imaging Download PDF

Info

Publication number
CN111736935A
CN111736935A CN202010482336.1A CN202010482336A CN111736935A CN 111736935 A CN111736935 A CN 111736935A CN 202010482336 A CN202010482336 A CN 202010482336A CN 111736935 A CN111736935 A CN 111736935A
Authority
CN
China
Prior art keywords
band
detection
host
module
mythread
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
CN202010482336.1A
Other languages
Chinese (zh)
Other versions
CN111736935B (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010482336.1A priority Critical patent/CN111736935B/en
Publication of CN111736935A publication Critical patent/CN111736935A/en
Application granted granted Critical
Publication of CN111736935B publication Critical patent/CN111736935B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention provides a realization method and a realization system for in-band and out-band concurrent detection and in-band operation imaging. Creating a BaseDesk main interface function for a host with in-band concurrent detection to realize basic level interface display; and executing the import and export of the host file, and displaying the prompt of the abnormal popup box and the menu bar function button. The invention improves the efficiency of operation in an in-band system, avoids the complicated operation of inputting user names and passwords once and the waste of time, reduces the labor cost, and simultaneously, the graphical interface operation is more intuitive and the operation of other instructions is easier.

Description

Method and system for realizing in-band and out-band concurrent detection and in-band operation imaging
Technical Field
The invention relates to the technical field of server operation and maintenance, in particular to a method and a system for realizing in-band and out-band concurrent detection and in-band operation imaging.
Background
In the process of server operation and maintenance, engineers often feed back that the field maintenance server sometimes enters the operating system to perform related operations besides hardware maintenance, for example, a client requires to modify files under the operating system or remotely execute in-band instructions to collect the current state of the system and system log files, so as to determine abnormal conditions in the server operation from both software and hardware perspectives.
In the prior art, when an operating system is entered for relevant operation, a user name and a password need to be input each time, so that the process is complicated, and time is wasted. In addition, in the prior art, concurrency and single-machine execution cannot be realized, and in the prior art, command line display is adopted, so that graphical interface display is lacked.
Disclosure of Invention
In order to solve the technical problems, the invention provides a method for realizing in-band and out-band concurrent detection and in-band operation imaging. By multiplexing the multithreading function Mythread, the dual concurrent execution of connectivity detection and in-band execution instructions is realized, and both function selection and result presentation are embodied in an interface graphical mode, so that the efficiency of in-band operation of the system is improved.
In order to achieve the purpose, the invention adopts the following technical scheme: an in-band and out-band concurrent detection and in-band operation imaging realization method comprises the following steps:
instantiating a Mythread function when an Fping tool is used for ping detection, carrying out ssh login test on a host which passes the ping detection after the Mythread function is instantiated on the basis of ensuring the IP communication of the host, so as to realize in-band concurrent detection, or carrying out ssh login test and ipmitool test on the host which passes the ping detection after the Mythread function is instantiated in sequence so as to realize out-of-band concurrent detection, and returning an IP signal and a detection result of the host to the instantiated Mythread;
a tkiner module is adopted for a host with in-band concurrent detection to create a BaseDesk main interface function, so as to realize basic level interface display; and adopting a filemediate module to execute the import and export of the host file, and adopting a messShow module to display the prompt of the abnormal popup box and the menu bar function button.
Further, before executing step S1, the method further includes:
receiving IP information of a host to be detected and receiving an in-band concurrent detection command;
or receiving IP information of the host to be detected and receiving an out-of-band concurrent detection command.
Further, the host passing the out-of-band concurrent detection is stored in an out-of-band resource pool.
Further, the hosts which pass the in-band concurrent detection are stored in an in-band resource pool.
Further, after receiving the automatic call Remote Command, the host storing the in-band resource pool concurrently executes the in-band Command.
Further, the process of concurrently executing the in-band instruction is as follows:
calling a paramiko module to instantiate the ssh connection and then carry out login verification, transmitting the execution to be executed into the instantiated ssh connection and executing, and returning an output value through stdout and an error value through stderr;
a front-end presentation field is defined based on the output value and the error value.
Further, a LogCollect function is adopted to carry out normalization processing on results of concurrent execution of in-band instructions and write the results into a log file in real time.
The invention also provides a system for realizing in-band and out-band concurrent detection and in-band operation imaging, which comprises an in-band and out-band detection module and an in-band display module;
the in-band and out-band detection module is used for instantiating a Mythread function when the Fping detection is carried out by adopting an Fping tool, carrying out ssh login test on a host which passes the ping detection after the Mythread function is instantiated to realize in-band concurrent detection on the basis of ensuring the IP communication of the host, or carrying out ssh login test and ipmitool test on the host which passes the ping detection after the Mythread function is instantiated in sequence to realize out-band concurrent detection, and returning the IP signal and the detection result of the host to the instantiated Mythread;
the in-band display module is used for creating a BaseDesk main interface function by adopting a tkater module for a host with in-band concurrent detection to realize basic level interface display; and adopting a filemediate module to execute the import and export of the host file, and adopting a messShow module to display the prompt of the abnormal popup box and the menu bar function button.
Further, the system also comprises a command receiving module;
the receiving command module is used for receiving IP information of the host to be detected and receiving commands of in-band concurrent detection; or receiving IP information of the host to be detected and receiving an out-of-band concurrent detection command.
Further, the in-band and out-of-band detection module comprises an in-band detection module and an out-of-band detection module;
the in-band detection module is used for instantiating the Mythread function when the Fping tool is used for ping detection, performing ssh login test on a host which passes the ping detection after the Mythread function is instantiated on the basis of ensuring the IP communication of the host, so as to realize in-band concurrent detection, and returning an IP signal and a detection result of the host to the instantiated Mythread;
the out-of-band detection module is used for instantiating the Mythread function when the Fping tool is used for ping detection, sequentially carrying out ssh login test and ipmitool test on the host which passes the ping detection after the Mythread function is instantiated on the basis of ensuring the IP communication of the host so as to realize out-of-band concurrent detection, and returning the IP signal and the detection result of the host to the instantiated Mythread.
The effect provided in the summary of the invention is only the effect of the embodiment, not all the effects of the invention, and one of the above technical solutions has the following advantages or beneficial effects:
the invention has proposed a in-band inside and outside concurrent detection and in-band operation graphical implementation method and system, this method receives the host computer IP information to be detected and receives the order of in-band concurrent detection at first; or receiving IP information of the host to be detected and receiving an out-of-band concurrent detection command. The method comprises the steps of instantiating a Mythread function when an Fping tool is used for ping detection, carrying out ssh login test on a host which passes the ping detection after the Mythread function is instantiated on the basis of ensuring the IP communication of the host, so as to realize in-band concurrent detection, or carrying out ssh login test and ipmitool test on the host which passes the ping detection after the Mythread function is instantiated in sequence, so as to realize out-band concurrent detection, and returning an IP signal and a detection result of the host to instantiate Mythread. Then, creating a BaseDesk main interface function for a host with in-band concurrent detection by adopting a tkater module to realize basic level interface display; and adopting a filemediate module to execute the import and export of the host file, and adopting a messShow module to display the prompt of the abnormal popup box and the menu bar function button. The invention can realize the connectivity detection of the out-of-band BMC IP address and the connectivity detection of the in-band OS IP by combining the open-source Fping, the ipmitool tool and the python open-source module, and simultaneously realize the execution of the in-band OS lower instruction and the graphical tool for displaying the execution result. By multiplexing the multithreading function Mythread, the dual concurrent execution of connectivity detection and in-band execution instructions is realized, the development and display are carried out by combining a front end, and all functions of the tool are embodied in a mode of key operation of an interface and a result display box. The invention improves the efficiency of operation in an in-band system, avoids the complicated operation of inputting a user name and a password once and the waste of time, reduces the labor cost, simultaneously has more visual graphical interface operation and easier operation of other instructions, and records the tool execution result in a log mode so as to be convenient for later-stage check.
Drawings
Fig. 1 is a flowchart of an implementation method for in-band and out-of-band concurrency detection and in-band operation imaging provided in embodiment 1 of the present invention;
fig. 2 is a schematic diagram of an implementation system for in-band and out-of-band concurrency detection and in-band operation patterning provided in embodiment 1 of the present invention.
Detailed Description
In order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
Example 1
The embodiment 1 of the invention discloses a method and a system for realizing in-band and out-of-band concurrent detection and in-band operation imaging. By multiplexing a multithreading function Mythread, the dual concurrent execution of connectivity detection and in-band execution instructions is realized, the development and display are carried out by combining a front end, and all functions of the tool are embodied in a mode of key operation and a result display frame of an interface
Fig. 1 shows a flowchart of an implementation method of in-band and out-of-band concurrent detection and in-band operation patterning.
In step S101, host IP information to be detected is received, and the host IP information to be detected is represented in an excel table.
In step S102, in-band connectivity detection or out-of-band connectivity detection is selected. If out-of-band connectivity detection is selected, step S103 is performed. If in-band connectivity detection is selected, step S104 is performed.
In step S103, instantiating the Mythread function when performing ping detection by using the Fping tool, sequentially performing ssh login test and ipmitool test on the host that passes the ping detection after instantiating the Mythread function on the basis of ensuring the host IP connectivity, so as to implement out-of-band concurrent detection, and returning the host IP signal and the detection result to the instantiated Mythread.
The multithreading function Mythread is developed by adopting the threading module of the python language. Defining a validamfg function, integrating the popen functions of an Fping tool, an ipmitool tool and an os module, and carrying out ping- > ssh- > ipmitool three-level linkage detection on an incoming host IP. And if the three-level linkage tests pass, the out-of-band concurrent test passes, if the three-level linkage test passes, executing the step S105, otherwise, executing the step S106.
In step S105, the detection is discarded and the reason is displayed at the front end.
In step S106, the process proceeds to the out-of-band resource pool list.
In step S104, instantiating the Mythread function when performing ping detection by using the Fping tool, performing ssh login test on the host that passes the ping detection after instantiating the Mythread function on the basis of ensuring the IP connectivity of the host, so as to implement in-band concurrent detection, and returning the IP signal and the detection result of the host to the instantiated Mythread. And 7, carrying out ping- > ssh test on the incoming host IP, if the tests are passed, executing the step S107, otherwise, executing the step S105.
In step S107, the process proceeds to an in-band resource pool list.
In step S108, after receiving the automatic call request _ Command, the host storing the in-band resource pool concurrently executes the in-band Command. The interface function jumps to the interface of in-band Command execution, and the Remote _ Command function defines the overall layout of the instruction execution interface and the division of the functional modules
In step S109, invoking the paramiko module to instantiate the ssh connection, performing login verification, transferring the execution to be executed to the instantiated ssh connection, executing, returning an output value through stdout, and returning an error value through stderr; a front-end presentation field is defined based on the output value and the error value.
The concurrent execution of the in-band instruction requires calling a paramiko module and instantiating ssh connection, login verification is performed after the ssh connection is instantiated, the instruction to be executed is transmitted into the instantiated ssh connection and executed after the verification, an output result and an error value are respectively returned through stdout and stderr, and a specific front-end display field is redefined according to output and error feedback, so that front-end display can be clear at a glance. Because each instantiated connection is passed into the Mythread concurrency function, simultaneous execution of all connections is achieved
In step S110, it is determined whether to log in remotely for a second determination, and if so, step S111 is performed, otherwise, step S110 is looped.
In step S111, the in-band instruction execution result is fed back to the front end and also transmitted to the self-defined LogCollect function, and the function normalizes the input value and writes the normalized value into the log file at all times to realize accurate recording of the result.
The embodiment of the present invention further provides an implementation system for in-band and out-of-band concurrency detection and in-band operation imaging, and fig. 2 is a schematic diagram of an implementation system for in-band and out-of-band concurrency detection and in-band operation imaging provided in embodiment 1 of the present invention, where the system includes: the system comprises an in-band and out-band detection module and an in-band display module; the in-band and out-band detection module is used for instantiating a Mythread function when the Fping detection is carried out by adopting an Fping tool, carrying out ssh login test on a host which passes the ping detection after the Mythread function is instantiated to realize in-band concurrent detection on the basis of ensuring the IP communication of the host, or carrying out ssh login test and ipmitool test on the host which passes the ping detection after the Mythread function is instantiated in sequence to realize out-band concurrent detection, and returning the IP signal and the detection result of the host to the instantiated Mythread; the in-band display module is used for creating a BaseDesk main interface function by adopting a tkater module for a host with in-band concurrent detection to realize basic level interface display; and adopting a filemediate module to execute the import and export of the host file, and adopting a messShow module to display the prompt of the abnormal popup box and the menu bar function button.
The system also comprises a command receiving module; the receiving command module is used for receiving IP information of the host to be detected and receiving commands of in-band concurrent detection; or receiving IP information of the host to be detected and receiving an out-of-band concurrent detection command.
The in-band and out-of-band detection module comprises an in-band detection module and an out-of-band detection module; the in-band detection module is used for instantiating the Mythread function when the Fping tool is used for ping detection, performing ssh login test on a host which passes the ping detection after the Mythread function is instantiated on the basis of ensuring the IP communication of the host, so as to realize in-band concurrent detection, and returning an IP signal and a detection result of the host to the instantiated Mythread; the out-of-band detection module is used for instantiating the Mythread function when the Fping tool is used for ping detection, sequentially carrying out ssh login test and ipmitool test on the host which passes the ping detection after the Mythread function is instantiated on the basis of ensuring the IP communication of the host so as to realize out-of-band concurrent detection, and returning the IP signal and the detection result of the host to the instantiated Mythread.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, the scope of the present invention is not limited thereto. Various modifications and alterations will occur to those skilled in the art based on the foregoing description. And are neither required nor exhaustive of all embodiments. On the basis of the technical scheme of the invention, various modifications or changes which can be made by a person skilled in the art without creative efforts are still within the protection scope of the invention.

Claims (10)

1. An in-band and out-band concurrent detection and in-band operation imaging realization method is characterized by comprising the following steps:
instantiating a Mythread function when an Fping tool is used for ping detection, carrying out ssh login test on a host which passes the ping detection after the Mythread function is instantiated on the basis of ensuring the IP communication of the host, so as to realize in-band concurrent detection, or carrying out ssh login test and ipmitool test on the host which passes the ping detection after the Mythread function is instantiated in sequence so as to realize out-of-band concurrent detection, and returning an IP signal and a detection result of the host to the instantiated Mythread;
a tkiner module is adopted for a host with in-band concurrent detection to create a BaseDesk main interface function, so as to realize basic level interface display; and adopting a filemediate module to execute the import and export of the host file, and adopting a messShow module to display the prompt of the abnormal popup box and the menu bar function button.
2. The method for implementing in-band and out-of-band concurrency detection and in-band operation patterning as claimed in claim 1, further comprising, before performing step S1:
receiving IP information of a host to be detected and receiving an in-band concurrent detection command;
or receiving IP information of the host to be detected and receiving an out-of-band concurrent detection command.
3. The method of claim 2, wherein the host that passes the out-of-band concurrency detection is stored in an out-of-band resource pool.
4. The method for implementing in-band and out-of-band concurrency detection and in-band operation patterning as claimed in claim 2, wherein the host that passes the in-band concurrency detection is stored in an in-band resource pool.
5. The method of claim 4, wherein the host computer storing the in-band resource pool receives an auto-call Remote Command and then executes the in-band Command.
6. The method for implementing in-band and out-of-band concurrency detection and in-band operation patterning according to claim 5, wherein the process of concurrently executing in-band instructions is as follows:
calling a paramiko module to instantiate the ssh connection and then carry out login verification, transmitting the execution to be executed into the instantiated ssh connection and executing, and returning an output value through stdout and an error value through stderr;
a front-end presentation field is defined based on the output value and the error value.
7. The method for realizing in-band and out-band concurrent detection and in-band operation imaging according to claim 6, wherein a LogiCollect function is adopted to normalize the results of concurrently executing in-band instructions and write the results into a log file in real time.
8. An implementation system for in-band and out-band concurrent detection and in-band operation imaging is characterized by comprising an in-band and out-band detection module and an in-band display module;
the in-band and out-band detection module is used for instantiating a Mythread function when the Fping detection is carried out by adopting an Fping tool, carrying out ssh login test on a host which passes the ping detection after the Mythread function is instantiated to realize in-band concurrent detection on the basis of ensuring the IP communication of the host, or carrying out ssh login test and ipmitool test on the host which passes the ping detection after the Mythread function is instantiated in sequence to realize out-band concurrent detection, and returning the IP signal and the detection result of the host to the instantiated Mythread;
the in-band display module is used for creating a BaseDesk main interface function by adopting a tkater module for a host with in-band concurrent detection to realize basic level interface display; and adopting a filemediate module to execute the import and export of the host file, and adopting a messShow module to display the prompt of the abnormal popup box and the menu bar function button.
9. The system for implementing in-band and out-of-band concurrency detection and in-band operation patterning as claimed in claim 8, wherein the system further comprises a command receiving module;
the receiving command module is used for receiving IP information of the host to be detected and receiving commands of in-band concurrent detection; or receiving IP information of the host to be detected and receiving an out-of-band concurrent detection command.
10. The system for implementing in-band and out-of-band concurrent detection and in-band operation patterning as claimed in claim 8, wherein the in-band and out-of-band detection module comprises an in-band detection module and an out-of-band detection module;
the in-band detection module is used for instantiating the Mythread function when the Fping tool is used for ping detection, performing ssh login test on a host which passes the ping detection after the Mythread function is instantiated on the basis of ensuring the IP communication of the host, so as to realize in-band concurrent detection, and returning an IP signal and a detection result of the host to the instantiated Mythread;
the out-of-band detection module is used for instantiating the Mythread function when the Fping tool is used for ping detection, sequentially carrying out ssh login test and ipmitool test on the host which passes the ping detection after the Mythread function is instantiated on the basis of ensuring the IP communication of the host so as to realize out-of-band concurrent detection, and returning the IP signal and the detection result of the host to the instantiated Mythread.
CN202010482336.1A 2020-05-29 2020-05-29 Method and system for realizing in-band and out-band concurrent detection and in-band operation imaging Active CN111736935B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010482336.1A CN111736935B (en) 2020-05-29 2020-05-29 Method and system for realizing in-band and out-band concurrent detection and in-band operation imaging

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010482336.1A CN111736935B (en) 2020-05-29 2020-05-29 Method and system for realizing in-band and out-band concurrent detection and in-band operation imaging

Publications (2)

Publication Number Publication Date
CN111736935A true CN111736935A (en) 2020-10-02
CN111736935B CN111736935B (en) 2022-07-08

Family

ID=72648044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010482336.1A Active CN111736935B (en) 2020-05-29 2020-05-29 Method and system for realizing in-band and out-band concurrent detection and in-band operation imaging

Country Status (1)

Country Link
CN (1) CN111736935B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112367415A (en) * 2021-01-14 2021-02-12 腾讯科技(深圳)有限公司 Generation method and device of attribute information, electronic equipment and computer readable medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168877A (en) * 2017-05-19 2017-09-15 郑州云海信息技术有限公司 A kind of method for carrying out remote testing to server based on Python
CN111181808A (en) * 2019-12-28 2020-05-19 苏州浪潮智能科技有限公司 Method and system for testing BMC IP access control

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168877A (en) * 2017-05-19 2017-09-15 郑州云海信息技术有限公司 A kind of method for carrying out remote testing to server based on Python
CN111181808A (en) * 2019-12-28 2020-05-19 苏州浪潮智能科技有限公司 Method and system for testing BMC IP access control

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112367415A (en) * 2021-01-14 2021-02-12 腾讯科技(深圳)有限公司 Generation method and device of attribute information, electronic equipment and computer readable medium

Also Published As

Publication number Publication date
CN111736935B (en) 2022-07-08

Similar Documents

Publication Publication Date Title
US9727407B2 (en) Log analytics for problem diagnosis
US8510720B2 (en) System landscape trace
CN107102947B (en) ATM transaction flow testing device and method
WO2015026680A1 (en) Cloud deployment infrastructure validation engine
CN104731566B (en) Integrated Development Environment test device, method and system
CN115686540B (en) RPA control method and system based on Hongmong system
US20080059436A1 (en) Providing a visual representation of a sub-set of a visual program
CN111736935B (en) Method and system for realizing in-band and out-band concurrent detection and in-band operation imaging
US9208058B2 (en) Providing directional debugging breakpoints
CN113656304B (en) Testing method, device and storage medium of front-end application program
WO2024078601A1 (en) Icon detection script generation method, and device and storage medium
CN105630664A (en) Reverse debugging method and device as well as debugger
CN109471763A (en) Grab method, apparatus, equipment and the system of NVME hard disk trace
US11182131B2 (en) System and method that support production management
Seifermann Application performance monitoring in microservice-based systems
US20090164978A1 (en) Method and system for providing post-mortem service level debugging
CN114297062A (en) Service testing method and device, electronic equipment and storage medium
KR20080047248A (en) Security testing apparatus and method of remote remote procedure call software
CN110134559B (en) BMC fault detection method, system and related components
CN114218072A (en) Test script generation method and device, storage medium and computer equipment
CN110413153B (en) False touch prevention method and device and storage medium
CN112363707A (en) Control layer general scheduling method based on JAVA reflection technology
CN111143206A (en) Data acquisition method and device, electronic equipment and storage medium
CN113778860B (en) Model detection-based system runtime verification method, system and computer equipment
CN112732576B (en) Automatic testing method, device and equipment based on user interface

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