SPDK service process monitoring method, device, equipment, storage medium and program product

Send monitoring data acquisition commands to the target chip through the target serial port, parse the response data and perform real-time updates, solving the problem of monitoring the running status of the SPDK service process, realizing real-time monitoring and fault detection of equipment, and improving operation and maintenance efficiency and equipment availability.

CN115981956BActive Publication Date: 2025-01-21SUMA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211692511.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-28
Publication Date
2025-01-21
Estimated Expiration
2042-12-28

AI Technical Summary

Technical Problem

It is difficult for the existing technology to monitor the operating status of equipment under the control of SPDK service processes in real time, and there are lack of relevant operation and maintenance methods such as real-time monitoring of the operating status of SPDK service processes.

Method used

Send monitoring data acquisition commands to the target chip through the target serial port, receive and parse the response data of the target chip, obtain the operating status data of the equipment controlled by the SPDK service process, and perform real-time updates and fault alarms through the data processing module.

Benefits of technology

It realizes real-time monitoring and fault detection of equipment controlled by the SPDK service process, improves the real-time performance and automation of operation and maintenance methods, shortens equipment abnormality time, and improves the high availability of equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115981956B_ABST
    Figure CN115981956B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, equipment, storage medium and program product for monitoring an SPDK service process, which is used in a BMC. The method includes: sending a monitoring data acquisition command to a target chip through a target serial port, wherein the target chip is deployed with an SPDK service process; receiving monitoring data sent by the target chip through the target serial port in response to the monitoring data acquisition command; parsing and processing the monitoring data to obtain the operating status data of the target device controlled by the SPDK service process. The present application sends a monitoring data acquisition command to a target chip through a target serial port to obtain the operating status data of the target device controlled by the SPDK service process. Based on this method, the purpose of real-time monitoring of the operating status of the target device controlled by the SPDK service process can be achieved, that is, the purpose of real-time monitoring of the operating status of the SPDK service process is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server monitoring technology, and in particular to a SPDK service process monitoring method, device, equipment, storage medium and program product. Background Art

[0002] The Storage Performance Development Kit (SPDK) service process is an encapsulated storage framework. It exists as a service process on the SOC (System on Chip) operating system in the accelerator card. It stores the device driver code and uses user-mode driver, which makes it impossible to directly view the operating status information of the device under the control of the SPDK service process.

[0003] In traditional technologies, developers manually type corresponding commands into the SOC operating system through tools such as iostat, nvme-cli, and rpc, and then obtain the device's operating status information from the SPDK service process.

[0004] However, in traditional technologies, obtaining the operating status information of the device under the control of the SPDK service process requires developers to enter commands, and there is a lack of relevant operation and maintenance means such as real-time monitoring of the operating status of the SPDK service process. Summary of the invention

[0005] Based on this, it is necessary to provide an SPDK service process monitoring method, device, equipment, storage medium and program product that can monitor the running status of the SPDK service process in real time to address the above technical problems.

[0006] In the first aspect, the present application provides a method for monitoring an SPDK service process. Used in a BMC, the method comprises: sending a monitoring data acquisition command to a target chip through a target serial port, wherein the target chip is deployed with an SPDK service process; receiving monitoring data sent by the target chip through the target serial port in response to the monitoring data acquisition command; parsing and processing the monitoring data to obtain the operating status data of the target device controlled by the SPDK service process.

[0007] In one of the embodiments, before sending a monitoring data acquisition command to a target chip through a target serial port, the method further includes: obtaining an original monitoring data acquisition command, which is a command supported by an SPDK service process monitoring tool; splitting the original monitoring data acquisition command to obtain original command data; and encapsulating the original command data according to a protocol type corresponding to the target serial port to obtain a monitoring data acquisition command.

[0008] The original monitoring data acquisition command is split to obtain the original command data, and then the original command data is encapsulated according to the protocol type corresponding to the target serial port to obtain the monitoring data acquisition command, so that the monitoring data acquisition command can be input to the target chip through the target serial port, and then the SPDK service process deployed on the target chip responds, avoiding the defect of developers inputting commands to the target chip in traditional technology.

[0009] In one of the embodiments, after parsing the monitoring data to obtain the operating status data of the target device controlled by the SPDK service process, the method also includes: if the type of the operating status data is a linear data type, writing the operating status data into a target file in the form of a key-value pair; reading the target file through a data acquisition thread to update the linear sensor reading according to the monitoring data; after updating the linear sensor reading, determining whether the updated linear sensor reading exceeds the target preset range, and if so, generating a first fault log and outputting a first fault alarm.

[0010] For the running status data of the linear data type, the linear sensor reading value is updated by reading the JSON file through the data acquisition thread, and the updated linear sensor reading value is judged whether it exceeds the target preset range, so as to achieve the purpose of real-time monitoring of the running status of the target device controlled by the SPDK service process. In addition, when the updated linear sensor reading value exceeds the target preset range, the first fault log and the first fault alarm are generated, realizing the operation and maintenance means of event reporting.

