CN114153684A - Component monitoring method, device and medium - Google Patents

Component monitoring method, device and medium Download PDF

Info

Publication number
CN114153684A
CN114153684A CN202111278706.0A CN202111278706A CN114153684A CN 114153684 A CN114153684 A CN 114153684A CN 202111278706 A CN202111278706 A CN 202111278706A CN 114153684 A CN114153684 A CN 114153684A
Authority
CN
China
Prior art keywords
component
monitoring
information
monitored
bus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111278706.0A
Other languages
Chinese (zh)
Inventor
候志立
王相宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202111278706.0A priority Critical patent/CN114153684A/en
Publication of CN114153684A publication Critical patent/CN114153684A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a component monitoring method, after a BMC is started, component information of a component is detected, then component information to be monitored corresponding to an instruction in the component information is called according to the instruction of a monitoring mode, and the corresponding component is monitored according to the component information to be monitored. Compared with the prior art, the components needing to be monitored are positioned on different buses, so that the waste of resources is caused during monitoring, and the monitoring efficiency of other threads is influenced. By adopting the technical scheme, the component information is firstly detected, and after the instruction of the monitoring mode is obtained, the component to be monitored is monitored according to the component information to be monitored corresponding to the instruction in the component information, so that the data volume required when the component to be monitored is confirmed in the prior art is reduced, the waste of resources is reduced, and the monitoring efficiency is improved. The application also discloses a component monitoring device and a medium, which correspond to the component monitoring method and have the same effects.

Description

