A device monitoring system, method, product, device and storage medium
By introducing the design of status monitor, central processor and adjudicator in the white box switch equipment monitoring system, the problems of low structural complexity and reliability in the existing system are solved, efficient and stable equipment monitoring is achieved, and hardware costs are reduced.
Patent Information
- Application Number
- CN202411523482.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-10-29
AI Technical Summary
In the existing white box switch equipment monitoring system, two status monitors are used to regulate each device, resulting in an increase in the complexity of the system structure, reducing the reliability and stability of the system, and increasing the hardware cost.
Design a device monitoring system, including a status monitor, a central processor and a deciding machine. The status monitor is used to monitor the target device. The central processor takes over the monitoring task when the status monitor is running abnormally, and the deciding machine controls the signals received by the target device.
Through this design, the efficient and stable operation of the equipment monitoring system is achieved, the hardware cost is reduced, the system migration caused by a single control bus failure is avoided, and the performance losses caused by abnormalities are reduced.
Smart Images

Figure CN119052200B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and in particular to a device monitoring system, method, product, device and storage medium. Background Art
[0002] White box switches are widely used network devices that can deploy personalized applications and services according to user needs, especially in large data centers. During the operation of white box switches, it is necessary to control the various components of the white box switches in real time. In related technologies, two status monitors are used to control the various components of the white box switches. When one status monitor fails, the other status monitor can be used to control the various components.
[0003] In the related art, the method of regulating and controlling each device of the white box switch through two status monitors increases the complexity of the entire switch system structure, reduces the reliability and stability of the switch system structure, and also increases the hardware cost of the white box switch. Summary of the invention
[0004] The embodiments of the present application provide a device monitoring system, method, product, device and storage medium, aiming to ensure efficient and stable operation of the device monitoring system.
[0005] A first aspect of an embodiment of the present application provides a device monitoring system, the system comprising:
[0006] a status monitor, used to monitor the operating status of at least one target device in the equipment, the target device being connected to the status monitor;
[0007] A central processing unit, used for taking over monitoring of the target device when the operating state of the status monitor is abnormal, the central processing unit being connected to the status monitor;
[0008] The arbiter is used to control the signal received by the target device, and the target device is connected to the state monitor and the central processing unit through the arbiter.
[0009] Optionally, the system further includes:
[0010] The expander is used to expand the number of interfaces of the central processing unit, and the expander is connected to the central processing unit and the arbiter.
[0011] Optionally, the arbiter forwards the signal sent by the status monitor to the target device when the operating status of the status monitor is normal;
[0012] The arbiter forwards the signal sent by the central processor to the target device when the operating state of the state monitor is abnormal.
[0013] A second aspect of an embodiment of the present application provides a device monitoring method, the method comprising:
[0014] monitoring at least one target device in the device by a status monitor;
[0015] When any control bus of the status monitor is abnormal, the target device corresponding to the control bus is monitored by the central processing unit.
[0016] Optionally, the method further comprises:
[0017] Start the status monitor monitoring program;
[0018] The operating status of the status monitor is monitored in real time through the status monitor monitoring program.
[0019] Optionally, the method further comprises:
[0020] Performing a read and write test on a register of the status monitor, and determining that the status monitor loses response when the register cannot be read and written normally;
[0021] Monitoring the target device corresponding to the status monitor via the control bus of the central processing unit;
[0022] Optionally, the method further comprises:
[0023] When it is detected that the running state of the state monitor returns to normal, the state monitor is restored to monitor the target device.
[0024] Optionally, the resuming the monitoring of the target device by the status monitor includes:
[0025] Turning off the control bus corresponding to the central processing unit;
[0026] Closing the program interface corresponding to the central processing unit;
[0027] Deleting the information corresponding to the control bus where the abnormality occurs in the database;
[0028] The target device is monitored using the control bus corresponding to the status monitor.
[0029] Optionally, monitoring at least one target device in the device by a status monitor includes:
[0030] Reading the operating status data of each of the target devices through the status monitor;
[0031] The operating status data is sent to the central processing unit through the status monitor.
[0032] Optionally, when any control bus of the status monitor is abnormal, monitoring the target device corresponding to the control bus through a central processing unit includes:
[0033] Determining a control bus of the status monitor corresponding to the target device;
[0034] Turning off the control bus corresponding to the corresponding status monitor;
[0035] The target device is monitored using the control bus corresponding to the central processing unit.
[0036] Optionally, the using the control bus corresponding to the central processing unit to monitor the target device includes:
[0037] Loading a driver corresponding to the control bus corresponding to the central processing unit;
[0038] The signal sent by the central processing unit is forwarded to the target device through the arbiter corresponding to the target device.
[0039] Optionally, the method further comprises:
[0040] Send out corresponding alarm information through the status monitor monitoring program;
[0041] The abnormal information of the control bus corresponding to the target device is recorded in the log.
[0042] Optionally, the method further comprises:
[0043] The number of the control buses where the exception occurs and the control bus numbers are written into a database to inform the program that relies on the control bus to switch the program interface of the status monitor to the program interface of the central processing unit.
[0044] A third aspect of an embodiment of the present application provides a device monitoring apparatus, the device comprising:
[0045] A first monitoring module, configured to monitor at least one target device in the device through a status monitor;
[0046] The first monitoring takeover module is used to monitor the target device corresponding to the control bus through the central processing unit when any control bus of the status monitor is abnormal.
[0047] Optionally, the device further comprises:
[0048] A program startup module is used to start the status monitor monitoring program;
[0049] The status monitor monitoring module is used to monitor the operating status of the status monitor in real time through the status monitor monitoring program.
[0050] Optionally, the device further comprises:
[0051] The monitoring recovery module is used to restore the monitoring of the target device by the status monitor when it is detected that the running status of the status monitor has returned to normal.
[0052] Optionally, the first monitoring module includes:
[0053] A status data reading submodule, used for reading the operation status data of each of the target devices through the status monitor;
[0054] The data sending submodule is used to send the operating status data to the central processing unit through the status monitor.
[0055] Optionally, the monitoring takeover module includes:
[0056] A bus determination submodule, used to determine a control bus of the state monitor corresponding to the target device;
[0057] A bus closing submodule, used for closing the control bus corresponding to the status monitor;
[0058] The monitoring takeover submodule is used to monitor the target device using the control bus corresponding to the central processing unit.
[0059] Optionally, the monitoring and taking over submodule includes:
[0060] A driver loading submodule, used for loading a driver corresponding to the control bus corresponding to the central processing unit;
[0061] The signal forwarding submodule is used to forward the signal sent by the central processing unit to the target device through the arbiter corresponding to the target device.
[0062] Optionally, the device further comprises:
[0063] An alarm module is used to send corresponding alarm information through the status monitor monitoring program;
[0064] The abnormal information recording module is used to record the abnormal information of the control bus corresponding to the target device in a log.
[0065] Optionally, the device further comprises:
[0066] The data writing module is used to write the number of the control buses with abnormalities and the control bus numbers into a database to inform the program that relies on the control bus to switch the program interface of the status monitor to the program interface of the central processing unit.
[0067] Optionally, the device further comprises:
[0068] A read / write test module, used to perform a read / write test on the register of the status monitor, and determine that the status monitor loses response when the register cannot be read / written normally;
[0069] The central processing unit takes over the monitoring module, and is used to monitor the target device corresponding to the status monitor through the control bus of the central processing unit.
[0070] Optionally, the monitoring recovery module includes:
[0071] A bus closing submodule, used to close the control bus corresponding to the central processing unit;
[0072] A program interface closing submodule, used to close the program interface corresponding to the central processing unit;
[0073] An information deletion submodule, used for deleting information corresponding to the control bus where an abnormality occurs in the database;
[0074] The device monitoring submodule is used to monitor the target device using the control bus corresponding to the status monitor.
[0075] A fourth aspect of an embodiment of the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps in the method described in the first aspect of the present application.
[0076] A fifth aspect of an embodiment of the present application provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the method described in the first aspect of the present application are implemented.
[0077] A sixth aspect of an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in the first aspect of the present application are implemented.
[0078] The device monitoring system provided by the present application is adopted, and the system includes a status monitor for controlling the operating status of at least one target device of the device, and each of the target devices is connected to the status monitor via a serial bus; a central processing unit for taking over the control of the target device corresponding to the control bus when the operating status of the status monitor is abnormal, and the central processing unit is connected to the status monitor; an arbitrator for controlling the signal received by the target device, and the target device is connected to the status monitor and the central processing unit through the arbitrator; an expander for expanding the number of interfaces of the central processing unit, and the expander is connected to the central processing unit and the arbitrator.
[0079] In the device monitoring system, the operating status of at least one target device in the switch is preferentially controlled through the status monitor. When any control bus in the status monitor fails and cannot control one or several target devices, the corresponding target device is taken over by the central processing unit, thereby preventing the unavailability of the white box switch monitoring function caused by the status monitor exception. The central processing unit is used as a backup white box switch low-speed bus controller, and there is no need to add additional hardware devices, thereby reducing the hardware cost of the white box switch. The failure of a single control bus will not lead to the migration of the overall function, thereby reducing the performance loss when an exception occurs in a single control bus. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0081] Figure 1 is a structural diagram of a device monitoring system proposed in one embodiment of the present application;
[0082] Figure 2 is a flow chart of a device monitoring method proposed in one embodiment of the present application;
[0083] Figure 3 It is a schematic diagram of the monitoring program operation flow proposed in one embodiment of the present application;
[0084] Figure 4 is a schematic diagram of a device monitoring device proposed in an embodiment of the present application;
[0085] Figure 5 It is a schematic diagram of an electronic device proposed in an embodiment of the present application. DETAILED DESCRIPTION
[0086] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0087] refer to Figure 1 , Figure 1 is a structural diagram of a device monitoring system proposed in an embodiment of the present application, such as Figure 1 As shown, the system includes:
[0088] A status monitor is used to control the operating status of at least one target device in the switch, and each of the target devices is connected to the status monitor via a serial bus; a central processor is used to take over the control of the target device corresponding to the control bus when the operating status of the status monitor is abnormal, and the central processor is connected to the status monitor; an arbiter is used to control the signal received by the target device, and the target device is connected to the status monitor and the central processor through the arbiter; an expander is used to expand the number of interfaces of the central processor, and the expander is connected to the central processor and the arbiter. If the number of target devices to be monitored is small and the interfaces on the central processor are sufficient for connection, the expander may not be installed. When the operating status of the status monitor is normal, the arbiter forwards the signal sent by the status monitor to the target device; when the operating status of the status monitor is abnormal, the arbiter forwards the signal sent by the central processor to the target device.
[0089] In this embodiment, each control bus includes an arbiter, and each control bus corresponds to a target device. For example, arbiter 1 corresponds to target device 1, arbiter 2 corresponds to target device 2, and arbiter 3 corresponds to target device 3. The number of control buses is the same as the number of target devices that need to be monitored. A control bus between the target device and the status monitor, as well as a control bus between the target device and the central processing unit, will be created according to the number of target devices that need to be monitored.
[0090] In this embodiment, the device may be a server, a white box switch, or other related equipment. This example is described by taking a white box switch as an example. A white box switch is an open network device with hardware and software decoupled, which has the characteristics of flexibility, efficiency, and programmability, and can significantly reduce the cost of network deployment. A white box switch is divided into two parts: hardware and software. The hardware generally includes a switching chip, a central processing unit (CPU), a network card, storage, and peripheral hardware devices, etc. The software refers to the network operating system (NOS, Network Operation system) and its network applications. The state monitor is a programmable logic device (CPLD, Complex Programmable Logic Device) used to monitor the operating status of at least one target device in the switch. The state monitor is connected to the device in the switch through a serial bus (I2C), and is connected to the central processor through a high-speed serial bus (PCIE, Peripheral Component Interconnect Express), and sends the data read from the target device to the central processor. The arbiter is used to control the signal received by the target device. There is an arbiter in each control bus. In order to prevent access conflicts between the central processor and the state monitor, the signal is forwarded through the arbiter. When the state monitor is running normally, the signal sent by the state monitor is preferentially forwarded to the target device. The target device is generally various sensors or devices such as fans and power supplies. The temperature of each hardware can be monitored through various sensors. The expander is used to expand the interface of the central processor. One end of the expander is connected to the central processor, and the other end is connected to the arbiter, and it is connected to the target device through the arbiter.
[0091] For example, the central processing unit adopts the ARM architecture, and uses CPLD as a status monitor to replace the central processing unit to obtain information from the device on the low-speed serial bus I2C. The status monitor communicates with the central processing unit through the PCIE bus. After the status monitor obtains the device information through its own I2C controller, it caches it in its own storage, and the program on the operating system obtains the information through the high-speed serial bus PCIE. The I2C controller on the central processing unit is also connected to the devices on each low-speed serial bus. If the number of channels needs to be expanded, a switch can be used as an expander. Each I2C bus is connected to the status monitor and the I2C controller of the central processing unit at the same time. There is an I2C arbiter on each bus to handle possible access conflicts and fault jams.
[0092] In this embodiment, a monitoring scheme in which the status monitor and the central processing unit back up each other is adopted, that is, all low-speed devices of the white box switch need to be connected to the low-speed bus controller of the central processing unit and the status monitor at the same time. Under normal circumstances, the status monitor is used to control the low-speed serial bus. When any control bus in the status monitor is abnormal, the control right of the control bus will be transferred to the central processing unit under software control. When the status monitor is abnormal, the control right of all control buses corresponding to the status monitor is transferred to the central processing unit to ensure that the hardware control does not fail during the abnormality. The backup function of the low-speed serial bus device control of the white box switch is realized without adding additional devices.
[0093] In this embodiment, the hardware devices that the white box switch needs to monitor, in addition to being connected to the low-speed serial bus of the status monitor, also need to be connected to the low-speed serial bus of the central processing unit. Under normal circumstances, the low-speed serial bus of the status monitor is used first, and the low-speed serial bus controller of the central processing unit is turned off. In order to prevent possible access conflicts between the two parties and to handle the situation where the line is hung due to a failure of one party, the devices on the low-speed bus are first connected to the arbiter, and then connected to the status monitor and the central processing unit.
[0094] refer to Figure 2 , Figure 2 1 is a flow chart of a device monitoring method proposed in one embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0095] S11: monitoring at least one target device in the device through a status monitor.
[0096] In this embodiment, when the switch is started, under normal circumstances, at least one target device in the switch is first monitored by the status monitor. During the monitoring process, the status monitor sends a data read signal to the arbiter, and the status monitor sends the data read signal to the target device. The target device then returns the data to the status monitor. The status monitor sends the received data to the central processing unit, and the central processing unit performs corresponding adjustments after receiving the data from the target device.
[0097] In this embodiment, the step of monitoring at least one target device in the switch by the status monitor specifically includes:
[0098] S11 - 1 : Reading the operating status data of each of the target devices through the status monitor.
[0099] In this embodiment, when the switch starts, the operating status data of each target device is read through the status monitor. When reading data, the data reading request is forwarded through the arbiter corresponding to the target device. After receiving the data reading request, the target device sends the corresponding data to the status monitor.
[0100] For example, the operating status data includes device temperature detected by various temperature sensors, fan rotation speed, power of a power supply, etc.
[0101] S11-2: Sending the operating status data to the central processing unit via the status monitor.
[0102] In this embodiment, the status monitor is connected to the central processing unit via a high-speed serial bus. After reading the operating status data of the target device, the status monitor sends the operating status data to the central processing unit.
[0103] S12: When any control bus of the status monitor is abnormal, the target device corresponding to the control bus is monitored by the central processing unit.
[0104] In this embodiment, when one or several low-speed serial buses in the status monitor fail and cannot transmit information normally, or when a certain interface of the status monitor fails, the status monitor monitoring program will shut down the failed control bus, and then use the central processing unit to take over the monitoring of the corresponding target device. When the central processing unit takes over the monitoring, the driver program corresponding to the central processing unit is loaded in the target device, and then the program interface is switched to the program interface corresponding to the central processing unit.
[0105] In this embodiment, the specific steps of monitoring the target device by the central processing unit include:
[0106] S12-1: Determine a control bus of the status monitor corresponding to the target device.
[0107] In this embodiment, each target device is controlled by a control bus, which is a low-speed serial bus. When a control bus fails, the control bus corresponding to the monitored target device must be determined first.
[0108] In this embodiment, each control bus corresponding to the target device has a corresponding control bus number, and each target device also has a corresponding device number. The control bus number of each control bus is pre-recorded in the system. When the data of a certain target device cannot be read, the control bus that is currently faulty can be determined based on the pre-recorded control bus number of each control bus.
[0109] S12-2: Turn off the control bus corresponding to the status monitor.
[0110] In this embodiment, after determining that a control bus has failed, the control bus on the status monitor for reading the target device is shut down.
[0111] S12-3: Use the control bus corresponding to the central processing unit to monitor the target device.
[0112] In this embodiment, after the control bus of the status monitor is turned off, the control bus corresponding to the central processing unit is used to monitor the target device.
[0113] In this embodiment, the specific steps of using the control bus corresponding to the central processing unit to monitor the target device include:
[0114] S12-3-1: Load the driver program corresponding to the control bus corresponding to the central processing unit.
[0115] In this embodiment, the bus controller of the central processing unit and the bus controller of the status monitor have different drivers. When the central processing unit takes over the monitoring of a target device, the monitoring program running in the background loads the driver of the control bus corresponding to the central processing unit. After the driver is loaded, the devices in the switch can transmit data with the central processing unit.
[0116] S12-3-2: forwarding the signal sent by the central processing unit to the target device through the arbiter corresponding to the target device.
[0117] In this embodiment, when the arbiter receives the signal sent by the central processor and the control bus corresponding to the status monitor fails, the arbiter sends the signal sent by the central processor to the corresponding target device to complete the monitoring of the target device by the central processor.
[0118] In this embodiment, when an abnormality occurs in any control bus of the status monitor, the target device corresponding to the abnormal control bus will be monitored by the central processing unit, and the remaining control buses in the status monitor will not be affected. There is no need to migrate all target devices monitored by the status monitor as a whole, which makes the resources allocated more reasonably and saves the resources of the central processing unit.
[0119] In this embodiment, the method further includes:
[0120] S12-4: The status monitor program issues a corresponding alarm message.
[0121] In this embodiment, when the status monitor monitoring program detects that the status monitor is abnormal, a corresponding alarm message is issued, and the alarm message includes information such as the number of the faulty control bus and the serial number of the faulty control bus.
[0122] S12-5: Recording abnormal information of the control bus corresponding to the target device in a log.
[0123] In this embodiment, when an abnormality is detected in the status monitor, the abnormal information of the control bus corresponding to the target device is recorded in the log, the control bus number of the control bus corresponding to the target device is recorded, and the control bus number of the faulty control bus is recorded.
[0124] In this embodiment, when the status monitor monitoring program detects an abnormality, an alarm message is promptly issued and the abnormal information is recorded in the log, so that the management personnel can obtain the abnormal information in time and check the log to determine the bus where the abnormality occurs, which is conducive to the rapid maintenance of the system.
[0125] In this embodiment, the method further includes:
[0126] S12-6: Write the number of the control buses where the exception occurs and the control bus numbers into the database to inform the program that relies on the control bus to switch the program interface of the status monitor to the program interface of the central processing unit.
[0127] In this embodiment, when an abnormality occurs in the control bus of the status monitor, i.e., the low-speed serial bus, the number of the control bus where the abnormality occurs and the control bus number are written into the database. After the remaining programs that depend on the control bus obtain the information about the abnormality of the control bus in the database, they switch to the spare code and switch the program interface of the status monitor to the program interface of the central processing unit.
[0128] In this embodiment, when any relevant device or other program in the switch reads data of the target device, the program interface is switched from the program interface of the status monitor to the program interface of the central processing unit, and the target device is accessed through the program interface of the central processing unit.
[0129] In this embodiment, in addition to the monitoring program of the status monitor, other programs running on the white box switch operating system that need to regulate the target device corresponding to the low-speed bus also need to perform code backup. Since the method of accessing the target device through the low-speed serial bus of the central processing unit and the low-speed serial bus of the status monitor are different, there are differences in the driving paths. Therefore, after these programs find that the status monitor monitoring program has detected the abnormal state of the low-speed serial bus through various methods, such as database method or sysfs node, they will automatically switch the program interface and use the backup code to access the target device corresponding to the low-speed serial bus.
[0130] In this embodiment, the abnormal control bus information is shared in time through the database, which is beneficial for other programs that rely on the target device to switch the corresponding program interface in time, thereby improving the work efficiency of the system.
[0131] In another embodiment of the present application, when the switch is started, the method further includes:
[0132] S21: Start the status monitor monitoring program.
[0133] In this embodiment, the status monitor monitoring program is used to monitor the running status of the status monitor.
[0134] In this embodiment, when the switch is started, the status monitor starts to monitor at least one target device in the switch, and at the same time, the system background starts the status monitor monitoring program to monitor the status monitor.
[0135] In this embodiment, the network operating system of the white box switch will continuously check the operating status of the status monitor through the status monitor monitoring program. When an abnormality occurs in the low-speed serial bus controlled by the status monitor, the monitoring program will immediately issue an alarm and record the abnormality log, and retain the operating environment data at the time of the abnormality to facilitate use in problem analysis. At the same time, if the abnormality of the status monitor causes the low-speed serial bus to become stuck or other abnormalities, the arbiter on the low-speed serial bus will automatically send a signal to try to restore the transmission of the low-speed serial bus. If the abnormality cannot be restored, in order to ensure that the low-speed serial bus controller of the central processing unit takes over the monitoring task, the monitoring program will also load the driver program of the device managed under the low-speed serial bus controller of the central processing unit, and create a corresponding program interface for other devices that rely on the program to use the interface.
[0136] S22: Monitor the operating status of the status monitor in real time through the status monitor monitoring program.
[0137] In this embodiment, after the status monitor monitoring program is started, the operating status of the status monitor is monitored in real time through the status monitor monitoring program.
[0138] In this embodiment, the operating status of the status monitor is mainly monitored in two ways. One is to read and write the register of the status monitor. If the register cannot be read or written, it is considered that the status monitor has lost its response. In this case, the entire status monitor fails and the monitoring needs to be migrated as a whole. The other is to record the status of the low-speed serial bus of each status monitor. If the target device corresponding to the low-speed serial bus has no response within a certain period of time, or the time for continuously reporting errors exceeds a certain period of time, it is considered that the low-speed serial bus has lost its response, and only the central processor needs to take over the monitoring of the target device of the failed control bus.
[0139] In this embodiment, the status monitor is monitored in real time by the status monitor monitoring program, which is conducive to always understanding the operating status of the status monitor. When the status monitor fails, corresponding processing can be performed in time, thereby improving the operating efficiency of the system.
[0140] In another embodiment of the present application, the method further includes:
[0141] S31: When it is detected that the running state of the state monitor returns to normal, resuming the monitoring of the target device by the state monitor.
[0142] In this embodiment, when the monitoring program of the status monitor detects that the running state of the status monitor has returned to normal, the monitoring of the target device by the status monitor is restored.
[0143] In this embodiment, the status monitor monitoring program continues to run. While the central processing unit takes over the monitoring of the target device, the status monitor monitoring program continuously sends signals to the status monitor through the arbiter of the fault control bus to automatically try to restore the bus's monitoring of the target device. When the status monitor responds, it indicates that the status monitor has resumed normal operating status, and the status monitor's monitoring of the target device is restored.
[0144] In this embodiment, the step of restoring the monitoring of the target device by the status monitor includes:
[0145] S31-1: Turn off the control bus corresponding to the central processing unit.
[0146] In this embodiment, when it is detected that the control bus of the status monitor returns to normal, the monitoring task needs to be re-migrated to the status monitor to ensure that the operation of the central processing unit is not affected. At this time, the control bus corresponding to the central processing unit is first closed.
[0147] S31-2: Close the program interface corresponding to the central processing unit.
[0148] In this embodiment, when the control bus corresponding to the central processor is closed, the program interface corresponding to the central processor in the target device is closed, and the target device can no longer exchange data with the central processor.
[0149] S31 - 3: Delete the information corresponding to the control bus where the abnormality occurs in the database.
[0150] In this embodiment, when a control bus failure occurs, information such as the control bus number of the failed control bus will be recorded in the database. When the control bus is restored to normal, the information corresponding to the abnormal control bus will be deleted from the database.
[0151] S31 - 4 : Use the control bus corresponding to the status monitor to monitor the target device.
[0152] In this embodiment, the target device is monitored using the control bus corresponding to the status monitor. At this time, the monitoring task of the target device is transferred from the central processing unit to the status monitor.
[0153] In this embodiment, when the status monitor monitoring program detects that the status monitor has resumed normal operation, or the control bus that previously failed in the status monitor has returned to normal, the monitoring task of the target device is migrated from the central processing unit to the status monitor, thereby ensuring the operating speed of the central processing unit.
[0154] In another embodiment of the present application, the method further includes:
[0155] S41: performing a read and write test on the register of the status monitor, and determining that the status monitor loses response when the register cannot be read and written normally.
[0156] In this embodiment, in order to test whether the status monitor is operating normally, when the switch is started, a read and write test is performed on the register of the status monitor. Data is repeatedly written and read from the register of the status monitor through the arbiter of each low-speed serial bus control bus. If the data can be read and written normally, it means that the status monitor is operating normally.
[0157] S42: monitoring the target device corresponding to the status monitor through the control bus of the central processing unit.
[0158] In this embodiment, if the register in the status monitor cannot be read or written normally, it is determined that the status monitor has lost response.
[0159] In this embodiment, when it is determined that the status monitor has lost response, all control buses in the status monitor are unavailable, and all target devices that the status monitor is responsible for monitoring are handed over to the central processing unit for monitoring, all control buses of the status monitor are turned off, the driver of the low-speed serial bus controller of the central processing unit is loaded in each target device and the remaining programs, and the program interface is switched to fully migrate the monitoring task to the central processing unit.
[0160] In this embodiment, when a fault is detected in the status monitor, all target devices corresponding to the status monitor are promptly handed over to the central processor for monitoring, thereby ensuring stable operation of the system.
[0161] refer to Figure 3 , Figure 3 : is a schematic diagram of the monitoring program operation flow proposed in an embodiment of the present application, such as Figure 3 As shown, after the operating system of the white box switch is started, the status monitor monitoring program first detects whether the status monitor can read and write normally. If it cannot read and write normally, the backup driver is directly loaded, an alarm is issued, the fault information is recorded in the log, and the fault information is written into the database to inform other programs. If it can read and write normally, it is determined whether there is an abnormal low-speed bus in the status monitor. If so, the abnormal status monitor channel is closed, the backup controller driver is loaded to open the backup bus, an alarm is issued, the abnormal information is recorded in the log, and other programs that rely on the bus are notified. The control bus number and control bus number of the abnormal control bus are written into the database of the operating system. The monitoring program will continue to monitor the status of the status monitor after the low-speed serial bus is abnormal. If it is found that the abnormal function of the status monitor is restored and lasts for a period of time, it will try to remove the abnormal state and restore the original low-speed bus controller and the corresponding code. The duration of the abnormal function recovery can be set according to the actual situation and is not limited here.
[0162] In another embodiment of the present application, when an abnormality occurs in a control bus of the status monitor and the central processing unit takes over the corresponding target device, the arbiter attempts to restore the communication of the control bus within a preset time period. If the communication is not restored within the preset time period, the failure of the control bus recovery is recorded in the log, and the control bus is marked for maintenance. When checking the log, the staff can know that the control bus cannot be automatically restored. At this time, the control bus is repaired and the maintenance mark in the log is removed after the maintenance. The system detects that the maintenance mark is removed and restores the control bus again until the control bus resumes normal operation.
[0163] In the above embodiments of the present application, the status monitor and the central processing unit back up each other to monitor each device in the white box switch to prevent the status monitor from abnormalities and causing the white box device monitoring function to fail. The central processing unit is used as a backup white box switch low-speed bus controller, and no additional hardware is required, which reduces the complexity of hardware design and saves costs. When an abnormality occurs in a single low-speed bus, it does not lead to the migration of the overall function. Only the monitoring task of a target device needs to be migrated separately, which improves the system's work efficiency and reduces the performance loss caused by the abnormality. The abnormal control bus is processed in time and automatically attempted to be restored. After the abnormal control bus returns to normal, the control bus can be re-enabled, ensuring the work efficiency of the central processing unit and thereby optimizing the work efficiency of the entire white box switch operating system.
[0164] Based on the same inventive concept, an embodiment of the present application provides a device monitoring apparatus. Figure 4 , Figure 4 FIG. 4 is a schematic diagram of a device monitoring apparatus 400 proposed in an embodiment of the present application. Figure 4 As shown, the device comprises:
[0165] A first monitoring module 401, configured to monitor at least one target device in the device through a status monitor;
[0166] The first monitoring takeover module 402 is used to monitor the target device corresponding to the control bus through the central processing unit when any control bus of the status monitor is abnormal.
[0167] Optionally, the device further comprises:
[0168] A program startup module is used to start the status monitor monitoring program;
[0169] The status monitor monitoring module is used to monitor the operating status of the status monitor in real time through the status monitor monitoring program.
[0170] Optionally, the device further comprises:
[0171] The monitoring recovery module is used to restore the monitoring of the target device by the status monitor when it is detected that the running status of the status monitor has returned to normal.
[0172] Optionally, the first monitoring module includes:
[0173] A status data reading submodule, used for reading the operation status data of each of the target devices through the status monitor;
[0174] The data sending submodule is used to send the operating status data to the central processing unit through the status monitor.
[0175] Optionally, the monitoring takeover module includes:
[0176] A bus determination submodule, used to determine a control bus of the state monitor corresponding to the target device;
[0177] A bus closing submodule, used for closing the control bus corresponding to the status monitor;
[0178] The monitoring takeover submodule is used to monitor the target device using the control bus corresponding to the central processing unit.
[0179] Optionally, the monitoring and taking over submodule includes:
[0180] A driver loading submodule, used for loading a driver corresponding to the control bus corresponding to the central processing unit;
[0181] The signal forwarding submodule is used to forward the signal sent by the central processing unit to the target device through the arbiter corresponding to the target device.
[0182] Optionally, the device further comprises:
[0183] An alarm module is used to send corresponding alarm information through the status monitor monitoring program;
[0184] The abnormal information recording module is used to record the abnormal information of the control bus corresponding to the target device in a log.
[0185] Optionally, the device further comprises:
[0186] A data writing module, used for writing the number of the control buses with abnormalities and the control bus numbers into a database, so as to inform the program relying on the control bus to switch the program interface of the status monitor to the program interface of the central processing unit;
[0187] Optionally, the device further comprises:
[0188] A read / write test module, used to perform a read / write test on the register of the status monitor, and determine that the status monitor loses response when the register cannot be read / written normally;
[0189] The central processing unit takes over the control module, and is used to monitor the target device corresponding to the status monitor through the control bus of the central processing unit.
[0190] Optionally, the monitoring recovery module includes:
[0191] A bus closing submodule, used to close the control bus corresponding to the central processing unit;
[0192] A program interface closing submodule, used to close the program interface corresponding to the central processing unit;
[0193] An information deletion submodule, used for deleting the information corresponding to the control bus where an abnormality occurs in the database;
[0194] The device monitoring submodule is used to monitor the target device using the control bus corresponding to the status monitor.
[0195] Based on the same inventive concept, another embodiment of the present application provides a readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the device monitoring method described in any of the above embodiments of the present application are implemented.
[0196] Based on the same inventive concept, another embodiment of the present application provides an electronic device, Figure 5It is a schematic diagram of an electronic device 500 proposed in one embodiment of the present application, including a memory 502, a processor 501 and a computer program stored in the memory and executable on the processor, and when the processor is executed, the steps in the device monitoring method described in any of the above embodiments of the present application are implemented.
[0197] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0198] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0199] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or at least one computer-usable storage medium (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing a computer-usable program code.
[0200] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or at least one process and / or box Figure 1 A device that is a block or at least a function specified in a block.
[0201] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or at least one process and / or box Figure 1 boxes or at least the functions specified in a box.
[0202] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or at least one process and / or box Figure 1 A block or at least a step of the function specified in a block.
[0203] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0204] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0205] The equipment monitoring system, method, product, equipment and storage medium provided by the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A device monitoring system, characterized in that: The system comprises: a status monitor, used to monitor the operating status of at least one target device in the equipment, the target device being connected to the status monitor; A central processing unit, used to take over monitoring the target device when the running state of the status monitor is abnormal, and to take over monitoring the target device corresponding to the control bus when any control bus of the status monitor is abnormal, the central processing unit being connected to the status monitor; An arbiter, used for controlling the signal received by the target device, the target device being connected to the state monitor and the central processing unit through the arbiter; In the case where the central processing unit takes over monitoring of the target device, a program that relies on a control bus corresponding to the target device switches a program interface of the status monitor to a program interface of the central processing unit, so as to access the target device through the program interface of the central processing unit; A state monitor monitoring program is run in the central processing unit, which is used to implement the monitoring of the state monitor and the switching of the control bus; The arbiter sends a signal to the target device through the control bus to restore data transmission of the control bus when any control bus of the status monitor is abnormal, and sends the signal of the target device to the central processor when data transmission of the control bus cannot be restored; The arbiter restores data transmission on the faulty control bus when detecting that the maintenance mark on the faulty control bus has been removed.
2. The equipment monitoring system according to claim 1, characterized in that: The system further comprises: The expander is used to expand the number of interfaces of the central processing unit, and the expander is connected to the central processing unit and the arbiter.
3. The equipment monitoring system according to claim 1, characterized in that: The arbiter forwards the signal sent by the status monitor to the target device when the operating status of the status monitor is normal; The arbiter forwards the signal sent by the central processor to the target device when the operating state of the state monitor is abnormal.
4. A device monitoring method, characterized in that: The method comprises: monitoring at least one target device in the device by a status monitor; When any control bus of the status monitor is abnormal, attempt to restore data transmission of the control bus; In the case where the data transmission recovery of the control bus fails, the target device corresponding to the control bus is monitored by the central processing unit, including: Determining a control bus of the status monitor corresponding to the target device; Turning off the control bus of the corresponding status monitor; The target device is monitored using a control bus corresponding to the central processing unit, and the target device performs data transmission with the central processing unit through a driver corresponding to the control bus corresponding to the central processing unit; Writing the number of the abnormal state monitor control bus and the control bus number into a database to inform the program that relies on the state monitor control bus to switch the program interface of the state monitor to the program interface of the central processing unit; Adding a maintenance mark to the control bus where the abnormality occurs, so as to set the control bus to a state to be maintained; When it is detected that the maintenance mark of the control bus is removed, data transmission of the control bus is restored.
5. The device monitoring method according to claim 4, characterized in that: The method further comprises: Start the status monitor monitoring program; The operating status of the status monitor is monitored in real time through the status monitor monitoring program.
6. The device monitoring method according to claim 5, characterized in that: The method further comprises: Performing a read and write test on a register of the status monitor, and determining that the status monitor loses response when the register cannot be read and written normally; The target device corresponding to the status monitor is monitored through the control bus of the central processing unit.
7. The device monitoring method according to claim 4, characterized in that: The method further comprises: When it is detected that the running state of the state monitor returns to normal, the state monitor is restored to monitor the target device.
8. The device monitoring method according to claim 7, characterized in that: The restoring the monitoring of the target device by the status monitor includes: Turning off the control bus corresponding to the central processing unit; Closing the program interface corresponding to the central processing unit; Deleting information corresponding to the control bus of the state monitor where an abnormality occurs in the database; The target device is monitored using a control bus corresponding to the status monitor.
9. The device monitoring method according to claim 4, characterized in that: The monitoring of at least one target device in the device by a status monitor includes: Reading the operating status data of the target device through the status monitor; The operating status data is sent to the central processing unit through the status monitor.
10. The device monitoring method according to claim 4, characterized in that: The use of the control bus corresponding to the central processing unit to monitor the target device includes: Loading a driver corresponding to the control bus corresponding to the central processing unit; The signal sent by the central processing unit is forwarded to the target device through the arbiter corresponding to the target device.
11. The device monitoring method according to claim 4, characterized in that: The method further comprises: Send out corresponding alarm information through the status monitor monitoring program; The abnormal information of the state monitor control bus corresponding to the target device is recorded in the log.
12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps in the method according to any one of claims 4 to 11 are implemented.
13. 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 in the method according to any one of claims 4 to 11 are implemented.
14. 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, the steps of the method according to any one of claims 4 to 11 are implemented.
Citation Information
Patent Citations
Baseboard management controller fault detection device
CN114691408A