[0011] In one of the embodiments, after parsing the monitoring data to obtain the operating status data of the target device controlled by the SPDK service process, the method also includes: if the type of the operating status data is a discrete data type, determining the target state of the target device according to the operating status data; and performing a target monitoring operation according to the target state.

[0012] In one of the embodiments, a target monitoring operation is performed according to a target state, including: if the target state is a normal state, updating a reading of a discrete sensor corresponding to the target device according to the target state; if the target state is an abnormal state, generating a second fault log and outputting a second fault alarm.

[0013] In one of the embodiments, generating a second fault log includes: sending an operation data acquisition command and a log data acquisition command to a target chip through a target serial port; receiving device operation data of a target device sent by the target chip through the target serial port in response to the operation data acquisition command, and receiving log data sent by the target chip through the target serial port in response to the log data acquisition command; generating a second fault log based on the device operation data and the log data.

[0014] For the operation status data of discrete data types, by determining the target state of the target device according to the operation status data, and then performing the corresponding target monitoring according to the target state, the purpose of real-time monitoring of the operation status of the target device controlled by the SPDK service process can be achieved. In addition, when the target state of the target device is abnormal, a second fault log and a second fault alarm are generated, realizing the operation and maintenance means of event reporting.

[0015] In one of the embodiments, the method further includes: if the target state is an abnormal state, restarting the target device.

[0016] Restarting the target device realizes automatic recovery of the target device, shortens the abnormal time of the target device, and thus improves the high availability of the target device.

[0017] In one of the embodiments, after sending a monitoring data acquisition command to a target chip through a target serial port, the method further includes: detecting whether the monitoring data sent by the target chip is received within a preset time length; if the monitoring data sent by the target chip is not received within the preset time length, detecting whether the number of retransmissions of the monitoring data acquisition command reaches a preset number threshold; if the preset number threshold is not reached, resending the monitoring data acquisition command to the target chip; if the preset number threshold is reached, generating a third fault log and outputting a third fault alarm.

[0018] After the BMC sends a monitoring data acquisition command to the target chip, it can monitor the operating status of the target device controlled by the SPDK service process in real time by detecting whether the monitoring data is received and determining whether the number of times the monitoring data acquisition command is sent to the target chip exceeds the preset threshold.

[0019] In the second aspect, the present application also provides an SPDK service process monitoring device. Used in a BMC, the device includes: a sending module, used to send a monitoring data acquisition command to a target chip through a target serial port, wherein the target chip is deployed with an SPDK service process; a receiving module, used to receive monitoring data sent by the target chip through the target serial port in response to the monitoring data acquisition command; a processing module, used to parse and process the monitoring data to obtain the operating status data of the target device controlled by the SPDK service process.

[0020] In one of the embodiments, before the sending module sends the monitoring data acquisition command to the target chip through the target serial port, it is also used to obtain the original monitoring data acquisition command, which is a command supported by the SPDK service process monitoring tool; the original monitoring data acquisition command is split and processed to obtain the original command data; the original command data is encapsulated according to the protocol type corresponding to the target serial port to obtain the monitoring data acquisition command.

[0021] In one of the embodiments, the device also includes a data update processing module; the processing module is also used to send the operating status data to the data update processing module if the type of the operating status data is a linear data type, and the data update processing module is used to write the operating status data in the form of a key-value pair into a target file; the target file is read through a data acquisition thread to update the linear sensor reading according to the monitoring data; after updating the linear sensor reading, it is determined whether the updated linear sensor reading exceeds the target preset range, and if so, a first fault log is generated and a first fault alarm is output.

[0022] In one embodiment, the device also includes a process detection processing module; the processing module is also used to send the running status data to the process detection processing module if the type of the running status data is a discrete data type, and the process detection processing module is used to determine the target state of the target device based on the running status data; and perform target monitoring operations based on the target state.

[0023] In one of the embodiments, the process detection processing module is specifically used to update the reading value of the discrete sensor corresponding to the target device according to the target state if the target state is a normal state; if the target state is an abnormal state, generate a second fault log and output a second fault alarm.

[0024] In one of the embodiments, the process detection processing module is also used to send an operation data acquisition command and a log data acquisition command to the target chip through the target serial port; receive device operation data of the target device sent by the target chip through the target serial port in response to the operation data acquisition command, and receive log data sent by the target chip through the target serial port in response to the log data acquisition command; generate a second fault log based on the device operation data and the log data.

[0025] In one of the embodiments, the process detection processing module is further used to restart the target device if the target state is an abnormal state.

[0026] In one of the embodiments, the sending module is also used to detect whether the monitoring data sent by the target chip is received within a preset time length after sending the monitoring data acquisition command to the target chip through the target serial port; if the monitoring data sent by the target chip is not received within the preset time length, detect whether the number of retransmissions of the monitoring data acquisition command reaches a preset number threshold; if the preset number threshold is not reached, resend the monitoring data acquisition command to the target chip; if the preset number threshold is reached, send abnormal information to the process detection processing module, and the process detection processing module generates a third fault log and outputs a third fault alarm.

