Monitoring method and network device
By setting a second component in the network device and monitoring external components instead of abnormal CPU or BMC, the security risks caused by monitoring abnormalities in the prior art are solved, and monitoring reliability and equipment stability are improved.
Patent Information
- Application Number
- PCT/CN2024/088690
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-06
- Filing Date
- 2024-04-18
- Publication Date
- 2024-11-14
AI Technical Summary
When existing network devices monitor external components, the CPU or BMC is prone to abnormalities, resulting in the inability to effectively monitor external components, increasing security risks.
Setting a second component in a network device is used to monitor the external component instead of it when an exception occurs in the first component (such as the CPU or BMC), and to monitor the status of the first component through a heartbeat signal mechanism to ensure the sustainability of the external component Monitor reliability.
It improves the reliability of network equipment monitoring external components, reduces safety risks, ensures that operation and maintenance personnel can handle abnormalities in a timely manner, and ensures the normal operation of the equipment.
Smart Images

Figure CN2024088690_14112024_PF_FP_ABST
Abstract
Description
Monitoring method and network device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on May 6, 2023, with application number 202310500975.X, and priority to the Chinese patent application entitled “A Monitoring Method and Network Device”, all contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a monitoring method and network equipment. Background Art
[0003] To ensure the safety of network devices (such as servers, switches, routers, etc.), network devices monitor the status of their external components (such as fans, power supplies, temperature sensors, etc.) during operation. Taking fans and temperature sensors as an example, since network devices generate a lot of heat, in order to avoid abnormal operation of the equipment due to excessive temperature, temperature sensors and fans are usually installed in the network devices. The temperature of the network devices is monitored by the temperature sensors. When the temperature of the network devices is high, the fan speed is adjusted to dissipate heat for the network devices.
[0004] Currently, network devices typically monitor external components through components such as central processing units (CPUs) or baseboard management controllers (BMCs). These components are prone to malfunctions, often resulting in an inability to monitor external components and posing a significant security risk to network devices.
[0005] Summary of the Invention
[0006] The present application provides a monitoring method and a network device, which can better monitor the external components of the network device and improve the reliability of the external component monitoring.
[0007] In a first aspect, a monitoring method is provided, which is applied to a network device, wherein the network device includes a first component and a second component, the first component is connected to an external component of the network device, the second component is also connected to the external component, and the second component is connected to the first component, the method including the following steps: the first component monitors the external component, and when an abnormality occurs in the first component, the second component monitors the external component.
[0008] By setting a second component in the network device, the above solution can realize that when an abnormality occurs in the first component (such as the CPU or BMC used to monitor the external component), the external component can be monitored by the second component, thereby improving the reliability of the network device's monitoring of the external component and reducing the security risks of the network device.
[0009] In addition, the above solution can also monitor whether the first component has any abnormalities, so that when the first component has any abnormalities, the operation and maintenance personnel can promptly handle the abnormalities of the first component.
[0010] In a possible implementation, the method provided in the first aspect further includes the following step: the second component determines that an abnormality has occurred in the first component based on not receiving a heartbeat signal sent by the first component for a period of time.
[0011] In one possible implementation, the method provided in the first aspect also includes the following steps: when the second component monitors the external component, the second component receives a heartbeat signal sent by the first component. In this case, the second component determines that the first component has returned to normal, then stops monitoring the external component, and the first component monitors the external component.
[0012] By implementing this implementation, when the first component returns to normal, the monitoring task of the external component can be restored to be performed by the first component.
[0013] In order to improve the flexibility of the solution, in one possible implementation, the network device also includes a third component, the first component is connected to the external component through the third component, and the second component is connected to the first component through the third component. The method provided in the first aspect also includes the following steps: the third component determines that an abnormality has occurred in the first component, and notifies the second component that an abnormality has occurred in the first component.
[0014] In one possible implementation, the third component includes a register. The third component can specifically determine that an abnormality has occurred in the first component in the following manner: the third component determines that an abnormality has occurred in the first component based on not receiving a heartbeat signal sent by the first component for a period of time, and then the third component sets the value of the register to a first value, and the first value is used to indicate that an abnormality has occurred in the first component.
[0015] In one possible implementation, the third component may specifically notify the second component that an abnormality has occurred in the first component in the following manner: the third component sends the first value of a register to the second component, where the first value indicates that an abnormality has occurred in the first component; or, the second component reads the first value of a register, where the first value indicates that an abnormality has occurred in the first component.
[0016] In order to improve the flexibility of the solution, in one possible implementation, when the third component includes a register, the method provided in the first aspect above also includes the following steps: when the second component monitors the external component, the third component receives the heartbeat signal sent by the first component. At this time, the third component determines that the first component has returned to normal and sets the value of the register to the second value. The second value indicates that the first component has returned to normal. When the second component determines that the value of the register is the second value, it stops monitoring the external component and the first component monitors the external component.
[0017] In a possible implementation, the first component is a CPU, and the second component is a BMC; alternatively, the first component is a BMC, and the second component is a CPU.
[0018] By implementing this implementation method, the technical solution provided by this application can be applied to network devices that monitor external components through the CPU or BMC, solving the problem that this type of network device cannot monitor external components when the CPU or BMC is abnormal.
[0019] In one possible implementation, the third component is a complex programmable logic device (CPLD).
[0020] In one possible implementation, the network device is a white box switch, and the external components include any one or more of a fan, a power supply, a temperature sensor, a network interface, a flash memory, or a hard disk.
[0021] By implementing this implementation method, the technical solution provided by the present application can be applied to white-box switches, thereby solving the problem that when a component used to monitor external components is abnormal, the external components cannot be monitored in the white-box switch.
[0022] According to a second aspect, a network device is provided, which includes a first component and a second component, wherein the first component is connected to an external component of the network device, the second component is also connected to the external component, and the second component is connected to the first component, wherein the first component is used to monitor the external component, and the second component is used to monitor the external component when an abnormality occurs in the first component.
[0023] In a possible implementation, the second component is further configured to determine that an abnormality has occurred in the first component based on not receiving a heartbeat signal sent by the first component for a period of time.
[0024] In one possible implementation, when the second component is used to monitor the external component, the second component is also used to receive the heartbeat signal sent by the first component, and to determine that the first component has returned to normal, then stop monitoring the external component, and the first component is used to monitor the external component.
[0025] In one possible implementation, the network device also includes a third component, the first component is connected to the external component through the third component, and the second component is connected to the first component through the third component. In the network device, the third component is used to determine that an abnormality has occurred in the first component and to notify the second component that an abnormality has occurred in the first component.
[0026] In one possible implementation, the third component includes a register. In the network device, the third component is used to determine that an abnormality has occurred in the first component based on not receiving a heartbeat signal sent by the first component for a period of time, and is used to set the value of the register to a first value, and the first value is used to indicate that an abnormality has occurred in the first component.
[0027] In one possible implementation, the third component is used to send a first value of a register to the second component, where the first value indicates that an abnormality has occurred in the first component; or, the second component is used to read the first value of the register, where the first value indicates that an abnormality has occurred in the first component.
[0028] In one possible implementation, when the second component is used to monitor the external component, the third component is used to receive the heartbeat signal sent by the first component, and to determine whether the first component has returned to normal, and set the value of the register to a second value, the second value indicating that the first component has returned to normal, the second component is used to determine that the value of the register is the second value, then stop monitoring the external component, and the first component is used to monitor the external component.
[0029] In a possible implementation, the first component is a CPU, and the second component is a BMC; alternatively, the first component is a BMC, and the second component is a CPU.
[0030] In one possible implementation, the third component is a CPLD.
[0031] In one possible implementation, the network device is a white box switch, and the external components include any one or more of a fan, a power supply, a temperature sensor, a network interface, a flash memory, or a hard disk.
[0032] For the relevant beneficial effects and descriptions of the network device provided by the second aspect and any implementation method of the second aspect, please refer to the relevant beneficial effects and descriptions of the aforementioned first aspect and any implementation method of the first aspect, and will not be repeated here.
[0033] According to a third aspect, a monitoring system is provided, which includes the above-mentioned network device.
[0034] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program (also referred to as code, or instructions) which, when executed on a network device, enables the network device to execute any implementation of the first aspect and any aspect described above.
[0035] In a fifth aspect, a chip system is provided, which may include a processor. The processor is coupled to a memory and may be used to execute the steps performed by the first component, the second component, or the third component in the first aspect and any one of the implementations of the first aspect. Optionally, the chip system further includes a memory. The memory is used to store a computer program (also referred to as code, or instructions). The processor is used to call and run the computer program from the memory so that the device equipped with the chip system executes the steps performed by the first component, the second component, or the third component in the first aspect and any one of the implementations of the first aspect.
[0036] In a sixth aspect, a computer program product is provided, which includes: a computer program (also referred to as code, or instructions), which, when run by a network device, enables the network device to execute the above-mentioned first aspect and any one of the implementation methods of the first aspect.
[0037] Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] FIG1 is a schematic diagram of the structure of a network device involved in this application;
[0039] FIG2 is a schematic diagram of the structure of a network device provided by the present application;
[0040] FIG3 is a schematic diagram of the structure of another network device provided by the present application;
[0041] FIG4 is a schematic diagram of the structure of another network device provided by the present application;
[0042] FIG5 is a flow chart of a monitoring method provided by the present application;
[0043] FIG6 is a flow chart of another monitoring method provided by the present application;
[0044] FIG7 is a schematic diagram of the structure of another network device provided by the present application. DETAILED DESCRIPTION
[0045] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.
[0046] In order to facilitate a clear understanding of the embodiments of the present application, relevant terms are first explained.
[0047] (1) White box switch: A network switch based on open hardware and software, which allows users to freely choose different hardware and software combinations to meet their specific network needs.
[0048] (2) External components of network devices: These can also be called external devices or peripherals. They refer to components connected outside the network device host. They are auxiliary or supplementary components connected to the network device. External components can expand the network device. Taking a server as an example, the external components of the server include input devices such as keyboards, output devices such as monitors, and external storage devices such as solid state disks (SSDs). Taking a switch as an example, the external components of the switch include fans for cooling the switch, temperature sensors for monitoring the temperature of the switch, power supplies for powering the switch, network interfaces for communicating with other devices, flash memory, hard disks, etc.
[0049] (3) Complex programmable logic device (CPLD): A digital integrated circuit in which users can construct logic functions according to their needs.
[0050] This application relates to scenarios where network devices (such as servers, switches, routers, etc.) need to monitor their own external components.
[0051] Refer to Figure 1, which is a structural diagram of a network device 100 involved in the present application. As shown in Figure 1, the network device 100 includes: a first component 110 and an external component 120. The first component 110 is connected to the external component 120. The first component 110 is a CPU or BMC, etc. The external component 120 includes a fan 1201, a power supply (also known as a power supply unit (PSU)) 1202, a temperature sensor 1203, a network interface, a flash memory or a hard disk. Any one or more of the following, optionally, the external component 120 may also include others, which is not specifically limited in the present application.
[0052] First component 110 is responsible for monitoring external component 120. For example, temperature sensor 1203 is used to monitor temperature changes of network device 100. This allows for timely cooling of network device 100 or implementation of a low-temperature protection mechanism when the temperature is too high or too low. For example, fan 1201 is used to dynamically adjust the speed of fan 1201 based on temperature changes, thereby achieving temperature regulation for network device 100.
[0053] It should be understood that the network device 100 shown in FIG1 is merely an example. In actual applications, the network device 100 may further include other or more components, and FIG1 should not be regarded as a specific limitation.
[0054] At present, the problem with the network device 100 shown in Figure 1 is that the first component 110 is prone to abnormalities, which often leads to the inability to monitor the external component 120, causing great safety hazards to the network device 100. For example, if the temperature of the network device 100 is too high, it may cause failure of components on the motherboard of the network device 100.
[0055] In order to solve the problems existing in the above-mentioned network device 100, the present application provides a network device and a monitoring method, which are described in detail below in conjunction with the corresponding drawings.
[0056] First, please refer to Figure 2, which is a structural diagram of a network device 200 provided in this application. As shown in Figure 2, the network device 200 includes: a first component 110, an external component 120 and a second component 130. The first component 110 and the second component 130 are both connected to the external component 120, and the first component 110 and the second component 130 are connected.
[0057] The above connection relationship can be a direct connection, as shown in Figure 2. Alternatively, the connection relationship can also be an indirect connection, as shown in Figure 3, the first component 110 is indirectly connected to the second component 130 through the third component 140, the first component 110 is indirectly connected to the external component 120 through the third component 140, and the second component 130 is also indirectly connected to the external component 120 through the third component 140. Optionally, the connection relationship can also be other, as shown in Figure 4, the first component 110 is directly connected to the second component 130, the first component 110 is indirectly connected to the external component 120 through the third component 140, and the second component 130 is also indirectly connected to the external component 120 through the third component 140. This application does not specifically limit the connection relationship between the first component 110, the external component 120 and the second component 130.
[0058] In a specific implementation, the third component 140 may be a CPLD, a field programmable gate array (FPGA), etc., which is not specifically limited in this application.
[0059] During the process of the first component 110 monitoring the external component 120, the second component 130 can monitor the status of the first component 110. When it is determined that an abnormality occurs in the first component 110 (such as the first component 110 cannot continue to monitor the external component 120), the second component 130 starts to monitor the external component 120.
[0060] During the process of the second component 130 monitoring the external component 120, the second component 130 can continue to monitor the status of the first component 110. When it is determined that the first component 110 has returned to normal, the second component 130 stops monitoring the external component 120 and the first component 110 continues to monitor the external component 120.
[0061] Optionally, when the second component 130 determines that the first component 110 has returned to normal, the second component 130 may continue to monitor the external component 120. After the first component 110 has returned to normal, it may monitor the status of the second component 130. If it determines that the second component 130 is abnormal, the first component 110 may monitor the external component 120 again.
[0062] In order to more clearly understand the process of the network device 200 monitoring the external component 120, a detailed description is given below with reference to the flowchart of the monitoring method shown in FIG5.
[0063] As shown in FIG5 , the monitoring method provided by this application includes the following steps:
[0064] S501 : The first component 110 monitors the external component 120 .
[0065] Taking temperature sensor 1203 as an example, first component 110 can obtain temperature changes of network device 200 detected by temperature sensor 1203, so that when the temperature is too high or too low, timely heat dissipation treatment or low temperature protection mechanism can be implemented for network device 200. Taking fan 1201 as an example, first component 110 can dynamically calculate the speed of fan 1201 based on the obtained temperature changes of network device 200, and adjust the speed of fan 1201 based on the calculated speed, thereby achieving temperature regulation of network device 200. Taking power supply 1202 as an example, first component 110 can obtain the voltage of power supply 1202 to monitor whether the voltage of power supply 1202 is too high or too low.
[0066] S502: The second component 130 monitors the status of the first component 110. When the second component 130 determines that the first component 110 is abnormal, the second component 130 executes S503. When the second component 130 determines that the first component 110 is normal, the second component 130 executes S504.
[0067] Specifically, when the network device 200 is the network device shown in FIG. 2 or FIG. 4 , the second component 130 may monitor the status of the first component 110 in any one of the following manners 1 or 2:
[0068] Method 1: The second component 130 detects the operating status of the first component 110 based on the heartbeat signal periodically sent by the first component 110. If the second component 130 does not receive the heartbeat signal sent by the first component 110 for a period of time, it is determined that the first component 110 has an abnormality; otherwise, it is determined that the first component 110 is normal.
[0069] The above period of time can be customized according to the actual scenario and is not specifically limited here.
[0070] Method 2: The second component 130 detects the operating status of the first component 110 based on the heartbeat signal periodically sent by the first component 110. If the second component 130 does not receive the heartbeat signal sent by the first component 110 for a certain number of consecutive times, it is determined that the first component 110 is abnormal. Otherwise, it is determined that the first component 110 is normal.
[0071] The above certain number of times can be customized according to actual scenarios and is not specifically limited here.
[0072] When the network device 200 is the network device shown in FIG3 or FIG4 , the second component 130 can monitor the status of the first component 110 in any one of the following methods 3 or 4:
[0073] Method 3: The third component 140 detects the operating status of the first component 110 based on the heartbeat signal periodically sent by the first component 110. If the third component 140 does not receive the heartbeat signal sent by the first component 110 for a period of time, it determines that the first component 110 is abnormal. Otherwise, it determines that the first component 110 is normal. After determining the status of the first component 110, the third component 140 can send a notification to the second component 130 to inform the second component 130 of the status of the first component 110.
[0074] Method 4: The third component 140 detects the operating status of the first component 110 based on the heartbeat signal periodically sent by the first component 110. If the third component 140 does not receive the heartbeat signal sent by the first component 110 for a certain number of consecutive times, it determines that the first component 110 is abnormal. Otherwise, it determines that the first component 110 is normal. After determining the status of the first component 110, the third component 140 can send a notification to the second component 130 to inform the second component 130 of the status of the first component 110.
[0075] In mode 3 or mode 4, a register may be set in the third component 140. The register has an initial value, such as 0, or initially has no value. When the third component 140 determines that the first component 110 is abnormal, the register value is set to a first value, such as 1. The first value is used to indicate that the first component 110 is abnormal. The second component 130 may periodically read the value of the register in the third component 140 and determine that the first component 110 is abnormal when the register value read is the first value.
[0076] Optionally, the third component 140 can periodically send the value of the register to the second component 130. After determining that the first component 110 has an abnormality and setting the value of the register to the first value, the third component 140 can send the first value of the register to the second component 130, so that the second component 130 determines that the first component 110 has an abnormality based on the first value of the register.
[0077] It should be understood that the above-mentioned methods 1 to 4 are merely examples and should not be regarded as specific limitations on the implementation method of the second component 130 monitoring the status of the first component 110.
[0078] S503 : The second component 130 monitors the external component 120 .
[0079] S504: The second component 130 does not perform any processing.
[0080] In a possible embodiment, as shown in FIG6 , when the second component 130 executes S503 to monitor the external component 120, the second component 130 may also execute S505 to continue monitoring the status of the first component 110. When the second component 130 determines that the first component 110 has returned to normal, the second component 130 executes S506 to stop monitoring the external component 120, and the first component 110 executes S507 to monitor the external component 120. When the second component 130 determines that the first component 110 has not returned to normal, the second component 130 continues to execute S503 to monitor the external component 120.
[0081] Corresponding to the above-mentioned method 1 or method 2, if the second component 130 receives the heartbeat signal sent by the first component 110 while monitoring the external component 120, the second component 130 determines that the first component 110 has returned to normal; otherwise, it determines that the first component 110 has not returned to normal.
[0082] Corresponding to the above-described method 3 or method 4, if the third component 140 receives a heartbeat signal sent by the first component 110 while the second component 130 is monitoring the external component 120, the third component 140 determines that the first component 110 has returned to normal. Otherwise, the third component 140 determines that the first component 110 has not returned to normal. After determining the status of the first component 110, the third component 140 may send a notification to the second component 130 to inform the second component 130 of the status of the first component 110.
[0083] Specifically, when the third component 140 determines that the first component 110 has returned to normal, it can set the value of the register to a second value, such as 2, which is used to indicate that the first component 110 has returned to normal. The second component 130 can periodically read the value of the register in the third component 140, and when the register value read is the second value, it determines that the first component 110 has returned to normal, and when the register value read is the first value, it determines that the first component 110 has not returned to normal.
[0084] Optionally, the third component 140 can periodically send the value of the register to the second component 130. After determining that the first component 110 has returned to normal and setting the value of the register to the second value, the third component 140 can send the second value of the register to the second component 130, so that the second component 130 determines that the first component 110 has returned to normal based on the second value of the register.
[0085] In a possible embodiment, in order to further improve the reliability of the network device 200 in monitoring the external component 120, a component for monitoring the status of the third component 140 can be set in the network device 200 shown in Figures 3 and 4, such as a fourth component 150 (not shown in Figures 3 and 4), and the fourth component 150 is connected to the first component 110, the second component 130, and the external component 120. When the fourth component 150 determines that the third component 140 has an abnormality, the fourth component 150 replaces the third component 140 to communicate with the first component 110, the second component 130 and the external component 120.
[0086] It can be seen from the embodiment of Figure 5 that the second component 130 set in the network device can monitor whether the first component 110 has an abnormality. When the second component 130 determines that the first component 110 has an abnormality, the second component 130 can monitor the external component 120 instead of the first component 110. In this way, the reliability of the network device's monitoring of the external component 120 can be improved, and the safety risks of the network device can be reduced.
[0087] In addition, in the embodiment of FIG5 , the second component 130 can monitor whether the first component 110 has any abnormalities, so that when an abnormality occurs in the first component 110, the operation and maintenance personnel can promptly handle the abnormality of the first component 110. It should be understood that in various embodiments of the present application, the order of the sequence numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0088] It is understandable that in order to implement the functions in the above method embodiments, the first component 110, the second component 130, and the third component 140 include hardware structures and / or software modules corresponding to the execution of each function. It should be readily apparent to those skilled in the art that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in hardware or in a manner driven by computer software depends on the specific application scenario and design constraints of the technical solution.
[0089] FIG7 is a schematic diagram of the structure of a possible monitoring device 700 provided by the present application. As shown in FIG7 , the monitoring device 700 includes a processor 720, a communication interface 710, a BMC 730, and an external component 740. The processor 720, the communication interface 710, the BMC 730, and the external component 740 are coupled to each other. The processor 720 can be used to execute the steps performed by the first component 110 in the above method embodiment, and can also be used to execute the steps performed by the second component 130 in the above method embodiment. When the processor 720 is used to execute the steps performed by the first component 110 in the above method embodiment, the BMC 730 is used to execute the steps performed by the second component 130 in the above method embodiment. When the processor 720 is used to execute the steps performed by the second component 130 in the above method embodiment, the BMC 730 is used to execute the steps performed by the first component 110 in the above method embodiment.
[0090] It is understood that the communication interface 710 can be a transceiver or an input / output interface. Optionally, the monitoring device 700 may further include a memory 750 for storing instructions executed by the processor 720 and / or the BMC 730, or for storing input data required by the processor 720 and / or the BMC 730 to execute instructions, or for storing data generated after the processor 720 and / or the BMC 730 executes instructions. Optionally, the monitoring device 700 may further include a CPLD 760 (not shown in FIG. 7 ) for executing the steps performed by the third component 140 in the above-described method embodiment.
[0091] It is understood that the processor 720 in the embodiment of the present application may be a CPU, or may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), FPGAs or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.
[0092] The communication interface 710 may be a wired interface (e.g., an Ethernet interface, a fiber optic interface, or other types of interfaces (e.g., an InfiniBand interface)) or a wireless interface (e.g., a cellular network interface or a wireless local area network interface) for communicating with other computing devices or apparatuses. When the communication interface 710 is a wired interface, the communication interface 710 may utilize a protocol suite based on TCP / IP, such as the Remote Function Call (RFC) protocol, the Simple Object Access Protocol (SOAP) protocol, the Simple Network Management Protocol (SNMP) protocol, the Common Object Request Broker Architecture (CORBA) protocol, and distributed protocols.
[0093] Memory 750 may be a non-volatile memory, such as read-only memory (ROM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Memory 640 may also be a volatile memory, such as random access memory (RAM), which is used as an external cache.
[0094] The external component 120 may include any one or more of a fan, a power supply, a temperature sensor, a network interface, a flash memory, a hard disk, and the like.
[0095] According to the method provided in the present application, the present application also provides a computer-readable storage medium, which stores a program or instruction. When the program or instruction is run on a computer, the computer executes part or all of the steps of the method embodiments shown in Figures 5 and 6.
[0096] According to the method provided in the present application, the present application also provides a chip system, which may include a processor. The processor is coupled to the memory and can be used to execute some or all of the steps performed by the first component 110, the second component 130, or the third component 140 in the method embodiments shown in Figures 5 and 6. Optionally, the chip system also includes a memory. The memory is used to store computer programs (also referred to as codes, or instructions). The processor is used to call and run the computer program from the memory so that the device equipped with the chip system executes some or all of the steps of the method embodiments shown in Figures 5 and 6.
[0097] According to the monitoring method provided in the present application, the present application also provides a monitoring system, which includes the aforementioned network device 200.
[0098] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory, erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory, registers, hard disks, solid-state drives (SSDs), mobile hard disks, portable read-only memories (CD-ROMs), or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). In addition, the ASIC can be located in a communication device. Of course, the processor and the storage medium can also be present in the communication device as discrete components.
[0099] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. A computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, all or part of the processes or functions of the embodiments of the present application are performed. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, or other programmable device. The computer program or instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions may be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media, such as floppy disks, hard disks, or magnetic tapes; optical media, such as digital video disks; or semiconductor media, such as solid-state drives. The computer-readable storage medium may be a volatile or nonvolatile storage medium, or may include both volatile and nonvolatile types of storage media.
[0100] In the various embodiments of this application, unless otherwise specified or logically conflicting, the terms and / or descriptions between different embodiments are consistent and can be referenced from each other. The technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships. In this application, "multiple" refers to two or more. "And / or" describes the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In the text description of this application, the character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formulas of this application, the character " / " indicates that the previous and next associated objects are in a "division" relationship. "Including at least one of A, B, or C" can mean: including A; including B; including C; including A and B; including A and C; including B and C; including A, B, and C.
[0101] It is understood that the various numbers used in the embodiments of this application are merely for ease of description and are not intended to limit the scope of the embodiments of this application. The order of the sequence numbers of the above-mentioned processes does not necessarily imply a specific order of execution; the order of execution of the processes should be determined by their functions and inherent logic.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A monitoring method, characterized in that: Applied to a network device, the network device includes a first component and a second component, the first component is connected to an external component of the network device, the second component is connected to the external component, and the second component is connected to the first component, the method includes: The first component monitors the external component; When an abnormality occurs in the first component, the second component monitors the external component.
2. The method according to claim 1, characterized in that The method further comprises: The second component determines that the first component is abnormal based on not receiving the heartbeat signal sent by the first component for a period of time.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: In a case where the second component monitors the external component, the second component receives a heartbeat signal sent by the first component; The second component stops monitoring the external component when it determines that the first component has returned to normal; The first component monitors the external component.
4. The method according to claim 1, characterized in that: The network device further includes a third component, the first component is connected to the external component through the third component, and the second component is connected to the first component through the third component, and the method further includes: The third component determines that an abnormality occurs in the first component; The third component notifies the second component that an abnormality has occurred in the first component.
5. The method according to claim 4, characterized in that The third component includes a register, and the third component determines that an abnormality occurs in the first component, including: The third component determines that the first component is abnormal according to not receiving the heartbeat signal sent by the first component for a period of time; The third component sets the value of the register to a first value, where the first value is used to indicate that an abnormality occurs in the first component.
6. The method according to claim 5, characterized in that The third component notifying the second component that the first component is abnormal includes: The third component sends the first value of the register to the second component, where the first value indicates that an abnormality occurs in the first component; or, The second component reads the first value of the register, and the first value indicates that an exception occurs in the first component.
7. The method according to claim 5 or 6, characterized in that: The method further comprises: In the case where the second component monitors the external component, the third component receives a heartbeat signal sent by the first component; The third component determines that the first component is restored to normal, and the third component sets the value of the register to a second value, wherein the second value indicates that the first component is restored to normal; The second component determines that the value of the register is the second value, and stops monitoring the external component; The first component monitors the external component.
8. The method according to any one of claims 1 to 7, characterized in that: The first component is a central processing unit (CPU), and the second component is a baseboard management controller (BMC), or the first component is a BMC and the second component is a CPU.
9. The method according to any one of claims 4 to 8, characterized in that: The third component is a complex programmable logic device (CPLD).
10. The method according to any one of claims 1 to 9, characterized in that: The network device is a white box switch, and the external components include any one or more of a fan, a power supply, a temperature sensor, a network interface, a flash memory or a hard disk.
11. A network device, characterized in that: The network device comprises a first component and a second component, the first component is connected to an external component of the network device, the second component is connected to the external component, and the second component is connected to the first component; The first component is used to monitor the external component; When an abnormality occurs in the first component, the second component is used to monitor the external component.
12. The network device according to claim 11, characterized in that: The second component is also used to determine that the first component is abnormal based on not receiving a heartbeat signal sent by the first component for a period of time.
13. The network device according to claim 11 or 12, characterized in that: In the case where the second component is used to monitor the external component, the second component is also used to receive a heartbeat signal sent by the first component; The second component is used to determine that the first component returns to normal, and then stop monitoring the external component; The first component is used to monitor the external component.
14. The network device according to claim 11, characterized in that: The network device further includes a third component, the first component is connected to the external component through the third component, and the second component is connected to the first component through the third component; The third component is used to determine that an abnormality occurs in the first component; The third component is used to notify the second component that an abnormality occurs in the first component.
15. The network device according to claim 14, characterized in that: The third component includes a register; The third component is used to determine that the first component is abnormal according to not receiving the heartbeat signal sent by the first component for a period of time; The third component is used to set the value of the register to a first value, and the first value is used to indicate that an abnormality occurs in the first component.
16. The network device according to claim 15, characterized in that: The third component is used to send the first value of the register to the second component, where the first value indicates that an abnormality occurs in the first component; or, The second component is used to read the first value of the register, and the first value indicates that an abnormality occurs in the first component.
17. The network device according to claim 15 or 16, characterized in that: In the case where the second component is used to monitor the external component, the third component is used to receive a heartbeat signal sent by the first component; The third component is used to determine that the first component is restored to normal, and set the value of the register to a second value, wherein the second value indicates that the first component is restored to normal; The second component is used to determine that the value of the register is the second value, and then stop monitoring the external component; The first component is used to monitor the external component.
18. The network device according to any one of claims 11 to 17, characterized in that: The first component is a CPU, and the second component is a BMC, or the first component is a BMC, and the second component is a CPU.
19. The network device according to any one of claims 14 to 18, characterized in that: The third component is a CPLD.
20. The network device according to any one of claims 11 to 19, characterized in that: The network device is a white box switch, and the external components include any one or more of a fan, a power supply, a temperature sensor, a network interface, a flash memory or a hard disk.
21. A computer-readable storage medium storing a computer program, wherein when the computer program is executed on a network device, the network device is caused to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Monitoring method and network equipment
CN118921578A
Monitoring system, method and device
CN101902620A
Vehicle fault treatment method, device and equipment and storage medium
CN109358592A
Driverless system, and control method and control device for vehicle
CN109367501A
Monitoring method and device of network equipment, computing equipment and medium
CN111884857A
