A method, device, equipment and storage medium for monitoring dynamic loading of a process
By detecting devices and starting the monitoring and management process through the kernel driver code of the baseboard management controller, the problem of BMC failing to detect dependent boot devices during startup is solved, realizing the flexibility and comprehensiveness of dynamic loading and monitoring and management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR BUSINESS MACHINE CO LTD
- Filing Date
- 2022-11-24
- Publication Date
- 2026-05-15
AI Technical Summary
BMC cannot detect devices that depend on it when it starts up, making monitoring and management difficult.
The system detects the presence of a device by using preset driver code in the kernel of the baseboard management controller, generates a hot-plug event, obtains device information, and starts the monitoring and management process.
It enables dynamic loading of monitoring processes when the BMC starts up, discovering and monitoring devices that depend on startup, avoiding the limitations of fixed configurations, and improving the flexibility and comprehensiveness of monitoring and management.
Smart Images

Figure CN115712542B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of server technology, and in particular to a method, apparatus, device, and storage medium for dynamically loading monitoring processes. Background Technology
[0002] The rapid development of the internet has also brought about a boom in the server market. The BMC (Baseboard Management Controller) plays a crucial role in monitoring and managing servers. During server device monitoring and management, some devices require power-on to display information, and some of these devices have drivers embedded in the BMC kernel. The kernel device tree configured in the BMC driver is only invoked and devices are discovered when the BMC starts up, but the server is often not yet powered on at that time. This presents a problem: the BMC cannot discover devices that depend on being powered on during startup. Summary of the Invention
[0003] In view of this, the purpose of this invention is to provide a method, apparatus, device, and storage medium for dynamically loading monitoring processes, capable of dynamically loading and monitoring management based on the actual devices on the current machine, without requiring a fixed BMC configuration. It relies on the actual device to start the monitoring service instead of relying on a configuration file. The specific solution is as follows:
[0004] Firstly, this application provides a method for dynamically loading monitoring processes, applied to a server, including:
[0005] The baseboard management controller is started, and the preset driver code located in the kernel of the baseboard management controller is used to detect whether there is a device in place. If there is, the kernel determines that the device in place is in a connected state and generates a corresponding hot-plug event.
[0006] If the kernel generates the hot-plug event, then obtain the device information of the in-situ device after initialization;
[0007] The monitoring and management process corresponding to the in-situ device is determined, and the monitoring and management process is started using the initialized device information so as to monitor the in-situ device using the monitoring and management process.
[0008] Optionally, before the start-up board management controller, it further includes:
[0009] Write driver code for various devices to be monitored, and complete the configuration operations for each device in the kernel device tree.
[0010] Optionally, after the start-up board management controller, it further includes:
[0011] Start a process that listens for the successful boot signal of the server;
[0012] Accordingly, the step of detecting the presence of an in-situ device using preset driver code located in the kernel of the baseboard management controller includes:
[0013] When a successful power-on signal of the server is detected, the system uses preset driver code located in the kernel of the baseboard management controller to detect whether a first type of in-situ device exists; the first type of in-situ device is a device that can only be discovered after the server is powered on.
[0014] Optionally, the step of detecting the presence of an in-situ device using preset driver code located in the kernel of the baseboard management controller includes:
[0015] The presence of a second type of in-situ device is detected using preset driver code located in the kernel of the baseboard management controller; the second type of in-situ device is a device that can be detected after the baseboard management controller is started and before the server is powered on.
[0016] Optionally, before obtaining the initialized device information of the in-situ device, the method further includes:
[0017] The in-situ device detected using the preset driver code is initialized to obtain the initialized device information of the in-situ device; the initialized device information includes device type, device location, and number of devices.
[0018] Optionally, determining the monitoring and management process corresponding to the in-situ device and starting the monitoring and management process using the initialized device information, so as to monitor the in-situ device using the monitoring and management process, includes:
[0019] The initialized device information is transmitted to the monitoring and management device, and the monitoring and management device starts the monitoring and management process of the in-situ device corresponding to the initialized device information, so as to monitor the in-situ device using the monitoring and management process.
[0020] Optionally, the step of transmitting the initialized device information to the monitoring and management device, and initiating the monitoring and management process of the in-situ device corresponding to the initialized device information through the monitoring and management device, includes:
[0021] The initialized device information is transmitted to the monitoring and management device, and the monitoring and management device starts the corresponding monitoring and management process according to the device type and the device location, so as to monitor the in-situ device using the monitoring and management process.
[0022] Secondly, this application provides a dynamic loading device for monitoring processes, applied to a server, including:
[0023] The device detection module is used to start the baseboard management controller and use the preset driver code located in the kernel of the baseboard management controller to detect whether there is a device in place. If there is, the kernel determines that the device in place is in a connected state and generates a corresponding hot-plug event.
[0024] The information acquisition module is used to acquire the device information of the in-situ device after initialization if the hot-plug event is detected by the kernel.
[0025] The monitoring startup module is used to determine the monitoring management process corresponding to the in-situ device, and to start the monitoring management process using the initialized device information, so as to monitor the in-situ device using the monitoring management process.
[0026] Thirdly, this application provides an electronic device, which includes a processor and a memory; wherein the memory is used to store a computer program, which is loaded and executed by the processor to implement the aforementioned dynamic loading method for monitoring processes.
[0027] Fourthly, this application provides a computer-readable storage medium, wherein the computer program, when executed by a processor, implements the aforementioned dynamic loading method for monitoring processes.
[0028] As can be seen from the above, when dynamically loading the monitoring process, this application first starts the baseboard management controller and uses the preset driver code in the kernel of the baseboard management controller to detect whether there is a device in place. If there is, the kernel determines that the device in place is in a connected state and generates a corresponding hot-plug event. If the kernel generates the hot-plug event, the device information of the device after initialization is obtained. The monitoring management process corresponding to the device in place is determined, and the monitoring management process is started using the device information after initialization, so as to monitor the device in place. It can be seen that this application discovers the device by using driver code and performs simple initialization on the device. If the device is discovered and successfully initialized, it will send a signal and wake up the monitoring management process according to the device actually identified by the driver. It can also discover devices that depend on booting and start different firmware monitoring processes according to the firmware type discovered by the driver code, thus dynamically realizing the loading and monitoring of the monitoring device. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0030] Figure 1 A flowchart of a dynamic loading method for monitoring processes provided in this application;
[0031] Figure 2 A timing diagram of a dynamic loading method for monitoring processes provided in this application;
[0032] Figure 3 A flowchart of a specific dynamic loading method for monitoring processes is provided in this application;
[0033] Figure 4 A flowchart of a specific dynamic loading method for monitoring processes is provided in this application;
[0034] Figure 5 This application provides a schematic diagram of the structure of a dynamic loading device for monitoring processes;
[0035] Figure 6 This application provides a structural diagram of an electronic device. Detailed Implementation
[0036] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0037] In existing technologies, the device type and address are fixed, and the system reads the information upon power-on. If the information cannot be read, the device is set to be out of place, and the configuration needs to be changed as needed. To solve the above problems, this application provides a method for dynamically loading monitoring processes. This method can dynamically discover devices through driver code, making user programs simpler. Users are not required to use a fixed configuration. After the kernel discovers the device and performs a simple initialization, the application starts the corresponding monitoring and management process based on the actual device.
[0038] See Figure 1 As shown, this embodiment of the invention discloses a method for dynamically loading monitoring processes, applied to a server, including:
[0039] Step S11: Start the baseboard management controller and use the preset driver code in the kernel of the baseboard management controller to detect whether there is a device in place. If there is, the kernel determines that the device in place is in a connected state and generates a corresponding hot-plug event.
[0040] In this embodiment, before starting the Baseboard Management Controller (BMC), driver code needs to be written for the devices monitored by the BMC. Then, the BMC is started. After the BMC starts, the preset driver code located in the kernel of the BMC is used to detect whether there are any devices currently in place. Figure 2 As shown, the kernel boots up and recognizes the device connection, generating a hot-plug event.
[0041] Step S12: If the kernel generates the hot-plug event, then obtain the device information of the in-situ device after initialization.
[0042] In this embodiment, if the kernel generates a hot-plug event, it indicates that the device has been discovered, and the initialized device information of the in-situ device is obtained. It should be noted that when the kernel discovers a device, it performs a simple initialization. The kernel driver may be a full-featured driver. After simple initialization, the application will know what kind of device it is and how many specific interfaces it has, thus enabling precise monitoring of the discovered device's specific information.
[0043] Step S13: Determine the monitoring and management process corresponding to the in-situ device, and start the monitoring and management process using the initialized device information, so as to monitor the in-situ device using the monitoring and management process.
[0044] In this embodiment, the monitoring and management process corresponding to the in-situ device is accurately determined by obtaining the device information after initialization. For example, after a hard drive backplane is discovered, the monitoring process for the hard drive backplane is started based on the discovered hard drive backplane model. If a 12-drive front backplane is discovered, the backplane monitoring process is started to transmit the necessary information, such as the 12 drives and the front backplane information, to the hard drive monitoring and management process, achieving flexible dynamic loading instead of hardcoding certain parameters. The traditional method is top-down. In a specific embodiment, the traditional method involves fixing the type and location of a machine, starting the monitoring and management process, waiting for boot, and then retrieving the hard drive backplane information of the fixed location and type. If it cannot be read, it is set to not be in place. The hard drive backplane driver code may support three types of hard drive backplanes, and a machine model may be equipped with two types of hard drive backplanes. Changing the backplane requires changing the configuration. The approach provided in this application is bottom-up, using the dynamic loading method proposed in this invention. The device only needs to be fully configured. After powering on, the driver code discovers the device, performs simple initialization, and if the device is discovered and successfully initialized, it will send a signal and wake up the monitoring and management process based on the device actually identified by the driver. This is different from the monitoring and management process starting first, waiting for power-on, and then fixedly reading data.
[0045] As can be seen from the above, when dynamically loading the monitoring process, this application first starts the baseboard management controller and uses the preset driver code in the kernel of the baseboard management controller to detect whether there is a device in place. If there is, the kernel determines that the device in place is in a connected state and generates a corresponding hot-plug event. If the kernel generates the hot-plug event, the device information of the device after initialization is obtained. The monitoring management process corresponding to the device in place is determined, and the monitoring management process is started using the device information after initialization, so as to monitor the device in place. It can be seen that this application discovers the device by using driver code and performs simple initialization on the device. If the device is discovered and successfully initialized, it will send a signal and wake up the monitoring management process according to the device actually identified by the driver. It can also discover devices that depend on booting and start different firmware monitoring processes according to the firmware type discovered by the driver code, thus dynamically realizing the loading and monitoring of the monitoring device.
[0046] As can be seen from the above embodiments, this application discovers devices by using driver code and starts different firmware monitoring processes according to the firmware type discovered by the driver code, thereby dynamically realizing the loading and monitoring of the monitoring device. The device discovery process will be described in detail below.
[0047] See Figure 3 As shown, this embodiment of the invention discloses a specific method for dynamically loading monitoring processes, applied to a server, including:
[0048] Step S21: Write driver code for various devices to be monitored, and complete the configuration operations for various devices to be monitored in the kernel device tree.
[0049] In this embodiment, during the monitoring and management of server devices, the devices have drivers in the BMC kernel, and the kernel device tree is configured in the BMC drivers. Therefore, programs are first written for the devices that need to be monitored and stored in the BMC kernel, so that these driver codes can be called to discover the devices during monitoring. The kernel device tree is then configured with the maximum possible configuration. For example, a hard disk backplane might be configured on bus1-channel0-7, meaning the model is fully configured. When the backplane is replaced, the configuration does not need to be changed again. It can be understood that the server BMC can use the maximum configuration to write code during development, and different models can be flashed with the same firmware.
[0050] Step S22: Start the baseboard management controller.
[0051] Step S23: Use the preset driver code located in the kernel of the baseboard management controller to detect whether there is a second type of in-situ device; the second type of in-situ device is a device that can be discovered after the baseboard management controller is started and before the server is powered on.
[0052] In this embodiment, upon startup of the baseboard management controller, the system first uses preset driver code located in the kernel of the baseboard management controller to detect whether a device is present. These devices do not require the server to be powered on to display information; they can be detected before the server is powered on. That is, the second type of present devices are those that can be detected after the baseboard management controller starts up but before the server is powered on. It should be noted that when the kernel detects a device, it performs a simple initialization. After the simple initialization, the application will know what kind of device it is and how many specific interfaces it has.
[0053] Step S24: Start the process that listens for the successful power-on signal of the server.
[0054] Step S25: When the successful power-on signal of the server is detected, the preset driver code located in the kernel of the baseboard management controller is used to detect whether there is a first type of in-situ device; the first type of in-situ device is a device that can only be discovered after the server is powered on.
[0055] In this embodiment, after the BMC starts, the device driver in the kernel is used to detect whether the device is present. This is the first detection, which can detect devices that can be discovered after the baseboard management controller starts but before the server is powered on. Then, a process that listens for the power-on signal is started. After successful power-on is detected, the kernel driver is used again to detect the device. This is the second detection, which can use the preset driver code located in the kernel of the baseboard management controller to detect whether there is a first type of present device. The first type of present device is a device that can only be discovered after the server is powered on. In this way, all devices, including those that require power-on to display information, can be detected.
[0056] Step S26: If it exists, the kernel determines that the in-situ device is in a connected state and generates a corresponding hot-plug event.
[0057] As can be seen from the above, this application, after the BMC starts up, first uses the preset driver code in the kernel of the baseboard management controller to detect whether there is a second type of in-situ device. Then, after listening to the signal of successful boot, it uses the preset driver code in the kernel of the baseboard management controller to detect whether there is a first type of in-situ device. In this way, it can fully detect all devices and will not miss devices that depend on the server to boot up.
[0058] See Figure 4 As shown, this embodiment of the invention discloses a specific method for dynamically loading monitoring processes, applied to a server, including:
[0059] Step S31: Start the baseboard management controller and use the preset driver code in the kernel of the baseboard management controller to detect whether there is a device in place. If there is, the kernel determines that the device in place is in a connected state and generates a corresponding hot-plug event.
[0060] Step S32: Initialize the in-situ device detected by the preset driver code to obtain the initialized device information of the in-situ device; the initialized device information includes device type, device location and number of devices.
[0061] In this embodiment, when the preset driver code in the kernel is used to detect the device, the device will be simply initialized to obtain the device information of the in-situ device after initialization, wherein the device information includes the device type, device location and number of devices.
[0062] Step S33: If the kernel generates the hot-plug event, then obtain the device information of the in-situ device after initialization.
[0063] In this embodiment, if the kernel generates the hot-plug event, it means that the device has been discovered. If the device has been successfully initialized, the device information after initialization of the in-situ device is obtained. The device information after initialization includes the device type, device location, and number of devices.
[0064] Step S34: Transmit the initialized device information to the monitoring and management device, and start the monitoring and management process of the in-situ device corresponding to the initialized device information through the monitoring and management device, so as to monitor the in-situ device using the monitoring and management process.
[0065] In this embodiment, the initialized device information is transmitted to the monitoring and management device, which then initiates the corresponding monitoring and management process based on the device type and location to monitor the in-situ device. In traditional solutions, the monitoring and management process starts the front backplane (fixed 12 disks) and rear backplane (fixed 4 disks) monitoring processes after the BMC is started. If the server is currently powered on, monitoring and management are performed. This method relies on configuration files to initiate the corresponding monitoring and management process, which is inflexible and lacks comprehensive device monitoring. The dynamic loading monitoring method provided in this application enables the initiation of the corresponding monitoring and management process based on the actual device, achieving flexible dynamic loading without hardcoding parameters.
[0066] As can be seen from the above, this application uses driver code to discover devices. After simple initialization, if the device is discovered and successfully initialized, it will send a signal and wake up the monitoring and management process based on the actual device identified by the driver. This is different from the monitoring and management process starting first, waiting indefinitely for boot, and then fixedly reading data. It can start different firmware monitoring processes based on the firmware type discovered by the driver, dynamically realizing the loading and monitoring of the monitored device, without requiring fixed BMC configuration. It relies on the actual device to start the monitoring service instead of relying on a configuration file.
[0067] See Figure 5 As shown, this embodiment of the invention discloses a dynamic loading device for monitoring processes, applied to a server, comprising:
[0068] The device detection module 11 is used to start the baseboard management controller and use the preset driver code located in the kernel of the baseboard management controller to detect whether there is a device in place. If there is, the kernel determines that the device in place is in a connected state and generates a corresponding hot-plug event.
[0069] The information acquisition module 12 is used to acquire the device information of the in-situ device after initialization if the hot-plug event is detected by the kernel.
[0070] The monitoring startup module 13 is used to determine the monitoring management process corresponding to the in-situ device, and to start the monitoring management process using the initialized device information, so as to monitor the in-situ device using the monitoring management process.
[0071] As can be seen from the above, when dynamically loading the monitoring process, this application first starts the baseboard management controller and uses the preset driver code in the kernel of the baseboard management controller to detect whether there is a device in place. If there is, the kernel determines that the device in place is in a connected state and generates a corresponding hot-plug event. If the kernel generates the hot-plug event, the device information of the device after initialization is obtained. The monitoring management process corresponding to the device in place is determined, and the monitoring management process is started using the device information after initialization, so as to monitor the device in place. It can be seen that this application discovers the device by using driver code and performs simple initialization on the device. If the device is discovered and successfully initialized, it will send a signal and wake up the monitoring management process according to the device actually identified by the driver. It can also discover devices that depend on booting and start different firmware monitoring processes according to the firmware type discovered by the driver code, thus dynamically realizing the loading and monitoring of the monitoring device.
[0072] In some specific embodiments, the device detection module 11 may specifically include:
[0073] The code writing unit is used to write driver code for various devices to be monitored and to complete the configuration operations for various devices to be monitored in the kernel device tree.
[0074] In some specific embodiments, the device detection module 11 may specifically include:
[0075] A process monitoring unit is used to start a process that listens for the successful startup signal of the server;
[0076] The first device detection unit is used to detect whether a first type of in-situ device exists by using preset driver code located in the kernel of the baseboard management controller when a successful power-on signal of the server is detected; the first type of in-situ device is a device that can only be discovered after the server is powered on.
[0077] The second device detection unit is used to detect whether a second type of in-situ device exists using preset driver code located in the kernel of the baseboard management controller; the second type of in-situ device is a device that can be detected after the baseboard management controller is started and before the server is powered on.
[0078] In some specific embodiments, the information acquisition module 12 may specifically include:
[0079] The device initialization unit is used to initialize the in-situ device detected by the preset driver code to obtain the initialized device information of the in-situ device; the initialized device information includes device type, device location and number of devices.
[0080] In some specific embodiments, the monitoring startup module 13 may specifically include:
[0081] The information transmission unit is used to transmit the initialized device information to the monitoring and management device, and to start the monitoring and management process of the in-situ device corresponding to the initialized device information through the monitoring and management device, so as to monitor the in-situ device using the monitoring and management process.
[0082] In some specific embodiments, the monitoring startup module 13 may specifically include:
[0083] The monitoring process initiation unit is used to transmit the initialized device information to the monitoring and management device, and to start the corresponding monitoring and management process through the monitoring and management device according to the device type and the device location, so as to use the monitoring and management process to monitor the in-situ device.
[0084] Furthermore, embodiments of this application also disclose an electronic device, Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0085] Figure 6 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the dynamic loading method for monitoring processes disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0086] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0087] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0088] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the monitoring process dynamic loading method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.
[0089] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned dynamic loading method for monitoring processes. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0090] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0091] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0092] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0093] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0094] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for dynamically loading monitoring processes, characterized in that, Applied to servers, including: The baseboard management controller is started, and the preset driver code located in the kernel of the baseboard management controller is used to detect whether there is a device in place. If there is, the kernel determines that the device in place is in a connected state and generates a corresponding hot-plug event. If the kernel generates the hot-plug event, then obtain the device information of the in-situ device after initialization; The monitoring and management process corresponding to the in-situ device is determined, and the monitoring and management process is started using the initialized device information so as to monitor the in-situ device using the monitoring and management process; Following the startup board management controller, it also includes: Start a process that listens for the successful boot signal of the server; Accordingly, the step of detecting the presence of an in-situ device using preset driver code located in the kernel of the baseboard management controller includes: When a successful power-on signal of the server is detected, the preset driver code located in the kernel of the baseboard management controller is used to detect whether there is a first type of in-situ device; the first type of in-situ device is a device that can only be discovered after the server is powered on. The method of detecting the presence of an in-situ device using preset driver code located in the kernel of the baseboard management controller includes: The presence of a second type of in-situ device is detected using preset driver code located in the kernel of the baseboard management controller; the second type of in-situ device is a device that can be detected after the baseboard management controller is started and before the server is powered on.
2. The dynamic loading method for monitoring processes according to claim 1, characterized in that, Prior to the startup board management controller, it also includes: Write driver code for various devices to be monitored, and complete the configuration operations for each device in the kernel device tree.
3. The dynamic loading method for monitoring processes according to claim 1, characterized in that, Before obtaining the initialized device information of the in-situ device, the method further includes: The in-situ device detected using the preset driver code is initialized to obtain the initialized device information of the in-situ device; the initialized device information includes device type, device location, and number of devices.
4. The dynamic loading method for monitoring processes according to claim 3, characterized in that, The step of determining the monitoring and management process corresponding to the in-situ device and starting the monitoring and management process using the initialized device information, so as to monitor the in-situ device using the monitoring and management process, includes: The initialized device information is transmitted to the monitoring and management device, and the monitoring and management device starts the monitoring and management process of the in-situ device corresponding to the initialized device information, so as to monitor the in-situ device using the monitoring and management process.
5. The dynamic loading method for monitoring processes according to claim 4, characterized in that, The step of transmitting the initialized device information to the monitoring and management device, and initiating the monitoring and management process of the in-situ device corresponding to the initialized device information through the monitoring and management device, includes: The initialized device information is transmitted to the monitoring and management device, and the monitoring and management device starts the corresponding monitoring and management process according to the device type and the device location, so as to monitor the in-situ device using the monitoring and management process.
6. A dynamic loading device for monitoring processes, characterized in that, Applied to servers, including: The device detection module is used to start the baseboard management controller and use the preset driver code located in the kernel of the baseboard management controller to detect whether there is a device in place. If there is, the kernel determines that the device in place is in a connected state and generates a corresponding hot-plug event. The information acquisition module is used to acquire the device information of the in-situ device after initialization if the hot-plug event is detected by the kernel. The monitoring startup module is used to determine the monitoring management process corresponding to the in-situ device, and to start the monitoring management process using the initialized device information, so as to monitor the in-situ device using the monitoring management process; The device is also used to initiate a process for listening to the successful power-on signal of the server; The device detection module is used to detect whether a first type of in-situ device exists when a successful power-on signal of the server is detected, using preset driver code located in the kernel of the baseboard management controller; the first type of in-situ device is a device that can only be discovered after the server is powered on; and to detect whether a second type of in-situ device exists using preset driver code located in the kernel of the baseboard management controller; the second type of in-situ device is a device that can be discovered after the baseboard management controller is started and before the server is powered on.
7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the dynamic loading method for monitoring processes as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, Used to store computer programs, which, when executed by a processor, implement the dynamic loading method for monitoring processes as described in any one of claims 1 to 5.