[0027] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the methods described in the first aspect are implemented.

[0028] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.

[0029] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.

[0030] The above-mentioned SPDK service process monitoring method, device, equipment, storage medium and program product are used in BMC, and send a monitoring data acquisition command to the target chip through the target serial port, wherein the target chip is deployed with an SPDK service process, and then receive the monitoring data sent by the target chip through the target serial port in response to the monitoring data acquisition command, and then parse and process the monitoring data to obtain the operating status data of the target device controlled by the SPDK service process. The present application sends a monitoring data acquisition command to the target chip through the target serial port to obtain the operating status data of the target device controlled by the SPDK service process. Based on this method, the purpose of real-time monitoring of the operating status of the target device controlled by the SPDK service process can be achieved, that is, the purpose of real-time monitoring of the operating status of the SPDK service process is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A flow chart of a method for monitoring an SPDK service process in an embodiment;

[0032] Figure 2 is a structural block diagram of an acceleration card in an embodiment;

[0033] Figure 3 A flowchart of another SPDK service process monitoring method in one embodiment;

[0034] Figure 4 A flowchart of another SPDK service process monitoring method in one embodiment;

[0035] Figure 5 A flowchart of another SPDK service process monitoring method in an embodiment;

[0036] Figure 6 It is a structural block diagram of an SPDK service process monitoring device in an embodiment;

[0037] Figure 7 It is a structural block diagram of another SPDK service process monitoring device in one embodiment;

[0038] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0040] The SPDK service process is a highly abstracted and encapsulated storage framework, not a distributed system. Its storage performance development kit is targeted at SSD (Solid State Dis) devices that support the NVMe (Non-Volatile Memory express) protocol. Its bedrock is the user space, polled-mode, asynchronous, lockless NVMe driver, which provides zero copy, high concurrency, and direct access to SSD from user space. The original purpose of the SPDK service process was to optimize block storage on disk, but with the continuous evolution of the SPDK service process, the SPDK service process can optimize all aspects of the storage software stack and is a high-performance solution. The main purpose of the SPDK service process is to forward storage business data as TCP (Transmission Control Protocol) traffic, thereby providing storage services to users. Since the SPDK service process uses a user-mode driver, generally, to view the running status of the SPDK service process, developers need to use tools such as iostat, nvme-cli, rpc, fio, etc., and use the username SSH (Secure Shell) with operation permissions to remotely log in to the operating system in the SOC to complete the command operation, thereby obtaining the running status data of the SPDK service process. However, this method cannot monitor the running status of the SPDK service process in real time. Therefore, it is necessary to propose a technology for real-time monitoring of the running status of the SPDK service process.

[0041] In one embodiment, Figure 1As shown in FIG. 1 , a flow chart of a method for monitoring a SPDK service process is provided. In this embodiment, the method is applied to an accelerator card based on a BMC (Baseboard Management Controller). The structural block diagram of the accelerator card is shown in FIG. Figure 2 As shown, it includes: Host (host side), SOC chip, FPGA (Field Programmable Gata Array) chip, Ceph storage cluster; wherein, the Host includes BMC and Virtio blk driver; the SOC chip includes SPDK service process, UART (Universal Asynchronous Receiver / Transmitter) serial port and Virtio net driver; the FPGA chip includes bond interface; BMC and SPDK service process transfer data through UART serial port, FPGA chip and SPDK service process transfer data through Virtio net driver, Host transfers data to FPGA chip through Virtio blk driver, and FPGA chip transfers data to Ceph storage cluster through bond interface. Among them, BMC is the baseboard management controller and intelligent platform management interface, which is the basic core functional subsystem of the server, responsible for the core functions of the server such as hardware status management, operating system management, health status management, power consumption management, etc. In the embodiment of the present application, the method is used in BMC, and includes the following steps:

[0042] Step 101, sending a monitoring data acquisition command to a target chip through a target serial port, wherein the target chip is deployed with an SPDK service process.

[0043] The target serial port may be a UART serial port. UART is an asynchronous receiver-transmitter and a hardware communication interface that can convert the data to be transmitted between serial communication and parallel communication. The target chip may be a SOC chip on which an SPDK service process is deployed. The monitoring data acquisition command is a command supported by an SPDK service process monitoring tool. The monitoring tool may be an iostat tool, an nvme-cli tool, an rpc tool, etc., which are command line tools that can be used to view the activity and load information of various devices.

[0044] Optionally, the BMC periodically sends corresponding iostat, and / or nvme-cli, and / or rpc and other monitoring data acquisition commands supported by tools such as iostat, and / or nvme-cli, and / or rpc to the SOC chip through the UART serial port.

[0045] Step 102: receiving monitoring data sent by the target chip through the target serial port in response to a monitoring data acquisition command.