Component monitoring method, device and medium
Technical Field
The present application relates to the field of data processing, and in particular, to a method, an apparatus, and a medium for monitoring a component.
Background
The Baseboard Management Controller (BMC) is used as an independent embedded system in the server, provides functions such as component monitoring for maintenance personnel of the server, and ensures stable and normal operation of related services in the server. In the process of monitoring the components, the rate of monitoring the components is gradually reduced due to the limitation of the rate of an I2C bus (Inter-Integrated Circuit) and the like and the increasing amount of data to be monitored.
In order to solve the above technical problems, a currently commonly adopted technical solution is to monitor through different threads according to component types, for example, a RAID card monitoring thread mainly monitors relevant information of a RAID card. However, this method has the drawback that in a specific implementation, some items may distribute RAID cards on different I2C buses, which may cause that, when a RAID card is monitored, resources on all I2C buses are contended, and each item of information of a component is checked to identify the RAID card, resulting in waste of resources and also affecting monitoring efficiency of other threads.
Therefore, how to reduce the waste of resources and improve the monitoring efficiency when monitoring the components is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a component monitoring method, a component monitoring device and a component monitoring medium, which are used for reducing the waste of resources and improving the monitoring efficiency when monitoring components.
In order to solve the above technical problem, the present application provides a method for monitoring a component, including:
detecting component information of a component, wherein the component information at least comprises component type information, component ID information and bus information where the component is located;
acquiring a monitoring mode instruction, wherein the monitoring mode instruction comprises a bus monitoring mode, a type monitoring mode and an ID monitoring mode;
calling the information of the part to be monitored corresponding to the instruction in the part information;
and monitoring the corresponding component according to the information of the component to be monitored.
Preferably, the component information of the detecting component includes:
acquiring a bus to be scanned;
and judging whether the component exists on the bus to be scanned, if so, acquiring the component information of the component, otherwise, repeating the step until acquiring the component information of all the components.
Preferably, after the step of monitoring the corresponding component according to the information of the component to be monitored, the method further includes:
and storing the information of the part to be monitored, which is required by monitoring the part, into a database.
Preferably, if the instruction of the monitoring mode is a bus monitoring mode or a type monitoring mode, before the step of monitoring the corresponding component according to the information of the component to be monitored, the method further includes:
putting the information to be monitored into a linked list for sorting;
further, the monitoring the corresponding component according to the information of the component to be monitored is as follows:
and monitoring the corresponding component according to the information of the component to be monitored and the sequence in the linked list.
Preferably, if the instruction of the monitoring mode is an ID monitoring mode, before the step of monitoring the corresponding component according to the information of the component to be monitored, the method further includes:
acquiring an ID group of the component;
putting the information of the components to be monitored into the corresponding ID groups;
further, the monitoring the corresponding component according to the information of the component to be monitored includes:
and monitoring the corresponding parts according to the ID groups.
Preferably, the method further comprises the following steps:
and storing the component state information obtained by monitoring the component.
Preferably, the acquiring the bus to be scanned is repeatedly acquiring the bus to be scanned.
In order to solve the above technical problem, the present application further provides a component monitoring device, which includes:
the device comprises a detection module, a detection module and a control module, wherein the detection module is used for detecting component information of a component, and the component information at least comprises component type information, component ID information and bus information where the component is located;
the system comprises an acquisition module, a monitoring module and a control module, wherein the acquisition module is used for acquiring instructions of a monitoring mode, and the instructions of the monitoring mode comprise a bus monitoring mode, a type monitoring mode and an ID monitoring mode;
the calling module is used for calling the information of the part to be monitored corresponding to the instruction in the part information;
and the monitoring module is used for monitoring the corresponding component according to the information of the component to be monitored.
Preferably, the method further comprises the following steps: for acquiring a bus to be scanned.
A second judging module: and the method is used for judging whether the component exists on the bus to be scanned, if so, acquiring the component information of the component, and if not, repeating the step until the component information of all the components is acquired.
Preferably, the storage module is further included: and the system is used for storing the information of the part to be monitored, which is required by monitoring the part, into a database.
Preferably, the method further comprises the step of: and the method is used for placing the information to be monitored into a linked list for sorting.
Preferably, the method further comprises a second obtaining module: for obtaining an ID packet for the component.
Preferably, the device further comprises a storage module: for storing component status information obtained by monitoring the component.
In order to solve the above technical problem, the present application further provides a component monitoring device, which includes:
a memory for storing a computer program;
a processor for implementing the steps of the component monitoring method as described above when executing the computer program.
In order to solve the above technical problem, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the component monitoring method as described above.
According to the component monitoring method, after the BMC is started, the component information of the component is detected, then the component information to be monitored corresponding to the instruction in the component information is called according to the instruction of the monitoring mode, and then the corresponding component is monitored according to the component information to be monitored. Compared with the prior art, the components needing to be monitored are positioned on different buses, so that the waste of resources is caused during monitoring, and the monitoring efficiency of other threads is influenced. By adopting the technical scheme, the component information is firstly detected, and after the instruction of the monitoring mode is obtained, the component to be monitored is monitored according to the component information to be monitored corresponding to the instruction in the component information, so that the data volume required when the component to be monitored is confirmed in the prior art is reduced, the waste of resources is reduced, and the monitoring efficiency is improved.
The component monitoring device and the medium provided by the application correspond to the component monitoring method, and the effect is the same as that of the component monitoring method.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a component monitoring method according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of another component monitoring method provided by an embodiment of the present application;
fig. 3 is a structural diagram of a component monitoring apparatus according to an embodiment of the present application;
fig. 4 is a block diagram of another component monitoring apparatus according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
With the continuous and continuous development of the IT industry, the application field of the current server is wider and wider, and the shadows of the server are seen everywhere from the Internet industry to the medicine industry, from government agencies to education and training industries and the like. The BMC serves as an independent embedded system in the server and provides functions and interfaces for server maintenance personnel, such as fault diagnosis, component monitoring, real-time monitoring of server running states, heat dissipation and the like. And the stable and normal operation of the related service in the server is ensured.
The component monitoring is mentioned, the updating speed of the types of the components related in the server industry is higher and higher at present, and the updating speed from RAID cards, GPUs to PSUs, CPLDs, FPGAs, MOC cards and the like is higher and higher. This requires that BMCs follow the needs of component development and monitoring, and the monitoring capabilities of new components are continually added. In the process of monitoring the component, the real-time requirement for monitoring the component is relatively high, particularly, the temperature, the service life and the health state of the component are monitored, the temperature relates to the heat dissipation processing of the component, the monitoring state relates to the running state of the component, the life monitoring relates to the updating of the component, when the number of monitored components in the BMC is increased, the monitoring is limited by the limit of the I2C bus speed and the like and the contradiction between the increase of the data quantity needing to be monitored, the reduction of the monitoring speed of the component is gradually caused, so that the real-time original temperature data cannot be provided for heat dissipation and the like, the heat dissipation of the component cannot be guaranteed, and the probability of damage of the component is increased. In order to solve the above technical problems, a currently commonly adopted technical solution is to monitor through different threads according to component types, for example, a RAID card monitoring thread mainly monitors relevant information of a RAID card. However, this method has the drawback that in a specific implementation, some items may distribute RAID cards on different I2C buses, which may cause that, when a RAID card is monitored, resources on all I2C buses are contended, and each item of information of a component is checked to identify the RAID card, resulting in waste of resources and also affecting monitoring efficiency of other threads.
The core of the application is to provide a component monitoring method, which is used for reducing the waste of resources and improving the monitoring efficiency when monitoring components.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings.
Fig. 1 is a flowchart of a component monitoring method according to an embodiment of the present application, and as shown in fig. 1, the method includes:
s10: detecting component information of the component, wherein the component information at least comprises component type information, component ID information and bus information where the component is located.
In step S10, when the BMC is started, the BMC detects the component on the device, including determining the presence information, the type information, the bus information, the address information, and the ID information of the corresponding component. In this embodiment, in order to reduce the coupling degree between each step in the present technical solution, the task of detecting the component information of the component may be performed by using a module separately divided in the processor, for example, a component detection module, which can acquire the component information of all the components and also integrate the obtained component information of each component. Specifically, in order to monitor the components through the command of the monitoring mode, the component information of each component may be integrated according to the component type information, the component ID information, the bus information where the component is located, the component address information, and the redundancy information. After the integration, the component information is sent to a database for saving, which may be a Remote Dictionary service (Redis) database management module in this embodiment. Of course, the component information may be stored in a manner that the Redis database management module classifies and stores the components according to the same component type or the bus where the same component is located.
S11: and acquiring an instruction of a monitoring mode, wherein the instruction of the monitoring mode comprises a bus monitoring mode, a type monitoring mode and an ID monitoring mode.
In an implementation, in order to monitor the critical components and prevent the waste of resources caused by monitoring the components that do not need to be monitored, in step S11, the processor obtains an instruction of a monitoring mode, which indicates which components need to be monitored. For example, if the command of the monitoring mode is a bus monitoring mode, specifically an I2C0 bus monitoring mode, a component with a bus of I2C0 can be monitored. If the instruction of the monitoring mode is the type monitoring mode, the monitoring can be performed on the components with the component types of PSU, RAID card and the like. In this embodiment, a user may set an instruction of a required monitoring mode through an Intelligent Platform Management Interface (IPMI), and select an appropriate monitoring mode according to a component to be monitored. It is understood that there may be a plurality of monitoring modes for a component, and the monitoring mode may be, for example, a bus monitoring mode, or a type monitoring mode, so that a user may only configure one monitoring mode at a time, and further, the processor only initiates monitoring in a corresponding manner according to the configured monitoring mode when starting to run.
S12: and calling the information of the part to be monitored corresponding to the instruction in the information of the part.
In step S12, the processor may call the information of the component to be monitored corresponding to the instruction in the component information, and specifically, the part for performing the step may be a component monitoring module of the processor, and the module may fetch the information of the component to be monitored corresponding to the instruction in the Redis database management module, so as to facilitate subsequent monitoring of the component. For example, the instruction is in an I2C0 bus monitoring mode, and the component monitoring module calls information of the component to be monitored, of which the bus where the component is located is an I2C0 bus, from the Redis database management module.
S13: and monitoring the corresponding component according to the information of the component to be monitored.
In step S13, in order to improve the efficiency of monitoring, different threads may be used for monitoring the components. The component monitoring module may initiate different threads according to the information of the component to be monitored, for example, if an instruction corresponding to the information of the component to be monitored is in a bus monitoring mode, an I2C0 component monitoring thread, an I2C1 component monitoring thread, and the like may be initiated, so as to monitor the component by using the component address information in the information of the component to be monitored.
According to the component monitoring method provided by the embodiment of the application, after the BMC is started, the component information of the component is detected, then the component information to be monitored corresponding to the instruction in the component information is called according to the instruction of the monitoring mode, and then the corresponding component is monitored according to the component information to be monitored. Compared with the prior art, the components needing to be monitored are positioned on different buses, so that the waste of resources is caused during monitoring, and the monitoring efficiency of other threads is influenced. By adopting the technical scheme, the component information is firstly detected, and after the instruction of the monitoring mode is obtained, the component to be monitored is monitored according to the component information to be monitored corresponding to the instruction in the component information, so that the data volume required when the component to be monitored is confirmed in the prior art is reduced, the waste of resources is reduced, and the monitoring efficiency is improved.
Fig. 2 is a flowchart of another component monitoring method according to an embodiment of the present application, and as shown in fig. 2, on the basis of the foregoing embodiment, in this embodiment, the component information of the detection component includes:
s100: and acquiring a bus to be scanned.
S101: and judging whether the components exist on the bus to be scanned, if so, entering the step S102, otherwise, repeating the step until the component information of all the components is obtained.
S102: component information of a component is acquired.
In this embodiment, the detection of the component information may be performed according to a bus where a component in the current server is located, and specifically, may be performed by scanning a slave address or asset information sent by the BIOS, and determining whether a component that needs to be monitored exists on a corresponding bus to be scanned. It can be understood that the components to be monitored are often distributed on different buses, if a component exists on a currently acquired bus to be scanned, the component information of the component is acquired, if the component does not exist, the next bus to be scanned is acquired, and the step is repeated until the component information of all the components is acquired.
According to the component monitoring method provided by the embodiment of the application, the bus in the server is scanned, so that the component detection module of the processor can acquire the component information of all the components.
In a specific implementation, the same component may be monitored in different monitoring modes, and after the processor calls the information of the component to be monitored of the component in the database to perform component monitoring once, instructions of other monitoring modes are executed, which easily results in missed monitoring of the component, or needs to redetect the component information of the component, resulting in waste of resources.
As shown in fig. 2, to solve the problem, on the basis of the above embodiment, in this embodiment, after the step of monitoring the corresponding component according to the information of the component to be monitored, the method further includes:
s14: and storing the information of the part to be monitored, which is required by the monitoring part, into a database.
According to the component monitoring method, after the component is monitored, the information of the component to be monitored, called by the monitoring component, is stored in the database again, specifically, the information is stored in the Redis database management module, and therefore the processor can conveniently execute other monitoring threads.
In a specific implementation, a plurality of components need to be monitored in a monitoring mode, if the monitoring sequence of the components is not limited, one component is easily monitored repeatedly, and other components are monitored only for a few times, which greatly affects the timeliness of component monitoring.
On the basis of the foregoing embodiment, in this embodiment, if the instruction of the monitoring mode is the bus monitoring mode or the type monitoring mode, before the step of monitoring the corresponding component according to the information of the component to be monitored, the method further includes:
putting information to be monitored into a linked list for sorting;
further, monitoring the corresponding component according to the information of the component to be monitored is as follows:
and monitoring the corresponding component according to the information of the component to be monitored and the sequence in the linked list.
The component monitoring method provided by the embodiment of the application realizes queuing of component monitoring through the characteristic of the first-in first-out queue of the linked list of the Redis database, and effectively ensures timeliness and fairness of monitoring of each component.
On the basis of the foregoing embodiment, in this embodiment, if the instruction of the monitoring mode is the ID monitoring mode, before the step of monitoring the corresponding component according to the information of the component to be monitored, the method further includes:
obtaining an ID group of a component;
putting the information of the part to be monitored into a corresponding ID group;
further, monitoring the corresponding component according to the information of the component to be monitored comprises:
and monitoring the corresponding parts according to the ID groups.
It can be understood that, in this embodiment, if the instruction of the monitoring mode is the device ID monitoring mode, it is also necessary to acquire an ID packet of the component, that is, which IDs are managed by one thread, and the packet is configured together when the user configures the instruction of the monitoring mode into the ID monitoring mode through the IPMI command. Before the step of monitoring the corresponding component according to the information of the component to be monitored, the equipment ID is taken out from the information of the component to be monitored, the information of the component to be monitored is written into the ID group configured by the command through an Ipush command according to the taken-out equipment ID, and when the component is monitored, the corresponding component is monitored according to the ID group.
According to the component monitoring method provided by the embodiment of the application, under the condition that the instruction of the monitoring mode is the ID monitoring mode, the components with the same ID are managed in a grouping mode, and the monitoring of the specific components is facilitated.
The component monitoring method provided by the embodiment realizes the monitoring of the component. On the basis of the above embodiment, in this embodiment, the method further includes:
and storing the component state information obtained by the monitoring component.
According to the component monitoring method, the component state information obtained by the monitoring component is stored, and the component state information can be conveniently traced when the component fails.
On the basis of the above embodiments, in the present embodiment, acquiring the bus to be scanned is to repeatedly acquire the bus to be scanned.
Compared with the prior art, the component monitoring method provided by the embodiment of the application can not realize hot plug processing of the component by statically acquiring the component information of the component. By adopting the technical scheme, the bus to be scanned is repeatedly acquired in the monitoring process of the component, and when the component is hot-plugged, the processor can timely detect the increase or decrease of the component, so that the number of threads monitored by the component is changed, the monitoring threads still work after the component is pulled out in the prior art, and the resource waste is caused.
In the above embodiments, the component monitoring method is described in detail, and the present application also provides embodiments corresponding to the component monitoring apparatus. It should be noted that the present application describes the embodiments of the apparatus portion from two perspectives, one from the perspective of the function module and the other from the perspective of the hardware.
Fig. 3 is a structural diagram of a component monitoring apparatus according to an embodiment of the present application, and as shown in fig. 3, the apparatus includes:
the detecting module 10 is configured to detect component information of a component, where the component information at least includes component type information, component ID information, and bus information where the component is located.
The obtaining module 11 is configured to obtain an instruction of a monitoring mode, where the instruction of the monitoring mode includes a bus monitoring mode, a type monitoring mode, and an ID monitoring mode.
And the calling module 12 is configured to call the information of the component to be monitored, which corresponds to the instruction, in the component information.
And the monitoring module 13 is used for monitoring the corresponding component according to the information of the component to be monitored.
The component monitoring device provided by the embodiment of the application detects component information of a component after BMC is started, calls component information to be monitored corresponding to an instruction in the component information according to the instruction of a monitoring mode, and monitors the corresponding component according to the component information to be monitored. Compared with the prior art, the components needing to be monitored are positioned on different buses, so that the waste of resources is caused during monitoring, and the monitoring efficiency of other threads is influenced. By adopting the technical scheme, the component information is firstly detected, and after the instruction of the monitoring mode is obtained, the component to be monitored is monitored according to the component information to be monitored corresponding to the instruction in the component information, so that the data volume required when the component to be monitored is confirmed in the prior art is reduced, the waste of resources is reduced, and the monitoring efficiency is improved.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
Those skilled in the art will appreciate that the configuration shown in FIG. 3 does not constitute a limitation of the component monitoring apparatus, and in some embodiments, the component monitoring apparatus may further comprise
A first obtaining module: for acquiring a bus to be scanned.
A second judging module: the method is used for judging whether the components exist on the bus to be scanned or not, if so, the component information of the components is obtained, and if not, the step is repeated until the component information of all the components is obtained.
A storage module: the monitoring system is used for storing the information of the parts to be monitored, which is needed by the monitoring parts, into the database.
A sorting module: and the method is used for placing the information to be monitored into a linked list for sorting.
A second obtaining module: for obtaining the ID packet of the component.
A storage module: for storing the component status information obtained by the monitoring component.
Fig. 4 is a block diagram of another component monitoring apparatus provided in an embodiment of the present application, and as shown in fig. 4, the apparatus includes: a memory 20 for storing a computer program;
a processor 21 for implementing the steps of the component monitoring method as described in the above embodiments when executing the computer program.
The component monitoring device provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, or a desktop computer.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a Graphics Processing Unit (GPU) which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 21 may further include an Artificial Intelligence (AI) processor for processing computational operations related to machine learning.
The memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing a computer program 201, wherein after being loaded and executed by the processor 21, the computer program can implement the relevant steps of the component monitoring method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among others, Windows, Unix, Linux, and the like. Data 203 may include, but is not limited to, component information, instructions for monitoring modes, ID packets, and the like.
In some embodiments, the component monitoring device may further include a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the configuration shown in FIG. 4 does not constitute a limitation of the component monitoring apparatus and may include more or fewer components than those shown.
The component monitoring device provided by the embodiment of the application comprises a memory and a processor, wherein when the processor executes a program stored in the memory, the following method can be realized:
detecting component information of a component, wherein the component information at least comprises component type information, component ID information and bus information where the component is located; acquiring a monitoring mode instruction, wherein the monitoring mode instruction comprises a bus monitoring mode, a type monitoring mode and an ID monitoring mode; calling the information of the part to be monitored corresponding to the instruction in the part information; and monitoring the corresponding component according to the information of the component to be monitored.
The component monitoring device provided by the embodiment of the application detects component information of a component after BMC is started, calls component information to be monitored corresponding to an instruction in the component information according to the instruction of a monitoring mode, and monitors the corresponding component according to the component information to be monitored. Compared with the prior art, the components needing to be monitored are positioned on different buses, so that the waste of resources is caused during monitoring, and the monitoring efficiency of other threads is influenced. By adopting the technical scheme, the component information is firstly detected, and after the instruction of the monitoring mode is obtained, the component to be monitored is monitored according to the component information to be monitored corresponding to the instruction in the component information, so that the data volume required when the component to be monitored is confirmed in the prior art is reduced, the waste of resources is reduced, and the monitoring efficiency is improved.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps as set forth in the above-mentioned method embodiments.
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods described in the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The computer-readable storage medium provided in the embodiment of the application detects component information of a component after the BMC is started, then calls component information to be monitored corresponding to an instruction in the component information according to the instruction of a monitoring mode, and monitors the corresponding component according to the component information to be monitored. Compared with the prior art, the components needing to be monitored are positioned on different buses, so that the waste of resources is caused during monitoring, and the monitoring efficiency of other threads is influenced. By adopting the technical scheme, the component information is firstly detected, and after the instruction of the monitoring mode is obtained, the component to be monitored is monitored according to the component information to be monitored corresponding to the instruction in the component information, so that the data volume required when the component to be monitored is confirmed in the prior art is reduced, the waste of resources is reduced, and the monitoring efficiency is improved.
The component monitoring method, device and medium provided by the present application are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method for monitoring a component, comprising:
detecting component information of a component, wherein the component information at least comprises component type information, component ID information and bus information where the component is located;
acquiring a monitoring mode instruction, wherein the monitoring mode instruction comprises a bus monitoring mode, a type monitoring mode and an ID monitoring mode;
calling the information of the part to be monitored corresponding to the instruction in the part information;
and monitoring the corresponding component according to the information of the component to be monitored.
2. The component monitoring method according to claim 1, wherein the component information of the detection component includes:
acquiring a bus to be scanned;
and judging whether the component exists on the bus to be scanned, if so, acquiring the component information of the component, otherwise, repeating the step until acquiring the component information of all the components.
3. The component monitoring method according to claim 2, further comprising, after the step of monitoring the corresponding component according to the component information to be monitored:
and storing the information of the part to be monitored, which is required by monitoring the part, into a database.
4. The component monitoring method according to claim 1, wherein if the instruction of the monitoring mode is a bus monitoring mode or a type monitoring mode, before the step of monitoring the corresponding component according to the information of the component to be monitored, further comprising:
putting the information to be monitored into a linked list for sorting;
further, the monitoring the corresponding component according to the information of the component to be monitored is as follows:
and monitoring the corresponding component according to the information of the component to be monitored and the sequence in the linked list.
5. The component monitoring method according to claim 1, wherein if the command of the monitoring mode is an ID monitoring mode, before the step of monitoring the corresponding component according to the information of the component to be monitored, further comprising:
acquiring an ID group of the component;
putting the information of the components to be monitored into the corresponding ID groups;
further, the monitoring the corresponding component according to the information of the component to be monitored includes:
and monitoring the corresponding parts according to the ID groups.
6. The component monitoring method according to any one of claims 1 to 5, further comprising:
and storing the component state information obtained by monitoring the component.
7. The component monitoring method according to claim 2, wherein the acquiring the bus to be scanned is repeatedly acquiring the bus to be scanned.
8. A component monitoring device, comprising:
the device comprises a detection module, a detection module and a control module, wherein the detection module is used for detecting component information of a component, and the component information at least comprises component type information, component ID information and bus information where the component is located;
the system comprises an acquisition module, a monitoring module and a control module, wherein the acquisition module is used for acquiring instructions of a monitoring mode, and the instructions of the monitoring mode comprise a bus monitoring mode, a type monitoring mode and an ID monitoring mode;
the calling module is used for calling the information of the part to be monitored corresponding to the instruction in the part information;
and the monitoring module is used for monitoring the corresponding component according to the information of the component to be monitored.
9. A component monitoring apparatus comprising a memory for storing a computer program;
a processor for implementing the steps of the component monitoring method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the component monitoring method according to any one of claims 1 to 7.
CN202111278706.0A 2021-10-31 2021-10-31 Component monitoring method, device and medium Pending CN114153684A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111278706.0A CN114153684A (en) 2021-10-31 2021-10-31 Component monitoring method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111278706.0A CN114153684A (en) 2021-10-31 2021-10-31 Component monitoring method, device and medium

