Method for monitoring disk array card
By managing RAID cards in a unified monitoring module within the server and using slot and address information to determine communication parameters, the problems of code redundancy and high manpower costs in RAID card monitoring are solved, achieving efficient monitoring management and maintenance.
Patent Information
- Application Number
- CN202511232677.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2025-11-21
AI Technical Summary
When multiple RAID cards exist in a server, existing technologies require setting up multiple different monitoring modules, resulting in code redundancy, high labor costs, and difficulty in centralized management and maintenance.
By placing all RAID cards under a single target monitoring module and using slot and address information to determine communication parameters, a unified monitoring method is achieved, reducing code redundancy and maintenance costs.
The centralized monitoring layer code was implemented, which reduced code maintenance and manpower costs, improved information processing efficiency and accuracy, and simplified information acquisition and operation processes.
Smart Images

Figure CN120994501A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of server technology, and in particular relates to a monitoring method for a disk array card. Background Technology
[0002] Servers typically manage storage resources using RAID (Redundant Arrays of Independent Disks) cards, especially in data-critical applications. RAID cards improve data read / write speeds, provide redundancy protection, and ensure data storage reliability. When multiple RAID cards require monitoring in a system, several different monitoring modules need to be configured. RAID cards with different communication methods are monitored and accessed by different modules. The monitoring layer code may overlap between these modules. When bug fixes or feature optimizations are needed, code modifications may be required across multiple monitoring modules, resulting in a significant workload for code maintenance and substantial manpower costs. Summary of the Invention
[0003] This application aims to address at least one of the technical problems existing in related technologies. To this end, this application proposes a monitoring method for disk array cards, which facilitates centralized monitoring layer code, reduces code redundancy, and allows for code modification only in the target monitoring module when problem correction or function optimization is needed, thus reducing code maintenance costs and required manpower.
[0004] Firstly, this application provides a monitoring method for a disk array card, applied to a target monitoring module; the method includes: Obtain the target array card that needs to be monitored in the target monitoring module, and the target monitoring method corresponding to the target array card; When the target monitoring method is the first monitoring method, the first communication parameters used by the target array card during the communication process are determined based on the slot information of the target array card; The first communication parameters are used to communicate with the target array card to obtain the first monitoring information corresponding to the target array card; When the target monitoring method is the second monitoring method, the second communication parameters used by the target array card during the communication process are determined based on the address information of the target array card; The second communication parameter is used to communicate with the target array card to obtain the second monitoring information corresponding to the target array card; Store the first monitoring information and the second monitoring information.
[0005] According to the disk array card monitoring method provided in the embodiments of this application, by placing the target array card to be monitored in a target monitoring module to obtain the monitoring information of the target array card, it is beneficial to centralize the monitoring layer code, reduce code redundancy, and when it is necessary to fix problems or optimize functions, only the code needs to be modified in the target monitoring module, which reduces the cost of code maintenance and the required manpower cost.
[0006] One embodiment of the disk array card monitoring method of this application, wherein determining the first communication parameters used by the target array card during communication based on the slot information of the target array card includes: Based on the slot information, the bus model of the target array card and the transfer channel information are found in the hardware communication link topology table.
[0007] One embodiment of the disk array card monitoring method of this application includes determining the second communication parameters used by the target array card during communication based on the address information of the target array card, comprising: Based on the address information, the device node identifier corresponding to the array card that matches the address information is determined from the array cards corresponding to the second monitoring method.
[0008] A method for monitoring a disk array card according to one embodiment of this application, before determining the device node identifier corresponding to the array card matching the address information from the array cards corresponding to the second monitoring mode based on the address information, the method further includes: Obtain the device node identifier and address information of external devices that support the second monitoring method.
[0009] One embodiment of the disk array card monitoring method of this application includes a first monitoring method including a serial communication integrated circuit bus monitoring method and a second monitoring method including a management component transmission protocol monitoring method based on a high-speed serial computer expansion bus.
[0010] One embodiment of the disk array card monitoring method of this application includes obtaining the target array card to be monitored in the target monitoring module, and the target monitoring method corresponding to the target array card, comprising: Obtain device information of external devices in the target monitoring module sent by the basic input / output system; Based on the device information, the target array card that needs to be monitored in the target monitoring module is obtained, as well as the target monitoring method corresponding to the target array card.
[0011] One embodiment of the disk array card monitoring method of this application includes obtaining, based on the device information, the target array card to be monitored in the target monitoring module, and the target monitoring method corresponding to the target array card, comprising: Retrieve a pre-stored list of RAID cards that need to be monitored; The system iterates through the external devices, determines the target array card to be monitored from the external devices based on the device information and the array card list, and obtains the target monitoring method corresponding to the target array card from the array card list.
[0012] A method for monitoring a disk array card according to an embodiment of this application, after communicating with the target array card using the second communication parameters to obtain second monitoring information corresponding to the target array card, the method further includes: Obtain the number of target array cards that need to be monitored in the target monitoring module, and store the number of target array cards.
[0013] A monitoring method for a disk array card according to one embodiment of this application, after storing the first monitoring information and the second monitoring information, the method further includes: Upon receiving a user's access request for the target array card, the monitoring information corresponding to the target array card is obtained from the target monitoring module.
[0014] Secondly, this application provides a computer program product applied to a target monitoring module; comprising: The first processing module is used to obtain the target array card that needs to be monitored in the target monitoring module, and the target monitoring method corresponding to the target array card; The second processing module is used to determine the first communication parameters used by the target array card during communication based on the slot information of the target array card when the target monitoring mode is the first monitoring mode. The third processing module is used to communicate with the target array card using the first communication parameters to obtain the first monitoring information corresponding to the target array card; The fourth processing module is used to determine the second communication parameters used by the target array card during communication based on the address information of the target array card when the target monitoring mode is the second monitoring mode. The fifth processing module is used to communicate with the target array card using the second communication parameters in order to obtain the second monitoring information corresponding to the target array card; The sixth processing module is used to store the first monitoring information and the second monitoring information.
[0015] According to the computer program product provided in the embodiments of this application, by placing the target RAID card to be monitored in a target monitoring module to obtain the monitoring information of the target RAID card, it is beneficial to centralize the monitoring layer code, reduce code redundancy, and when it is necessary to fix problems or optimize functions, only the code needs to be modified in the target monitoring module, which reduces the cost of code maintenance and the required manpower cost.
[0016] Thirdly, this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the disk array card monitoring method as described in the first aspect above.
[0017] Fourthly, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the disk array card monitoring method as described in the first aspect above.
[0018] The above-described one or more technical solutions in the embodiments of this application have at least one of the following technical effects: By placing the target RAID cards that need to be monitored in a single target monitoring module to obtain monitoring information, it is beneficial to centralize the monitoring layer code, reduce code redundancy, and when it is necessary to fix problems or optimize functions, only the code in the target monitoring module needs to be modified, which reduces the cost of code maintenance and the required manpower.
[0019] Furthermore, by using PCIe slot information and hardware communication link topology table, the I2C communication bus number and I2CSwitch information can be determined. Dynamic adaptation can be performed based on the topology table to avoid hard-coding the bus number and to accurately match the I2C channel, thus avoiding communication failures caused by incorrect bus numbers.
[0020] Furthermore, by matching the device node identifier (EID) used in MCTP over PCIE communication with the address information corresponding to the PCIe device, it can be ensured that the correct device node identifier is used in each communication, without the need to hardcode the device node identifier. This allows it to adapt to the EID allocation rules of MCTP devices from different manufacturers, providing good flexibility.
[0021] Furthermore, by traversing and searching the list of RAID cards to be monitored based on asset information (device information of PCIe devices) and the list of RAID cards to be monitored, the RAID cards to be monitored are determined, which no longer depends on the results of device communication address scanning, thus avoiding device misjudgment and improving the accuracy of scanning results.
[0022] Furthermore, by using the same RAID monitoring module to monitor all RAID cards and storing the total number of RAID cards and their monitoring information in the RAID monitoring module, all monitoring information can be obtained from this single RAID monitoring module when acquiring information. This eliminates the need to acquire and summarize information from different monitoring modules, simplifying the operation, reducing secondary information collection and processing, accelerating information processing and response speeds, and improving information processing efficiency.
[0023] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0024] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is one of the flowcharts illustrating the monitoring method for a disk array card provided in this application embodiment; Figure 2 This is a schematic diagram illustrating the principle of the disk array card monitoring method provided in the embodiments of this application; Figure 3 This is a second schematic flowchart of the monitoring method for a disk array card provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the computer program product provided in the embodiments of this application; Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0027] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0028] The monitoring method for disk array cards, computer program products, electronic devices, and readable storage media provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.
[0029] The monitoring method for disk array cards can be applied to the terminal, and can be executed by the hardware or software in the terminal.
[0030] The terminal includes, but is not limited to, portable communication devices such as mobile phones or tablets with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads). It should also be understood that, in some embodiments, the terminal may not be a portable communication device, but rather a desktop computer with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads).
[0031] The following embodiments describe a terminal including a display and a touch-sensitive surface. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and joystick.
[0032] The disk array card monitoring method provided in this application embodiment can be executed by an electronic device or a functional module or entity in an electronic device that can implement the disk array card monitoring method. The electronic devices mentioned in this application embodiment include, but are not limited to, mobile phones, tablets, computers, cameras and wearable devices. The following uses an electronic device as the execution subject to describe the disk array card monitoring method provided in this application embodiment.
[0033] like Figure 1 As shown, the monitoring method of the disk array card includes steps 110, 120, 130, 140, 150 and 160.
[0034] It should be noted that this method can be used to monitor disk array cards, or it can also be used to monitor other PCIe (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard) devices that have multiple types of communication protocols and physical communication channels. This application does not limit it.
[0035] The disk array card monitoring method provided in this application can be applied to target monitoring modules.
[0036] The target monitoring module can be a RAID monitoring module.
[0037] The monitoring methods for disk array cards can be applied to embedded applications that require component monitoring, such as OpenBMC (Board Management Controller). OpenBMC can provide RAID monitoring services and can be used to move storage information that was originally accessible or viewable only within the server system to an out-of-band location for remote viewing by users.
[0038] Monitoring of RAID cards in OpenBMC can include monitoring the card controller, logical disks, and physical disks.
[0039] Different types of RAID cards may support different monitoring protocols and physical channels. When monitoring RAID cards, OpenBMC can monitor and access the RAID card based on the RAID card's communication method.
[0040] Step 110: Obtain the target array card to be monitored in the target monitoring module, and the target monitoring method corresponding to the target array card; In this step, the target monitoring module can connect to multiple external devices (such as PCIe devices) and can identify the PCIe device that needs to be monitored from among the multiple PCIe devices.
[0041] PCIe devices can include RAID cards, graphics cards, and solid-state drives, among others.
[0042] For example, it is possible to obtain the RAID card that needs to be monitored in the target monitoring module, i.e., the target array card.
[0043] It can also obtain the target monitoring method corresponding to each target array card.
[0044] Monitoring methods can include monitoring protocols or physical communication methods.
[0045] The target monitoring method may include I2C (IIC, Inter-Integrated Circuit, serial communication integrated circuit bus) monitoring method, or MCTP (Management Component Transport Protocol) over PCIE monitoring method, or other monitoring methods, which are not limited in this application.
[0046] The target monitoring methods for all target array cards that need to be monitored may be the same or different.
[0047] The same target monitoring module can use different target monitoring methods to monitor different target RAID cards. That is, all target RAID cards that need to be monitored can be uniformly monitored in the same target monitoring module.
[0048] For example, such as Figure 2 As shown, the target monitoring module (RAID monitoring module) can monitor different target array cards (RAID1, RAID2, RAID3 and RAID4). Among them, the target monitoring method for RAID1 and RAID2 can be I2C monitoring, and the target monitoring method for RAID3 and RAID4 can be MCTP over PCIE monitoring.
[0049] Step 120: When the target monitoring mode is the first monitoring mode, determine the first communication parameters used by the target array card during the communication process based on the slot information of the target array card; In this step, the target monitoring module can communicate (monitor) the target RAID card according to its model and monitoring method. When communicating with the target RAID card, the module can select the corresponding physical channel and interface according to the target monitoring method of the target RAID card to obtain the monitoring information of the target RAID card.
[0050] The monitoring information may include the target RAID card's temperature and version information.
[0051] Once the monitoring method corresponding to the target RAID card is determined, the communication parameters used by the device for communication can be obtained based on the target monitoring method corresponding to the target RAID card.
[0052] Slot information may include version information and channel information corresponding to the physical slots on the motherboard used to insert PCIe devices.
[0053] In some embodiments, the first monitoring method may include a serial communication integrated circuit bus monitoring method (I2C monitoring method).
[0054] Step 130: Communicate with the target RAID card using the first communication parameters to obtain the first monitoring information corresponding to the target RAID card; In this step, such as Figure 3 As shown, when the monitoring mode corresponding to the target array card is the first monitoring mode, the first communication parameters used in the communication process can be obtained, and then the first communication parameters can be used to communicate with the target array card to obtain its corresponding first monitoring information.
[0055] Step 140: When the target monitoring mode is the second monitoring mode, determine the second communication parameters used by the target array card during the communication process based on the address information of the target array card; In this step, the second monitoring method may include the Management Component Transport Protocol monitoring method based on the high-speed serial computer expansion bus (MCTP over PCIE monitoring method).
[0056] Address information is used to characterize the address information of PCIe devices in the system. It can include BDF (Bus, Device, Function) information. Among them, Bus information (bus number) is used to identify the level or position of the PCIe bus in the system; Device information (device number) is used to identify the specific device connected on the unified PCIe bus; Function information (function number) is used to identify independent functional modules within the same device.
[0057] Step 150: Use the second communication parameters to communicate with the target RAID card to obtain the second monitoring information corresponding to the target RAID card; In this step, if the target RAID card is monitored in the second monitoring mode, the second communication parameters used during the communication process can be obtained. Then, the second communication parameters can be used to communicate with the target RAID card to obtain its corresponding second monitoring information.
[0058] In this step, Step 160: Store the first monitoring information and the second monitoring information.
[0059] In this step, the monitoring information corresponding to each target array card (e.g., the first monitoring information of the target array card communicating using the first monitoring method and the second monitoring information of the target array card communicating using the second monitoring method) can be stored in the target monitoring module.
[0060] During the research and development process, the inventors discovered that in related technologies, when there are multiple RAID cards with different monitoring protocols and physical communication methods in the system that need to be monitored, multiple different monitoring modules need to be set up. Different monitoring modules or processes are responsible for different monitoring methods. RAID cards using the same physical communication method are placed in one module for monitoring, while RAID cards with different physical communication methods are distributed in different modules. Each module is only responsible for monitoring the RAID cards with its corresponding monitoring protocol or physical communication method.
[0061] In related technologies, RAID cards with different communication methods are monitored and accessed by different modules, which leads to duplicate monitoring layer code and increased code maintenance workload. When it is necessary to fix problems or optimize functions, it may be necessary to modify the code in multiple monitoring modules, which requires a lot of manpower.
[0062] In this application, all RAID cards that need to be monitored are placed in a single monitoring module. The target monitoring module supports multiple types of monitoring protocols to communicate with the RAID cards. That is, it supports the use of multiple monitoring protocols to monitor different types of RAID cards, instead of placing the RAID cards in different modules according to the monitoring protocol. The unified monitoring module for all RAID cards that need to be monitored is conducive to code centralization and reduces code redundancy and maintenance costs.
[0063] According to the disk array card monitoring method provided in the embodiments of this application, by placing the target array card to be monitored in a target monitoring module to obtain the monitoring information of the target array card, it is beneficial to centralize the monitoring layer code, reduce code redundancy, and when it is necessary to fix problems or optimize functions, only the code needs to be modified in the target monitoring module, which reduces the cost of code maintenance and the required manpower cost.
[0064] Continue to refer to Figure 3 In some embodiments, step 120 may include: Based on the slot information, the bus model of the target array card and the transfer channel information are found in the hardware communication link topology table.
[0065] In this embodiment, a hardware communication link topology table can be pre-established, that is, a mapping table between slots and I2C channels can be established.
[0066] One bus can be expanded into multiple buses. Based on the slot information, the model of the bus where the target RAID card is located, as well as the transfer channel information, can be found.
[0067] You can look up the "Slot and I2C Channel Comparison Table" (hardware communication link topology table) based on the slot information of the device (such as CPU0_PE0) to determine the I2C bus number and switching channel information (I2C Switch channel) corresponding to the slot. For example, CPU0_PE0 corresponds to I2C bus 3 and Switch channel 0.
[0068] According to the disk array card monitoring method provided in the embodiments of this application, the I2C communication bus number and I2C switch information are determined through PCIe slot information and hardware communication link topology table. It can dynamically adapt according to the topology table, avoid hard-coding the bus number, and accurately match the I2C channel, thus avoiding communication failure due to incorrect bus number.
[0069] Continue to refer to Figure 3 In some embodiments, step 140 may include: Based on the address information, the device node identifier corresponding to the array card that matches the address information is determined from the array cards corresponding to the second monitoring method.
[0070] In this embodiment, the target monitoring module is connected to multiple PCIe devices, which can obtain all array cards that communicate using the second monitoring method, and then match the array card whose address information matches that of the target array card from all array cards, and obtain the device node identifier corresponding to the array card.
[0071] For example, based on the device's address information, the MCTP over PCIE management module can be used to compile all devices, find nodes with consistent address information, and obtain the device node identifier (EndPoint ID, EID) used for device communication.
[0072] According to the disk array card monitoring method provided in the embodiments of this application, by matching the device node identifier (EID) used in MCTP over PCIE communication with the address information corresponding to the PCIe device, it can ensure that the correct device node identifier is used in each communication, and there is no need to hardcode the device node identifier. It can adapt to the EID allocation rules of MCTP devices from different manufacturers, and has good flexibility.
[0073] In some embodiments, before determining the device node identifier corresponding to the array card matching the address information from the array cards corresponding to the second monitoring method based on the address information, the method may further include: Obtain the device node identifier and address information of external devices that support the second monitoring method.
[0074] In this embodiment, OpenBMC can provide an MCTP over PCIE management module, which can obtain information such as EID and BDF of all devices in the system that support MCTP over PCIE communication.
[0075] In some embodiments, step 110 may include: Obtain device information of external devices in the target monitoring module sent by the basic input / output system; Based on the device information, obtain the target array card that needs to be monitored in the target monitoring module, as well as the target monitoring method corresponding to the target array card.
[0076] In this embodiment, OpenBMC supports asset information management and can receive system asset information sent by the Basic Input Output System (BIOS).
[0077] The asset information includes PCIe device information under all server systems, that is, device information of all PCIe devices in the target monitoring module.
[0078] Each PCIe device information may include: PCIe device type, slot information, chip manufacturer identifier (Vendor ID, VID) in PCIe device identification code, chip device identifier (DID) in PCIe device identification code, product manufacturer identifier (SubSystem Vendor ID, SVID) in PCIe device identification code, product device identifier (SubSystem Device ID, SDID) in PCIe device identification code, and BDF information, etc.
[0079] Table 1 shows the equipment information for some PCIe devices in the asset information: Table 1
[0080] Based on the device information of PCIe devices, it is possible to determine whether each PCIe device is a RAID card that needs to be monitored, obtain the monitoring method of the RAID card that needs to be monitored, and record the slot information and address information of the device.
[0081] In some embodiments, other modules may also obtain asset information.
[0082] like Figure 3 As shown, in some embodiments, based on device information, obtaining the target RAID card to be monitored in the target monitoring module, and the target monitoring method corresponding to the target RAID card, may include: Retrieve a pre-stored list of RAID cards that need to be monitored; Iterate through external devices, and based on device information and the RAID card list, determine the target RAID card that needs to be monitored from the external devices, and obtain the target monitoring method corresponding to the target RAID card from the RAID card list.
[0083] In this embodiment, OpenBMC can provide a RAID monitoring module, which stores a list of RAID cards that need to be monitored, as shown in Table 2. The RAID card list includes the VID, DID, SVID, SDID information and monitoring method of the RAID card.
[0084] Table 2
[0085] The RAID monitoring module can acquire asset information (device information of PCIe devices) and iterate through the PCIe devices. Based on the device type, VID, DID, SVID, and SDID information in the device information, it determines whether the PCIe device is a RAID card that needs to be monitored. If the PCIe device is determined to be the target RAID card that needs to be monitored, it can obtain the target monitoring method of the target RAID card from the RAID card list and record the PCIe slot information and BDF information of the target RAID card.
[0086] During the research and development process, the inventors discovered that the methods in related technologies, under the condition of limiting the monitoring protocol, usually scan devices based on physical communication addresses. For example, the I2C monitoring method usually scans specific I2C addresses under the I2C bus where RAID cards may appear. This method may cause misjudgment problems due to the same I2C address of the devices, treating devices that are not RAID cards as RAID cards.
[0087] In this application, the RAID cards that need to be monitored are determined by traversing and searching the list of RAID cards that need to be monitored based on asset information (device information of PCIe devices) and the list of RAID cards that need to be monitored. This eliminates the reliance on the results of device communication address scanning, avoids device misjudgment, and improves the accuracy of scanning results.
[0088] In some embodiments, after step 150, the method may further include: Obtain the number of target RAID cards that need to be monitored in the target monitoring module, and store the number of target RAID cards.
[0089] In this embodiment, the number of all target array cards that need to be monitored can be obtained. For example, the target monitoring module may have 10 PCIe devices plugged in, of which 4 PCIe devices are RAID cards. Then, the number of all target array cards that need to be monitored is 4.
[0090] The number of all target RAID cards can be stored in the target monitoring module.
[0091] In some embodiments, after step 160, the method may further include: Upon receiving a user's access request for the target RAID card, the monitoring information corresponding to the target RAID card is obtained from the target monitoring module.
[0092] In this embodiment, when acquiring RAID card information, the number of all RAID cards and detailed information (monitoring information) of each RAID card can be obtained directly from the RAID monitoring module.
[0093] During the research and development process, the inventors discovered that in related technologies, when acquiring RAID card information, it is necessary to know all the monitoring modules where the information is located, then obtain information from different monitoring modules, and summarize the information. This process is complex and has low information processing efficiency.
[0094] In this application, all RAID cards are monitored using the same RAID monitoring module, and the number of all RAID cards and the monitoring information of each RAID card are stored in the RAID monitoring module. When acquiring information, all monitoring information can be obtained from this RAID monitoring module, without the need to acquire and summarize information from different monitoring modules. This simplifies the operation, reduces secondary information collection and processing, speeds up information processing and response, and improves information processing efficiency.
[0095] In some embodiments, the method may further include: The first code is deployed in the monitoring layer of the target monitoring module, and the second code corresponding to the target monitoring method is deployed in the physical communication layer of the target monitoring module.
[0096] In this embodiment, the first code can be used to monitor array cards using different monitoring methods (communication methods).
[0097] The second code is different for each target monitoring method.
[0098] The second code can be used to communicate with the RAID card corresponding to its communication method.
[0099] In this application, by unifying the centralized monitoring layer code and performing differentiated processing at the physical communication layer, unified monitoring of RAID cards with different communication types is achieved, which can reduce code redundancy.
[0100] The computer program product provided in this application is described below. The computer program product described below can be referred to in correspondence with the disk array card monitoring method described above.
[0101] The disk array card monitoring method provided in this application can be executed by a computer program product. This application uses the execution of the disk array card monitoring method by a computer program product as an example to illustrate the computer program product provided in this application.
[0102] This application also provides a computer program product.
[0103] like Figure 4 As shown, the computer program product is applied to the target monitoring module; it includes: a first processing module 410, a second processing module 420, a third processing module 430, a fourth processing module 440, a fifth processing module 450, and a sixth processing module 460.
[0104] The first processing module 410 is used to obtain the target array card that needs to be monitored in the target monitoring module, and the target monitoring method corresponding to the target array card; The second processing module 420 is used to determine the first communication parameters used by the target array card during communication based on the slot information of the target array card when the target monitoring mode is the first monitoring mode. The third processing module 430 is used to communicate with the target array card using the first communication parameters in order to obtain the first monitoring information corresponding to the target array card; The fourth processing module 440 is used to determine the second communication parameters used by the target array card during communication based on the address information of the target array card when the target monitoring mode is the second monitoring mode. The fifth processing module 450 is used to communicate with the target array card using the second communication parameters in order to obtain the second monitoring information corresponding to the target array card; The sixth processing module 460 is used to store the first monitoring information and the second monitoring information.
[0105] According to the computer program product provided in the embodiments of this application, by placing the target RAID card to be monitored in a target monitoring module to obtain the monitoring information of the target RAID card, it is beneficial to centralize the monitoring layer code, reduce code redundancy, and when it is necessary to fix problems or optimize functions, only the code needs to be modified in the target monitoring module, which reduces the cost of code maintenance and the required manpower cost.
[0106] In some embodiments, the second processing module 420 may also be used for: In some embodiments, the second processing module 420 may also be used for: Based on the slot information, the bus model of the target array card and the transfer channel information are found in the hardware communication link topology table.
[0107] In some embodiments, the fourth processing module 440 can also be used for: Based on the address information, the device node identifier corresponding to the array card that matches the address information is determined from the array cards corresponding to the second monitoring method.
[0108] In some embodiments, the computer program product may further include a seventh processing module, configured to obtain the device node identifier and address information of the external device supporting the second monitoring method before determining the device node identifier corresponding to the array card that matches the address information from the array card corresponding to the second monitoring method based on the address information.
[0109] In some embodiments, the computer program product may further include an eighth processing module for determining that the first monitoring method includes a serial communication integrated circuit bus monitoring method, and the second monitoring method includes a management component transmission protocol monitoring method based on a high-speed serial computer extended bus.
[0110] In some embodiments, the first processing module 410 may also be used for: Obtain device information of external devices in the target monitoring module sent by the basic input / output system; Based on the device information, obtain the target array card that needs to be monitored in the target monitoring module, as well as the target monitoring method corresponding to the target array card.
[0111] In some embodiments, the first processing module 410 may also be used for: Retrieve a pre-stored list of RAID cards that need to be monitored; Iterate through external devices, and based on device information and the RAID card list, determine the target RAID card that needs to be monitored from the external devices, and obtain the target monitoring method corresponding to the target RAID card from the RAID card list.
[0112] In some embodiments, the computer program product may further include a ninth processing module, which is used to obtain the number of target array cards to be monitored in the target monitoring module and store the number of target array cards after communicating with the target array card using the second communication parameters to obtain the second monitoring information corresponding to the target array card.
[0113] In some embodiments, the computer program product may further include a tenth processing module, which, after storing the first monitoring information and the second monitoring information, upon receiving a user's access request for the target RAID card, retrieves the monitoring information corresponding to the target RAID card from the target monitoring module.
[0114] The computer program product in this application embodiment can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, handheld computer, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the scope.
[0115] The computer program product in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system.
[0116] The computer program product provided in this application embodiment can achieve... Figures 1 to 3 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0117] In some embodiments, such as Figure 5 As shown, this application embodiment also provides an electronic device 500, including a processor 501, a memory 502, and a computer program stored on the memory 502 and executable on the processor 501. When the program is executed by the processor 501, it implements the various processes of the above-described disk array card monitoring method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0118] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0119] On the other hand, this application also provides a non-transitory computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements various processes of the above-described monitoring method embodiment of the disk array card and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0120] In another aspect, this application embodiment provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-described disk array card monitoring method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0121] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0122] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0123] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of software products. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A monitoring method for a disk array card, characterized in that, Applied to a target monitoring module; the method includes: Obtain the target array card that needs to be monitored in the target monitoring module, and the target monitoring method corresponding to the target array card; When the target monitoring method is the first monitoring method, the first communication parameters used by the target array card during the communication process are determined based on the slot information of the target array card; The first communication parameters are used to communicate with the target array card to obtain the first monitoring information corresponding to the target array card; When the target monitoring method is the second monitoring method, the second communication parameters used by the target array card during the communication process are determined based on the address information of the target array card; The second communication parameter is used to communicate with the target array card to obtain the second monitoring information corresponding to the target array card; Store the first monitoring information and the second monitoring information.
2. The monitoring method for a disk array card according to claim 1, characterized in that, The step of determining the first communication parameters used by the target array card during communication based on the slot information of the target array card includes: Based on the slot information, the bus model of the target array card and the transfer channel information are found in the hardware communication link topology table.
3. The monitoring method for a disk array card according to claim 1, characterized in that, The step of determining the second communication parameters used by the target RAID card during communication based on the address information of the target RAID card includes: Based on the address information, the device node identifier corresponding to the array card that matches the address information is determined from the array cards corresponding to the second monitoring method.
4. The monitoring method for a disk array card according to claim 3, characterized in that, Before determining the device node identifier corresponding to the array card matching the address information from the array cards corresponding to the second monitoring method based on the address information, the method further includes: Obtain the device node identifier and address information of external devices that support the second monitoring method.
5. The monitoring method for a disk array card according to any one of claims 1-4, characterized in that, The first monitoring method includes a serial communication integrated circuit bus monitoring method, and the second monitoring method includes a management component transmission protocol monitoring method based on a high-speed serial computer expansion bus.
6. The monitoring method for a disk array card according to any one of claims 1-4, characterized in that, The step of obtaining the target array card to be monitored in the target monitoring module, and the target monitoring method corresponding to the target array card, includes: Obtain device information of external devices in the target monitoring module sent by the basic input / output system; Based on the device information, the target array card that needs to be monitored in the target monitoring module is obtained, as well as the target monitoring method corresponding to the target array card.
7. The monitoring method for a disk array card according to claim 6, characterized in that, The step of obtaining the target array card to be monitored in the target monitoring module based on the device information, and the target monitoring method corresponding to the target array card, includes: Retrieve a pre-stored list of RAID cards that need to be monitored; The system iterates through the external devices, and based on the device information and the array card list, determines the target array card that needs to be monitored from the external devices, and obtains the target monitoring method corresponding to the target array card from the array card list.
8. The monitoring method for a disk array card according to any one of claims 1-4, characterized in that, After communicating with the target RAID card using the second communication parameters to obtain the second monitoring information corresponding to the target RAID card, the method further includes: Obtain the number of target array cards that need to be monitored in the target monitoring module, and store the number of target array cards.
9. The monitoring method for a disk array card according to any one of claims 1-4, characterized in that, After storing the first monitoring information and the second monitoring information, the method further includes: Upon receiving a user's access request for the target array card, the monitoring information corresponding to the target array card is obtained from the target monitoring module.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the monitoring method for the disk array card as described in any one of claims 1-9.