[0046] Optionally, after the SPDK service process deployed on the SOC chip receives the monitoring data acquisition command such as iostat, and / or nvme-cli, and / or rpc, the SPDK service process sends a running status acquisition command to at least one target device controlled by the SPDK service process according to the monitoring data acquisition command, obtains the running status data of at least one target device, and encapsulates the running status data of at least one target device according to the protocol type corresponding to the UART serial port to obtain monitoring data, and then sends the monitoring data to the BMC through the UART serial port. At this time, what the BMC receives is the monitoring data sent by the SOC chip through the UART serial port in response to the monitoring data acquisition command. In addition, the monitoring data can also be called echo data.

[0047] The above-mentioned target serial port serves as a channel for data interaction, realizes the physical connection between the BMC and the SOC chip, and saves hardware resources.

[0048] Step 103: parse and process the monitoring data to obtain the operation status data of the target device controlled by the SPDK service process.

[0049] Among them, since the monitoring data is an encapsulated data packet, which includes the operating status data of the target device controlled by the SPDK service process, after receiving the monitoring data, the BMC needs to parse and process the monitoring data to obtain the operating status data of the target device controlled by the SPDK service process. In addition, it should be noted that there are multiple target devices controlled by the SPDK service process, and the BMC parses and processes the monitoring data, specifically, using the parsing program on the BMC to parse and process the monitoring data.

[0050] In summary, the BMC sends a monitoring data acquisition command to the target chip through the target serial port, wherein the target chip is deployed with an SPDK service process, and then receives the monitoring data sent by the target chip through the target serial port in response to the monitoring data acquisition command, and then parses and processes the monitoring data to obtain the operating status data of the target device controlled by the SPDK service process. The present application sends a monitoring data acquisition command to the target chip through the target serial port to obtain the operating status data of the target device controlled by the SPDK service process. Based on this method, the purpose of real-time monitoring of the operating status of the target device controlled by the SPDK service process can be achieved, that is, the purpose of real-time monitoring of the operating status of the SPDK service process is achieved.

[0051] In one of the embodiments, before sending a monitoring data acquisition command to a target chip through a target serial port, the method further includes: obtaining an original monitoring data acquisition command, which is a command supported by an SPDK service process monitoring tool; splitting the original monitoring data acquisition command to obtain original command data; and encapsulating the original command data according to a protocol type corresponding to the target serial port to obtain a monitoring data acquisition command.

[0052] The monitoring tool may be an iostat tool, an nvme-cli tool, an rpc tool, etc. The monitoring tool may open the SPDK service process, and the SPDK service process may respond by inputting corresponding commands using the monitoring tool. The original monitoring data acquisition command is an encapsulated data packet, which includes at least one iostat monitoring data acquisition command supported by the iostat tool, and / or at least one nvme-cli monitoring data acquisition command supported by the nvme-cli tool, and / or at least one rpc monitoring data acquisition command supported by the rpc tool, etc. The protocol type corresponding to the target serial port may be a UART protocol type corresponding to the UART serial port.

[0053] Optionally, the BMC periodically obtains original monitoring data acquisition commands, wherein the original monitoring data acquisition commands include at least one iostat monitoring data acquisition command, and / or at least one nvme-cli monitoring data acquisition command, and / or at least one rpc monitoring data acquisition command, etc. Then, the splitting program on the BMC splits the original monitoring data acquisition command to obtain at least one original command data, and the original command data is an iostat monitoring data acquisition command, or an nvme-cli monitoring data acquisition command, or an rpc monitoring data acquisition command, etc. Then, at least one iostat monitoring data acquisition command, at least one nvme-cli monitoring data acquisition command, and at least one rpc monitoring data acquisition command are respectively encapsulated according to the UART protocol type, and then the encapsulated at least one iostat monitoring data acquisition command, at least one nvme-cli monitoring data acquisition command, and at least one rpc monitoring data acquisition command are again encapsulated according to the UART protocol type to obtain the monitoring data acquisition command, that is, the monitoring data acquisition command is a data packet with the UART protocol.

[0054] The original monitoring data acquisition command is split to obtain the original command data, and then the original command data is encapsulated according to the protocol type corresponding to the target serial port to obtain the monitoring data acquisition command, so that the monitoring data acquisition command can be input to the target chip through the target serial port, and then the SPDK service process deployed on the target chip responds, avoiding the defect of manually inputting commands to the target chip in traditional technology.

[0055] In one of the embodiments, after parsing the monitoring data to obtain the operating status data of the target device controlled by the SPDK service process, the method also includes: if the type of the operating status data is a linear data type, writing the operating status data into a target file in the form of a key-value pair; reading the target file through a data acquisition thread to update the linear sensor reading according to the monitoring data; after updating the linear sensor reading, determining whether the updated linear sensor reading exceeds the target preset range, and if so, generating a first fault log and outputting a first fault alarm.

[0056] Among them, the running status data of linear data types such as IOSP (Input / Output Operations PerSecond), bandwidth, average device I / O (Input / Output) waiting time, etc., are the data returned to the BMC by the SPDK service process under the iostat monitoring data acquisition command or the nvme-cli monitoring data acquisition command. The target file can be a JSON (JavaScript Object Notation) file. The first fault log can be a SEL log (System Event Log), and the first fault alarm can be an SNMPTrap (Simple Network Management Protocol Trap) alarm.

[0057] Optional, such as Figure 3As shown, a flow chart of another SPDK service process monitoring method is provided. After the BMC obtains at least one running status data, the type of each running status data is determined according to the type of the monitoring data acquisition command for obtaining each running status data. If it is an iostat monitoring data acquisition command or an nvme-cli monitoring data acquisition command, the running status data is a linear data type. For the running status data of the linear data type, the BMC will perform protocol encapsulation on it and send it to the first serial port device. Then the data update processing module in the BMC accesses the first serial port device, reads the running status data of the linear data type, and disassembles the protocol encapsulation, and then writes the disassembled running status data into a JSON file in the form of a key-value pair, and a data acquisition thread for obtaining accelerator card information is opened in the sensor monitoring process in the data update processing module. The data acquisition thread will periodically read the JSON file and update the linear sensor reading value, wherein the linear sensor reading value is the historical running status data stored by the data acquisition thread. After the linear sensor reading value is updated, it is determined whether the updated linear sensor reading value exceeds the target preset range, wherein the target preset range is pre-set. If the updated linear sensor reading exceeds the target preset range, a SEL log and SNMP Trap alarm are generated.

[0058] For the running status data of the linear data type, the linear sensor reading is updated by periodically reading the JSON file through the data acquisition thread, and judging whether the updated linear sensor reading exceeds the target preset range, so as to achieve the purpose of real-time monitoring of the running status of the target device. In addition, when the updated linear sensor reading exceeds the target preset range, the first fault log and the first fault alarm are generated, so as to realize the operation and maintenance means of event reporting.

[0059] In one of the embodiments, after parsing the monitoring data to obtain the operating status data of the target device controlled by the SPDK service process, the method also includes: if the type of the operating status data is a discrete data type, determining the target state of the target device according to the operating status data; and performing a target monitoring operation according to the target state.

[0060] In one of the embodiments, a target monitoring operation is performed according to a target state, including: if the target state is a normal state, updating a reading of a discrete sensor corresponding to the target device according to the target state; if the target state is an abnormal state, generating a second fault log and outputting a second fault alarm.

[0061] In one of the embodiments, generating a second fault log includes: sending an operation data acquisition command and a log data acquisition command to a target chip through a target serial port; receiving device operation data of a target device sent by the target chip through the target serial port in response to the operation data acquisition command, and receiving log data sent by the target chip through the target serial port in response to the log data acquisition command; generating a second fault log based on the device operation data and the log data.

[0062] In one of the embodiments, the method further includes: if the target state is an abnormal state, restarting the target device.

[0063] Among them, the operation status data of discrete data types, such as the status value of the target device, that is, 0, 1 value, is the part of data returned by the SPDK service process to the BMC under the rpc monitoring data acquisition command. The operation data acquisition command is the rpc monitoring data acquisition command, and the log data acquisition command can be the nvme-cli log command. The device operation data refers to the status value of the target device, etc., and the log data refers to the operation record of the target device, etc. The second fault log can be a SEL log, and the second fault alarm can be an SNMP Trap alarm.

[0064] Optional, such as Figure 4As shown, a flow chart of another SPDK service process monitoring method is provided. After the BMC obtains at least one running status data, the type of each running status data is determined according to the type of the monitoring data acquisition command for obtaining each running status data. If it is an rpc monitoring data acquisition command, the running status data is a discrete data type. For the running status data of the discrete data type, the BMC will perform protocol encapsulation on it and send it to the second serial port device. Then the process detection processing module in the BMC accesses the second serial port device, reads the running status data of the discrete data type, and disassembles the protocol encapsulation to obtain the status value of the target device. Then, determine whether the target device is normal according to the status value of the target device. Assuming that 0 indicates an abnormal state and 1 indicates a normal state, when the status value of the target device is 1, update the reading value of the discrete sensor corresponding to the target device, wherein the reading value of the discrete sensor is the historical operation status data stored in the process detection processing module; when the status value of the target device is 0, encapsulate the rpc monitoring data to obtain the corresponding original data, send the protocol-encapsulated operation data acquisition command and log data acquisition command to the SOC chip through the UART serial port, and then receive the device operation data of the target device sent by the SOC chip through the UART serial port in response to the operation data acquisition command, and receive the log data sent by the SOC chip through the UART serial port in response to the log data acquisition command, and finally generate the SEL log and SNMP Trap alarm according to the device operation data and log data. In addition, when the status value of the target device is 0, after generating the SEL log, restart the target device, wherein the status value of the target device is 0, which is generally caused by the device being hung or in a zombie state due to network interruption.

[0065] The process detection processing module in the BMC is used to poll the SPDK service process and restart the target device, which realizes the automatic recovery of the target device, shortens the abnormal time of the target device, and thus improves the high availability of the target device. In addition, if the target state of the target device is abnormal, a second fault log and a second fault alarm are generated, realizing the operation and maintenance means of event reporting.

[0066] In one of the embodiments, after sending a monitoring data acquisition command to a target chip through a target serial port, the method further includes: detecting whether the monitoring data sent by the target chip is received within a preset time length; if the monitoring data sent by the target chip is not received within the preset time length, detecting whether the number of retransmissions of the monitoring data acquisition command reaches a preset number threshold; if the preset number threshold is not reached, resending the monitoring data acquisition command to the target chip; if the preset number threshold is reached, generating a third fault log and outputting a third fault alarm.

[0067] The preset duration and the preset number of thresholds are pre-set, the third fault log may be a SEL log, and the third fault alarm may be an SNMP Trap alarm.

[0068] Optional, such as Figure 5 As shown, a flow chart of another SPDK service process monitoring method is provided. BMC splits the monitoring data acquisition command supported by the iostat / nvme-cli / rpc tool to obtain the original command data, and then encapsulates the original command data according to the protocol type corresponding to the target serial port, that is, protocol encapsulation, to obtain the monitoring data acquisition command, and sends the monitoring data acquisition command to the target chip through the target serial port. Then, according to the preset time length, it is detected whether the monitoring data sent by the target chip is received. If the monitoring data is received within the preset time length, the data type of the monitoring data is determined. If it is the monitoring data returned under the iostat / nvme-cli monitoring data acquisition command, the monitoring data is sent to the first serial port device, and the monitoring data is processed by the data update processing module; if it is the monitoring data returned under the rpc monitoring data acquisition command, the monitoring data is sent to the second serial port device, and the monitoring data is processed by the process detection processing module. If no monitoring data is received within the preset time period, it is determined again whether the number of times the monitoring data acquisition command is sent exceeds the preset number threshold. If not, the monitoring data acquisition command is resent to the target chip; if exceeded, abnormal information is generated and sent to the process detection processing module. The process detection processing module determines that the target state of the target device is an abnormal state, and executes the steps of the method when the target device is in an abnormal state, including generating SEL logs, SNMP Trap alarms, and restarting the target device.

[0069] After the BMC sends a monitoring data acquisition command to the target chip, it can monitor the operating status of the target device controlled by the SPDK service process in real time by detecting whether the monitoring data is received and determining whether the number of times the monitoring data acquisition command is sent to the target chip exceeds the preset threshold.

[0070] In summary, the BMC first obtains the original monitoring data acquisition command, which is a command supported by the SPDK service process monitoring tool, splits the original monitoring data acquisition command, obtains the original command data, and encapsulates the original command data according to the protocol type corresponding to the target serial port to obtain the monitoring data acquisition command. Then, the monitoring data acquisition command is sent to the target chip through the target serial port, wherein the target chip is deployed with the SPDK service process, and detects whether the monitoring data sent by the target chip is received within the preset time length. If the monitoring data sent by the target chip is not received within the preset time length, it detects whether the number of retransmissions of the monitoring data acquisition command reaches the preset number threshold. If it does not reach the preset number threshold, the monitoring data acquisition command is resent to the target chip. If it reaches the preset number threshold, an exception information is generated and sent to the process detection processing module. If the monitoring data sent by the target chip is received within the preset time length, the monitoring data is parsed and processed to obtain the operating status data of the target device controlled by the SPDK service process. Then determine the type of the running status data. If the type of the running status data is a linear data type, write the running status data into the target file in the form of a key-value pair; read the target file through the data acquisition thread to update the linear sensor reading according to the monitoring data; after updating the linear sensor reading, determine whether the updated linear sensor reading exceeds the target preset range. If so, generate a first fault log and output a first fault alarm; if the type of the running status data is a discrete data type, determine the target state of the target device according to the running status data; if the target state is a normal state, update the reading of the discrete sensor corresponding to the target device according to the target state; if the target state is an abnormal state, send an running data acquisition command and a log data acquisition command to the target chip through the target serial port; receive the device running data of the target device sent by the target chip through the target serial port in response to the running data acquisition command, and receive the log data sent by the target chip through the target serial port in response to the log data acquisition command; generate a second fault log according to the device running data and the log data. In addition, if the target state is an abnormal state, restart the target device. In this application, the forwarding of the built-in tools of the SPDK service process by the BMC is the command issuance in the text mode of the BMC simulation SOC. This mode can realize log collection, event reporting and automatic reply without complex protocol support, and realizes the operation and maintenance means of real-time monitoring of the running status of the SPDK service process. Moreover, the above methods are all placed in the existing management framework of the BMC, which is simple and easy to implement.

[0071] In addition, it should be noted that the SPDK service process stores not only the device driver code but also the components, etc. The target device in this application refers not only to the hardware / software device but also to the components, etc. The monitoring of the running status of all the hardware / software devices, components, etc. under the control of the SPDK service process can be achieved by the above method. The target device is not limited here.

[0072] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0073] Based on the same inventive concept, the embodiment of the present application also provides an SPDK service process monitoring device for implementing the SPDK service process monitoring method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more SPDK service process monitoring device embodiments provided below can refer to the limitations of the SPDK service process monitoring method above, and will not be repeated here.

[0074] In one embodiment, Figure 6 As shown, a structural block diagram of an SPDK service process monitoring device is provided, which is used in a BMC. The device 600 includes: a sending module 601, a receiving module 602 and a processing module 603, wherein:

[0075] The sending module 601 is used to send a monitoring data acquisition command to a target chip through a target serial port, wherein the target chip is deployed with an SPDK service process.

[0076] The receiving module 602 is used to receive the monitoring data sent by the target chip through the target serial port in response to the monitoring data acquisition command.

[0077] The processing module 603 is used to parse and process the monitoring data to obtain the operating status data of the target device controlled by the SPDK service process.

[0078] In one of the embodiments, before sending the monitoring data acquisition command to the target chip through the target serial port, the sending module 601 is also used to obtain the original monitoring data acquisition command, which is a command supported by the SPDK service process monitoring tool; the original monitoring data acquisition command is split and processed to obtain the original command data; the original command data is encapsulated according to the protocol type corresponding to the target serial port to obtain the monitoring data acquisition command.

[0079] In one embodiment, if Figure 7 As shown, a structural block diagram of another SPDK service process monitoring device is provided. The device 600 also includes a data update processing module 701; the processing module 603 is also used to send the running status data to the data update processing module 701 if the type of the running status data is a linear data type, and the data update processing module 701 is used to write the running status data in the form of a key-value pair to the target file; read the target file through the data acquisition thread to update the linear sensor reading according to the monitoring data; after updating the linear sensor reading, determine whether the updated linear sensor reading exceeds the target preset range, and if so, generate a first fault log and output a first fault alarm.

[0080] In one embodiment, the device 600 also includes a process detection processing module 702; the processing module 603 is also used to send the running status data to the process detection processing module 702 if the type of the running status data is a discrete data type, and the process detection processing module 702 is used to determine the target state of the target device based on the running status data; and perform target monitoring operations based on the target state.

[0081] In one embodiment, the process detection processing module 702 is specifically used to update the reading value of the discrete sensor corresponding to the target device according to the target state if the target state is a normal state; if the target state is an abnormal state, generate a second fault log and output a second fault alarm.

[0082] In one embodiment, the process detection processing module 702 is also used to send an operation data acquisition command and a log data acquisition command to the target chip through the target serial port; receive the device operation data of the target device sent by the target chip through the target serial port in response to the operation data acquisition command, and receive the log data sent by the target chip through the target serial port in response to the log data acquisition command; generate a second fault log based on the device operation data and the log data.

[0083] In one embodiment, the process detection processing module 702 is further configured to restart the target device if the target state is an abnormal state.

[0084] In one of the embodiments, the sending module 601 is also used to detect whether the monitoring data sent by the target chip is received within a preset time length after sending the monitoring data acquisition command to the target chip through the target serial port; if the monitoring data sent by the target chip is not received within the preset time length, detect whether the number of retransmissions of the monitoring data acquisition command reaches a preset number threshold; if the preset number threshold is not reached, resend the monitoring data acquisition command to the target chip; if the preset number threshold is reached, send abnormal information to the process detection processing module, and the process detection processing module generates a third fault log and outputs a third fault alarm.

[0085] Each module in the above-mentioned SPDK service process monitoring device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0086] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store monitoring data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a SPDK service process monitoring method is implemented.

[0087] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0088] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above method when executing the computer program.

[0089] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0090] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the steps of the above method.

[0091] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0092] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0093] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0094] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A SPDK service process monitoring method, characterized in that: Used in a BMC, the method comprises: Sending a monitoring data acquisition command to a target chip through a target serial port, wherein the target chip is deployed with an SPDK service process; receiving monitoring data sent by the target chip through the target serial port in response to the monitoring data acquisition command; parsing and processing the monitoring data to obtain operating status data of the target device controlled by the SPDK service process; Before sending the monitoring data acquisition command to the target chip through the target serial port, the method further includes: periodically acquiring the original monitoring data acquisition command, the original monitoring data acquisition command is a command supported by the SPDK service process monitoring tool, and the original monitoring data acquisition command includes at least one iostat monitoring data acquisition command, and / or at least one nvme-cli monitoring data acquisition command, and / or at least one rpc monitoring data acquisition command; splitting the original monitoring data acquisition command to obtain the original command data; encapsulating the original command data according to the protocol type corresponding to the target serial port to obtain the monitoring data acquisition command; After parsing the monitoring data to obtain the running status data of the target device controlled by the SPDK service process, the method further includes: Determine the type of the running status data according to the type of the monitoring data acquisition command of the running status data, wherein if the monitoring data acquisition command of the running status data is an iostat monitoring data acquisition command or an nvme-cli monitoring data acquisition command, the type of the running status data is a linear data type; the running status data of the linear data type includes IOSP, bandwidth and average I / O waiting time of each device; if the monitoring data acquisition command of the running status data is an rpc monitoring data acquisition command, the type of the running status data is a discrete data type; the running status data of the discrete data type is the status value of the target device; If the type of the running status data is a linear data type, the running status data is written into a target file in the form of a key-value pair; the target file is read through a data acquisition thread to update a linear sensor reading according to the monitoring data; after the linear sensor reading is updated, it is determined whether the updated linear sensor reading exceeds a target preset range, and if so, a first fault log is generated and a first fault alarm is output; If the type of the operating status data is a discrete data type, the target state of the target device is determined according to the operating status data; if the target state is a normal state, the reading value of the discrete sensor corresponding to the target device is updated according to the target state; if the target state is an abnormal state, an operating data acquisition command and a log data acquisition command are sent to the target chip through the target serial port; the device operating data of the target device sent by the target chip through the target serial port in response to the operating data acquisition command is received, and the log data sent by the target chip through the target serial port in response to the log data acquisition command is received; a second fault log is generated according to the device operating data and the log data, and a second fault alarm is output, and the target device is restarted.

2. The method according to claim 1, characterized in that: After sending the monitoring data acquisition command to the target chip through the target serial port, the method further includes: Detecting whether the monitoring data sent by the target chip is received within a preset time period; If the monitoring data sent by the target chip is not received within the preset time period, detecting whether the number of retransmissions of the monitoring data acquisition command reaches a preset number threshold; If the preset number of times is not reached, resending the monitoring data acquisition command to the target chip; If the preset number threshold is reached, a third fault log is generated and a third fault alarm is output.

3. The method according to claim 1, characterized in that The first fault log and the second fault log are both SEL logs; the first fault alarm and the second fault alarm are both SNMP Trap alarms.

4. A SPDK service process monitoring device, characterized in that: Used in a BMC, the device comprises: A sending module, used for sending a monitoring data acquisition command to a target chip through a target serial port, wherein the target chip is deployed with an SPDK service process; A receiving module, used for receiving the monitoring data sent by the target chip through the target serial port in response to the monitoring data acquisition command; A processing module, used for parsing the monitoring data to obtain the operation status data of the target device controlled by the SPDK service process; The sending module is further used to periodically obtain an original monitoring data acquisition command, where the original monitoring data acquisition command is a command supported by the SPDK service process monitoring tool, and the original monitoring data acquisition command includes at least one iostat monitoring data acquisition command, and / or at least one nvme-cli monitoring data acquisition command, and / or at least one rpc monitoring data acquisition command; split the original monitoring data acquisition command to obtain original command data; encapsulate the original command data according to the protocol type corresponding to the target serial port to obtain the monitoring data acquisition command; The device also includes a data update processing module and a process detection processing module; The processing module is specifically used to determine the type of the running status data according to the type of the monitoring data acquisition command of the running status data; wherein, if the monitoring data acquisition command of the running status data is an iostat monitoring data acquisition command or an nvme-cli monitoring data acquisition command, the type of the running status data is a linear data type; the running status data of the linear data type includes IOSP, bandwidth and average I / O waiting time of each device; if the monitoring data acquisition command of the running status data is an rpc monitoring data acquisition command, the type of the running status data is a discrete data type; the running status data of the discrete data type is the status value of the target device; If the type of the running status data is a linear data type, the running status data is sent to the data update processing module; if the type of the running status data is a discrete data type, the running status data is sent to the process detection processing module; The data update processing module is used to write the running status data into a target file in the form of a key-value pair; read the target file through a data acquisition thread to update the linear sensor reading according to the monitoring data; after updating the linear sensor reading, determine whether the updated linear sensor reading exceeds a target preset range, and if so, generate a first fault log and output a first fault alarm; The process detection processing module is used to determine the target state of the target device according to the running state data; if the target state is a normal state, update the reading value of the discrete sensor corresponding to the target device according to the target state; if the target state is an abnormal state, send an operation data acquisition command and a log data acquisition command to the target chip through the target serial port; receive the device operation data of the target device sent by the target chip through the target serial port in response to the operation data acquisition command, and receive the log data sent by the target chip through the target serial port in response to the log data acquisition command; generate a second fault log according to the device operation data and the log data, output a second fault alarm, and restart the target device.

5. The device according to claim 4, characterized in that The sending module is further used to detect whether the monitoring data sent by the target chip is received within a preset time length; if the monitoring data sent by the target chip is not received within the preset time length, then detect whether the number of retransmissions of the monitoring data acquisition command reaches a preset number threshold; If the preset number threshold is not reached, the monitoring data acquisition command is resent to the target chip; if the preset number threshold is reached, a third fault log is generated and a third fault alarm is output.

6. The device according to claim 4, characterized in that The first fault log and the second fault log are both SEL logs; the first fault alarm and the second fault alarm are both SNMP Trap alarms.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 3 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Data processing method and device, electronic equipment and storage medium

    CN114741286A

  • Server monitoring method and related equipment

    CN115114118A