Publications (1)

Publication Number Publication Date
CN114153684A true CN114153684A (en) 2022-03-08

Family

ID=80459507

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111278706.0A Pending CN114153684A (en) 2021-10-31 2021-10-31 Component monitoring method, device and medium

Country Status (1)

Country Link
CN (1) CN114153684A (en)

Similar Documents

Publication Publication Date Title
WO2021129367A1 (en) Method and apparatus for monitoring distributed storage system
CN110489306A (en) A kind of alarm threshold value determines method, apparatus, computer equipment and storage medium
CN111352921A (en) ELK-based slow query monitoring method and device, computer equipment and storage medium
WO2023115999A1 (en) Device state monitoring method, apparatus, and device, and computer-readable storage medium
CN112286709B (en) Diagnosis method, diagnosis device and diagnosis equipment for server hardware faults
CN108446199A (en) A kind of detection method and device using interim card
CN114328098B (en) Slow node detection method and device, electronic equipment and storage medium
CN109840141B (en) Thread control method and device based on cloud monitoring, electronic equipment and storage medium
CN115373835A (en) Task resource adjusting method and device for Flink cluster and electronic equipment
CN111694677A (en) Message queue management method, device, terminal and computer-readable storage medium
CN106020984B (en) Method and device for creating process in electronic equipment
CN115145769A (en) Intelligent network card and power supply method, device and medium thereof
CN109561134B (en) Electronic device, distributed cluster service distribution method and storage medium
CN111459629A (en) Azkaban-based project operation method and device and terminal equipment
CN111953569B (en) State information reporting method, device, equipment and medium
CN107479900B (en) Hot plug software scheme suitable for real-time operating system
CN116662039B (en) Industrial information parallel detection method, device and medium based on shared memory
CN108733536B (en) Monitoring management system and method
CN114153684A (en) Component monitoring method, device and medium
CN111625350A (en) Memory allocation method, device, equipment and storage medium for network message data
CN116401109A (en) Control method, device and medium of chassis management system
CN115630011A (en) Method and device for realizing I2C bus communication of master and slave equipment by using CPLD
CN116361106A (en) Log processing method and device, electronic equipment and storage medium
CN116016276A (en) Method and device for detecting health state of server
CN115756866A (en) Load balancing method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination