Component routing method, storage medium, electronic device, and computer program product
By using multiple I2C routing conversion methods in the substrate management controller, the components are routed to other I2Cs other than the first I2C, which solves the address conflict problem of BMC during monitoring and management, and realizes the mutual connection of component addresses Different and load balancing improves the flexibility and stability of the system.
Patent Information
- Application Number
- CN202410959022.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-07-17
AI Technical Summary
When monitoring and managing server components, the baseboard management controller (BMC) cannot effectively avoid component address conflicts. The existing solutions have problems such as insufficient flexibility and high R&D costs.
The routing conversion method of multiple integrated circuit bus I2C is adopted, and the components are routed to other I2Cs except the first I2C through the routing conversion control process, so that the components addresses on each I2C are different, and the routing conversion algorithm and configuration are used. File determines component routing relationships and load balancing.
It effectively avoids component address conflicts, improves the access efficiency of the I2C bus, reduces R&D costs, and improves compatibility with newly developed chips and components, enhancing the flexibility and stability of the system.
Smart Images

Figure CN118503054B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of server monitoring, and more specifically, to a routing method for a component, a storage medium, an electronic device, and a computer program product. Background Art
[0002] With the continuous development of servers, the requirements for server management functions are getting higher and higher. Not only is it necessary to support the monitoring functions of various sensors in the server, but also a series of functions such as fan control, asset information acquisition and display, fault diagnosis and analysis and positioning. Among them, the management and monitoring functions of the baseboard management controller (Baseboard Management Controller, referred to as BMC) for the server are mainly realized through the integrated circuit bus (Inter-Integrated Circuit, referred to as I2C).
[0003] When the BMC monitors and manages various components such as temperature sensors, voltage sensors, graphics processing units (GPUs), and power supply units (PSUs) through the I2C bus, each component must have a unique address on the bus so that the BMC can correctly identify and communicate. Therefore, when designing and configuring the I2C bus, it is necessary to ensure that the address of each component is not repeated to avoid address conflicts.
[0004] In the related art, one solution is to design components with the same address to different I2C buses or channels of different switching chips of the same I2C bus. During monitoring, only one channel of the switching chip is opened to avoid address conflicts during an access. However, this solution requires that all I2C bus address conflicts be considered in advance when designing the BMC. In actual use, once an unconsidered situation is encountered, it lacks the ability to respond flexibly. At the same time, the I2C bus itself has a limited address and is prone to incompatibility with some newly developed chips or components, resulting in low access efficiency of the I2C bus. Another solution is to design different motherboards for compatibility with machines with different shipping configurations. This solution has high flexibility, but also brings huge R&D costs and poor economic benefits.
[0005] Regarding the related technologies, when the BMC monitors and manages various components, it is unable to effectively avoid the problem of component address conflicts, and currently no effective solution has been proposed. Summary of the invention
[0006] The embodiments of the present application provide a component routing method, a storage medium, an electronic device, and a computer program product to at least solve the problem that the BMC cannot effectively avoid component address conflicts when monitoring and managing each component.
[0007] According to an embodiment of the present application, a component routing method is provided, wherein a baseboard management controller BMC has N integrated circuit buses I2C, the N I2Cs are connected to a routing converter, the routing converter is connected to M components, the M components are components to be monitored in a server, N is a positive integer greater than or equal to 3, and M is a positive integer greater than or equal to 2, comprising: through a routing conversion control process in the BMC, using the first I2C of the N I2Cs to determine the M components connected to the routing converter; routing the M components to N-1 I2Cs, so that the addresses of each component in a group of components connected to each I2C of the N-1 I2Cs are different from each other, wherein the N-1 I2Cs are the N-1 I2Cs of the N I2Cs except the first I2C.
[0008] In an exemplary embodiment, the M components include P fixed components and K dynamic components, K+P=M, the fixed components are components fixed on the mainboard of the server, and the dynamic components are components dynamically configured in the server, and the routing of the M components to N-1 I2Cs includes: determining whether to enable a routing conversion function of the fixed component, wherein when the routing conversion function of the fixed component is enabled, the fixed component is allowed to be routed to different I2Cs; when the routing conversion function of the fixed component is not enabled, the fixed component is routed to different I2Cs according to a preset routing relationship. P fixed components are routed to Q I2Cs, and the K dynamic components are routed to D I2Cs based on a routing conversion algorithm, wherein the preset routing relationship is used to indicate the fixed components connected to each I2C on the Q I2Cs, and the routing conversion algorithm is used to route multiple components to multiple I2Cs so that the addresses of each component in a group of components connected to each I2C in the multiple I2Cs are different, Q+D=N-1; and / or when the routing conversion function of the fixed components is turned on, the M components are routed to N-1 I2Cs based on the routing conversion algorithm.
[0009] In an exemplary embodiment, the determining whether to enable the routing conversion function of the fixed component includes: obtaining the parameter value of the configuration parameter from the configuration file through the routing conversion control process; when the parameter value of the configuration parameter is a first value, determining to enable the routing conversion function of the fixed component; when the parameter value of the configuration parameter is a second value, determining not to enable the routing conversion function of the fixed component.
[0010] In an exemplary embodiment, the method further includes: determining the route conversion algorithm from a configuration file through the route conversion control process; and determining the preset route relationship from the configuration file when it is determined that the route conversion function of the fixed component is not enabled.
[0011] In an exemplary embodiment, the routing conversion algorithm is also used to route multiple components to multiple I2Cs so that the variance of the loads of the multiple I2Cs is less than a preset threshold. The routing conversion algorithm-based routing of the K dynamic components to D I2Cs includes: determining the load value of each of the K dynamic components; routing the K dynamic components to D I2Cs based on the load value of each dynamic component, so that the addresses of each component in a group of components connected to each of the D I2Cs are different, and the variance of the loads of the D I2Cs is less than the preset threshold, wherein the load of an I2C is equal to the sum of the load values of the multiple components connected to the I2C.
[0012] In an exemplary embodiment, determining the load value of each dynamic component among the K dynamic components includes: determining the load value of the kth dynamic component among the K dynamic components in the following manner to determine the load value of each dynamic component among the K dynamic components, wherein k is a positive integer greater than or equal to 1 and less than or equal to K: determining A monitoring information points corresponding to the kth dynamic component, A monitoring frequencies of the A monitoring information points, and A timelinesses of the A monitoring information points; determining the load value of the kth dynamic component based on the A monitoring information points, the A monitoring frequencies, and the A timelinesses.
[0013] In an exemplary embodiment, determining the load value of the kth dynamic component based on the A monitoring information points, the A monitoring frequencies, and the A timelinesses includes: determining a first value based on the number of the A monitoring information points, and determining a second value based on the A monitoring frequencies, and determining a third value based on the A timelinesses; determining the load value of the kth dynamic component based on the first value, the second value, and the third value.
[0014] In an exemplary embodiment, determining the second value based on the A monitoring frequencies includes: determining an average monitoring frequency of the A monitoring frequencies; determining the second value based on the average monitoring frequency; determining the third value based on the A timelinesses includes: determining a reference value corresponding to each of the A timelinesses to obtain A reference values; and determining the average value of the A reference values as the third value.
[0015] In an exemplary embodiment, after routing the K dynamic components to D I2Cs based on a routing conversion algorithm, the method further includes: when it is detected that the routing converter is connected to a target component and the M components do not include the target component, routing the target component to a target I2C, wherein the target I2C is the I2C with the smallest load among the D I2Cs.
[0016] In an exemplary embodiment, the determining, through the routing conversion control process in the BMC, the M components connected to the routing converter using the first I2C of the N I2Cs includes: sending a first instruction to the routing converter using the first I2C through the routing conversion control process; and obtaining component information of the M components sent by the routing converter in response to the first instruction.
[0017] In an exemplary embodiment, after routing the M components to N-1 I2Cs, the method further includes: using the first I2C to send a second instruction to the routing converter through the routing conversion control process, wherein the second instruction is used to indicate the routing relationship between each of the M components of the routing converter and the N-1 I2Cs.
[0018] In an exemplary embodiment, after routing the M components to N-1 I2Cs, the method further includes: monitoring the B components connected to the ith I2C through the ith monitoring thread corresponding to the ith I2C among the N-1 I2Cs, where B is a positive integer greater than or equal to 1; storing the monitoring data of the jth component among the B components monitored to the jth resource pool through the ith monitoring thread, wherein the jth resource pool is a resource pool in the monitoring information point resource pool corresponding to the jth component, and the monitoring information point resource pool is used to store the monitoring data of the M components monitored.
[0019] In an exemplary embodiment, the monitoring of B components connected to the ith I2C through the ith monitoring thread corresponding to the ith I2C among the N-1 I2Cs includes: monitoring the jth component among the B components in the following manner to monitor the B components: determining the device type of the jth component through the ith monitoring thread, and determining a monitoring protocol for monitoring the jth component based on the device type; monitoring the jth component through the ith monitoring thread according to the monitoring protocol.
[0020] In an exemplary embodiment, storing the monitoring data of the jth component among the B components monitored by the i-th monitoring thread to the j-th resource pool includes: determining an interaction protocol for the monitoring thread to interact with the monitoring information point resource pool, wherein the monitoring thread includes the i-th monitoring thread; and storing the monitoring data of the j-th component to the j-th resource pool according to the interaction protocol through the i-th monitoring thread.
[0021] According to another embodiment of the embodiment of the present application, a routing device for a component is also provided, including: a determination module, used to determine the M components connected to the routing converter using the first I2C of the N I2Cs through the routing conversion control process in the BMC; a routing module, used to route the M components to N-1 I2Cs, so that the addresses of each component in a group of components connected to each I2C of the N-1 I2Cs are different from each other, wherein the N-1 I2Cs are the N-1 I2Cs of the N I2Cs except the first I2C.
[0022] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0023] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0024] According to another embodiment of the present application, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0025] The present application uses the first I2C of multiple I2Cs to determine multiple components connected to the routing converter through the routing conversion control process in the BMC, and routes the determined multiple components to I2Cs other than the first I2C, so that the address of each component in a group of components connected to each I2C is different, which solves the problem that the BMC cannot effectively avoid component address conflicts when monitoring and managing each component. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0027] Figure 1 It is a hardware structure block diagram of a server device of a component routing method according to an embodiment of the present application;
[0028] Figure 2 is a flow chart of a routing method of a component according to an embodiment of the present application;
[0029] Figure 3 is a schematic diagram of an optional hardware link design according to an embodiment of the present application;
[0030] Figure 4 is a schematic diagram of an optional BMC software system monitoring design according to an embodiment of the present application;
[0031] Figure 5 is a flowchart of the processing logic of a router control process according to an embodiment of the present application;
[0032] Figure 6 is an optional specific processing logic flow chart according to an embodiment of the present application;
[0033] Figure 7 is a structural block diagram of a routing device of a component according to an embodiment of the present application;
[0034] Figure 8 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0035] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0037] The routing method embodiment of the component provided in the embodiment of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a routing method of a component in an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0038] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the routing methods of components in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, that is, to implement the above-mentioned method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0039] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0040] It should be noted that when the BMC monitors and manages various components such as temperature sensors, voltage sensors, graphics processing units (GPUs), and power supply units (PSUs) through I2C, each component must have a unique address on the bus so that the BMC can correctly identify and communicate. Therefore, when designing and configuring I2C, it is necessary to ensure that the address of each component is not repeated to avoid address conflicts.
[0041] In the related art, the following two solutions are generally adopted:
[0042] Solution 1: Isolate the conflicting addresses of I2C by connecting switching chips such as PCA9548 / PCA9546 under I2C. This solution designs components with the same address to different I2Cs or different PCA9548 channels of the same I2C. When the BMC is monitoring, only one channel of PCA9548 is opened, and the other channels are closed to avoid the possibility of address conflicts during an I2C access.
[0043] However, the disadvantages of solution 1 are as follows:
[0044] 1. Solution 1 requires that the server motherboard must fully consider the situation of avoiding I2C address conflicts in the initial stage of design, and uniformly plan the address layout under each I2C bus. However, it is impossible to fully foresee certain situations during the design stage. Once the application scenarios and components that were not considered are encountered after mass production, they cannot be flexibly responded to;
[0045] 2. Components and chips supporting I2C are emerging in the server field in an endless stream, and the I2C address range specified by the protocol is only 0~128. Therefore, when the same server uses different shipping configurations, especially when various components and chips are continuously introduced during the product generation process, some newly developed and produced chips and components will be incompatible;
[0046] 3. BMC is a multi-process and multi-threaded operation model with an operating system and process scheduling mechanism. In this case, when different components under the same bus belong to different processes or threads, multiple processes and threads will compete for the same I2C. At this time, PCA9548 can only be prevented from being competed by other processes or threads by locking. However, the result of the locking operation is that the access efficiency of I2C is too low, and the monitoring information of the server, especially sensitive information such as temperature, is not updated in time, affecting the normal operation of key services such as heat dissipation.
[0047] Solution 2: Design different motherboards for compatibility with machines with different shipping configurations.
[0048] However, the second solution has the following disadvantages: the R&D cost is extremely high, and the motherboards and boards between different server models are not compatible, which also brings great pressure to production.
[0049] In order to solve the above problems, this embodiment provides a routing method for a component, including but not limited to being applied to a baseboard management controller BMC, such as Figure 3As shown, the BMC has N integrated circuit buses I2C, the N I2Cs are connected to a routing switch, the routing switch is connected to M components, the M components are components to be monitored in the server, N is a positive integer greater than or equal to 3, M is a positive integer greater than or equal to 2, as shown in FIG. Figure 2 As shown, the process includes the following steps S202-S204:
[0050] Step S202: determining the M components connected to the routing converter using the first I2C of the N I2Cs through the routing conversion control process in the BMC;
[0051] Alternatively, if Figure 3 As shown, the BMC has N integrated circuit buses I2C, and the first of the N I2Cs (for example Figure 3 I2C-0) is designed as a routing management bus, and the other N-1 I2Cs (such as Figure 3 In the figure, I2C-1 to I2C-n, where n is 15) are used as the bus for server monitoring and management components. Optionally, I2C-1 and I2C-2 are connected to the mainboard fixed components through a routing converter. I2C-3 to I2C-15 interact with dynamic components as BMC. BMC is a device that can actively initiate communication and control other devices to achieve monitoring functions.
[0052] It should be noted that each I2C is connected to a routing converter, which can implement the routing conversion function of the I2C link through logic devices such as a complex programmable logic device (CPLD) or a field programmable gate array (FPGA).
[0053] Alternatively, if Figure 3 As shown, the M components are the I2C slave devices monitored by the BMC in the figure, including but not limited to: mainboard CPLD, PSU, GPU, temperature sensor, voltage sensor, power consumption sensor, redundant array of independent disks (Redundant Array of Independent Disks, referred to as Raid), network card and other monitoring components.
[0054] Step S204: Routing the M components to N-1 I2Cs, so that the addresses of each component in a group of components connected to each of the N-1 I2Cs are different, wherein the N-1 I2Cs are the N-1 I2Cs in the N I2Cs except the first I2C.
[0055] It should be noted that a group of components connected to the I2C includes multiple components routed to the I2C.
[0056] It should be noted that the M components are routed to the I2C except the routing management bus, so that the addresses of each component in a group of components connected to each I2C except the routing management bus are different, thereby avoiding the problem of address conflict on the I2C.
[0057] In the above steps, through the routing conversion control process in the BMC, the first I2C of the multiple I2Cs is used to determine the multiple components connected to the routing converter, and the determined multiple components are routed to the I2Cs other than the first I2C, so that the addresses of each component in a group of components connected to each I2C are different from each other, which solves the problem that the BMC cannot effectively avoid component address conflicts when monitoring and managing the components.
[0058] In an exemplary embodiment, the M components include P fixed components and K dynamic components, K+P=M, the fixed components are components fixed on the mainboard of the server, and the dynamic components are components dynamically configured in the server. The above step S204 includes the following steps S11 to S12, or steps S11 and S13, or steps S11 to S13:
[0059] Step S11: determining whether to enable the routing conversion function of the fixed component, wherein, when the routing conversion function of the fixed component is enabled, the fixed component is allowed to be routed to different I2Cs;
[0060] Optionally, assuming that the preset routing relationship is that fixed component 1 is routed to I2C-1 and fixed component 2 is routed to I2C-2, after the routing conversion function of the fixed component is enabled, fixed component 1 can be routed to I2C-3 and fixed component 2 can be routed to I2C-4; fixed component 1 can also be routed to I2C-5 and fixed component 2 can be routed to I2C-6. If the routing conversion function of the fixed component is not enabled, fixed component 1 can only be routed to I2C-1 and fixed component 2 can only be routed to I2C-2.
[0061] Step S12: Without enabling the routing conversion function of the fixed components, the P fixed components are routed to Q I2Cs according to a preset routing relationship, and the K dynamic components are routed to D I2Cs based on a routing conversion algorithm, wherein the preset routing relationship is used to indicate the fixed components connected to each I2C on the Q I2Cs, and the routing conversion algorithm is used to route multiple components to multiple I2Cs, so that the addresses of each component in a group of components connected to each I2C in the multiple I2Cs are different from each other, and Q+D=N-1;
[0062] It should be noted that the routing conversion algorithm is mainly called by the routing conversion control process, and its main purpose is to regularize the addresses and types of each slave device under I2C according to the algorithm, so that the addresses of each component in a group of components connected by each I2C in multiple I2Cs are different, so that the addresses of each monitored device of servers with different configurations will not have address conflicts when all channels are opened.
[0063] Step S13: When the routing conversion function of the fixed components is enabled, the M components are routed to N-1 I2Cs based on the routing conversion algorithm.
[0064] It should be noted that, since the addresses of fixed components must be different, there is no possibility of address conflict for fixed components. Therefore, the routing relationship of fixed components is generally routed according to the preset routing relationship by default. When implementing this application, it can be determined whether to turn on the routing conversion function of the fixed component to determine whether to change the access address of the fixed component, so as to ensure that the efficiency of I2C access is maximized. The addresses of dynamic components may be the same, that is, there may be an address conflict problem. It is necessary to route the dynamic components to different I2Cs based on the routing conversion algorithm to avoid the problem of address conflict.
[0065] In an exemplary embodiment, the above step S11 can be implemented by the following steps S21-S23:
[0066] Step S21: obtaining parameter values of configuration parameters from a configuration file through the routing conversion control process;
[0067] Step S22: when the parameter value of the configuration parameter is the first value, determining to enable the routing conversion function of the fixed component;
[0068] Step S23: when the parameter value of the configuration parameter is the second value, determine not to enable the routing conversion function of the fixed component.
[0069] Optionally, when the parameter value of the configuration parameter is True, it means that the routing conversion function of the fixed component is agreed to be enabled, so that the fixed component can be routed to different I2Cs; when the parameter value of the configuration parameter is False, it means that the routing conversion function of the fixed component is not agreed to be enabled, and the fixed component will be routed according to the preset routing relationship.
[0070] It should be noted that the configuration file is a configuration file preset by the user in the BMC, the routing conversion control process can freely call the configuration file from the BMC, and the first value and the second value are both fixed values preset by the user in the BMC.
[0071] It should be noted that the routing conversion control process determines whether to enable the routing conversion function of the fixed component by determining the configuration parameters in the configuration file, thereby solving the problem of how to determine whether to enable the routing conversion function of the fixed component, thereby maximizing the access efficiency of I2C while avoiding address conflicts.
[0072] In an exemplary embodiment, the method further comprises the following steps S31-S32:
[0073] Step S31: determining the routing conversion algorithm from the configuration file through the routing conversion control process;
[0074] Step S32: when it is determined that the route conversion function of the fixed component is not enabled, the preset route relationship is determined from the configuration file.
[0075] Alternatively, if Figure 5 As shown, assuming that the routing conversion function of the fixed component is enabled through the configuration file, and the routing relationship preset in the configuration file is: routing the fixed component 1 to I2C-1, and routing the fixed component 2 to I2C-2, then the components other than the fixed component 1 and the fixed component 2 among the M components need to be routed to I2C-3 to I2C-15 (i.e., the D I2Cs mentioned above). Otherwise, the M components need to be routed to I2C-1 to I2C-15 (i.e., the N-1 I2Cs mentioned above).
[0076] It should be noted that, when implementing the embodiment of the present application, there is no order in which the above step S31 and step S32 are performed.
[0077] In an exemplary embodiment, the routing conversion algorithm is further used to route multiple components to multiple I2Cs so that the variance of the loads of the multiple I2Cs is less than a preset threshold. The routing conversion algorithm based on the routing conversion algorithm in the above step S12 can be implemented by the following steps S41-S42:
[0078] Step S41: determining the load value of each dynamic component in the K dynamic components;
[0079] Step S42: Routing the K dynamic components to D I2Cs based on the load value of each dynamic component, so that the addresses of each component in a group of components connected to each I2C in the D I2Cs are different from each other, and the variance of the load of the D I2Cs is less than the preset threshold, wherein the load of the I2C is equal to the sum of the load values of multiple components connected to the I2C.
[0080] It should be noted that, consistent with the step of routing the K dynamic components to D I2Cs, routing the M components to N-1 I2Cs includes: determining the load value of each of the M dynamic components through a routing conversion control process; routing the M components to N-1 I2Cs based on the load value of each component, so that the addresses of each component in a group of components connected to each of the N-1 I2Cs are different, and the variance of the load of the N-1 I2Cs is less than the preset threshold.
[0081] It should be noted that, through the above steps S41-S42, dynamic routing can be performed according to the load value of the configuration component to achieve load balancing of the D I2Cs, thereby maximizing the utilization efficiency of the I2Cs, thereby effectively reducing the probability of interference and conflict in I2C communications and improving the stability and reliability of the system.
[0082] In an exemplary embodiment, the step S41 includes: determining the load value of the kth dynamic component among the K dynamic components through the following steps S51-S52 to determine the load value of each dynamic component among the K dynamic components, wherein k is a positive integer greater than or equal to 1 and less than or equal to K:
[0083] Step S51: Determine A monitoring information points corresponding to the k-th dynamic component, A monitoring frequencies of the A monitoring information points, and A timeliness of the A monitoring information points;
[0084] Optionally, when the k dynamic components are GPUs, the A monitoring information points include: temperature, power consumption, and number of PCIE errors. The A monitoring frequencies include: once every 5 seconds (corresponding to the monitoring frequency of temperature), once every 10 seconds (corresponding to the monitoring frequency of power consumption), and once every minute (corresponding to the monitoring frequency of the number of PCIE errors); the A timeliness includes: short (corresponding to the timeliness of temperature), medium (corresponding to the timeliness of power consumption), and long (corresponding to the timeliness of the number of PCIE errors).
[0085] It should be noted that the timeliness corresponding to one of the monitoring information points of the k-th dynamic component is the effective duration of the information corresponding to the monitoring information point of the k-th dynamic component, that is, the sensitivity in the following table (in an inversely proportional relationship). The longer the timeliness of the monitoring information point, the longer the effective duration of the information corresponding to the monitoring information point and the lower the sensitivity.
[0086] Step S52: Determine the load value of the kth dynamic component according to the A monitoring information points, the A monitoring frequencies, and the A timeliness.
[0087] In an exemplary embodiment, the above step S52 can be implemented by the following steps S61-S62:
[0088] Step S61: determining a first value according to the number of the A monitoring information points, determining a second value according to the A monitoring frequencies, and determining a third value according to the A timeliness;
[0089] Optionally, determining the first value based on the number of the A monitoring information points includes: determining multiple number ranges, wherein each number range in the multiple number ranges corresponds to a preset value; when the number of the A monitoring information points is within a target number range in the multiple number ranges, determining the preset value corresponding to the target number range as the first value.
[0090] Step S62: Determine the load value of the kth dynamic component according to the first value, the second value and the third value.
[0091] Optionally, a fourth value is obtained by adding the first value, the second value and the third value, and the fourth value is confirmed as the load value of the kth dynamic component.
[0092] It should be noted that adding the first value plus the second value plus the third value to obtain the load value of the kth dynamic component is only one way to obtain the load value of the kth dynamic component in the implementation of this application. When implementing this application, the load value of the kth dynamic component can also be obtained according to the first value, the second value and the third value through other formulas, which will not be repeated here.
[0093] In this embodiment, the load value of the kth dynamic component can be determined quickly and accurately through the above method.
[0094] In an exemplary embodiment, the step of determining the second value according to the A monitoring frequencies in the above step S61 may be implemented by the following steps S711-S712:
[0095] Step S711: Determine the average monitoring frequency of the A monitoring frequencies;
[0096] Optionally, assuming that A monitoring frequencies are: once every 5 seconds, once every 10 seconds, and once every minute; then the corresponding average monitoring frequency = (5+10+60) / 3; the unit of the average monitoring frequency is once every few seconds.
[0097] Step S712: determining the second value according to the average monitoring frequency;
[0098] Optionally, determining the second value based on the average monitoring frequency includes: determining multiple frequency ranges, wherein each frequency range in the multiple frequency ranges corresponds to a preset value; when the average monitoring frequency is within a target frequency range in the multiple frequency ranges, determining the preset value corresponding to the target frequency range as the second value.
[0099] In an exemplary embodiment, the step S61 of determining the third value according to the A timelinesses may be implemented by the following steps S721-S722:
[0100] Step S721: Determine a reference value corresponding to each of the A timelinesses to obtain A reference values;
[0101] Optionally, the reference value corresponding to each timeliness may be determined by a preset timeliness table, wherein the preset timeliness table contains reference values corresponding to different timelinesses.
[0102] Step S722: Determine the average value of the A reference values as the third value.
[0103] Optionally, the routing conversion algorithm is also used to determine the load value of each dynamic component in the K dynamic components. The specific scores of each dimension of each dynamic component are shown in Table 1:
[0104] Table 1
[0105]
[0106] Optionally, if the number of monitoring information points of a dynamic component is 2 (voltage and current respectively), its first value is 10 points; the monitoring frequency of the voltage of the dynamic component is 6 seconds each time, and the monitoring frequency of the current of the dynamic component is 8 seconds each time, then the average monitoring frequency of the dynamic component is 7 seconds each time, and its second value is 15 points; since the sensitivity of the voltage is high and the sensitivity of the current is medium, the corresponding third value is 25 points, and finally the load value of the dynamic component is 50 points (10+15+25=50).
[0107] In an exemplary embodiment, after routing the K dynamic components to D I2Cs based on a routing conversion algorithm, the method further includes the following steps: when it is detected that the routing converter is connected to a target component and the M components do not include the target component, routing the target component to a target I2C, wherein the target I2C is the I2C with the smallest load among the D I2Cs.
[0108] It should be noted that after routing the K dynamic components to D I2Cs so that the addresses of each dynamic component in a group of components connected to each I2C are different, if it is detected that the routing converter is connected to an unrouted target component (the unrouted target component includes but is not limited to a newly added target component), it will be routed to the I2C with the smallest load among the D I2Cs. Through this step, the flexibility of address allocation is improved, so that the BMC can be compatible with more application scenarios, avoiding the situation where it is incompatible with certain application scenarios once the motherboard is formed.
[0109] In an exemplary embodiment, the above step S202 can be implemented by the following steps S81-S82:
[0110] Step S81: sending a first instruction to the routing converter using the first I2C through the routing conversion control process;
[0111] Step S82: Obtain component information of the M components sent by the routing converter in response to the first instruction.
[0112] Optionally, the component information of the M components includes but is not limited to that shown in Table 2:
[0113] Table 2
[0114]
[0115] In this embodiment, the component information of M components can be quickly acquired through the above method.
[0116] In an exemplary embodiment, after routing the M components to N-1 I2Cs, the method further includes the following steps: through the routing conversion control process, using the first I2C to send a second instruction to the routing converter, wherein the second instruction is used to indicate the routing relationship between each of the M components of the routing converter and the N-1 I2Cs.
[0117] Alternatively, if Figure 3 As shown, the routing relationship between each of the M components and the N-1 I2Cs can be: fixed component one is routed to I2C-1, fixed component two is routed to I2C-2, dynamic component one is routed to I2C-3, dynamic component two is routed to I2C-4, and so on.
[0118] In an exemplary embodiment, after routing the M components to N-1 I2Cs, the method further includes the following steps S91-S92:
[0119] Step S91: monitoring B components connected to the ith I2C through the ith monitoring thread corresponding to the ith I2C among the N-1 I2Cs, where B is a positive integer greater than or equal to 1;
[0120] Step S92: The monitoring data of the jth component among the B components monitored are stored in the jth resource pool through the i-th monitoring thread, wherein the j-th resource pool is a resource pool corresponding to the j-th component in the monitoring information point resource pool, and the monitoring information point resource pool is used to store the monitoring data of the M components monitored.
[0121] Alternatively, if Figure 4 Assume that the jth component is a PSU, then the jth resource pool is a resource pool storing monitoring data of monitoring information points of the PSU.
[0122] It should be noted that, through the above steps, the i-th monitoring thread corresponding to the i-th I2C in N-1 I2Cs monitors the B components connected to it, which can effectively avoid the situation where multiple monitoring threads compete for one I2C bus.
[0123] In an exemplary embodiment, in the above step S91, the jth component among the B components may be monitored through the following steps S101-S102 to monitor the B components:
[0124] Step S101: determining the device type of the jth component through the i-th monitoring thread, and determining a monitoring protocol for monitoring the j-th component according to the device type;
[0125] Alternatively, if Figure 4 As shown, the monitoring protocol includes but is not limited to: a monitoring protocol for components and a monitoring protocol for monitoring information points, wherein the monitoring protocol for components includes: a motherboard CPLD monitoring protocol, a PSU monitoring protocol, a GPU monitoring protocol, a Raid monitoring protocol, and a network card monitoring protocol; the monitoring protocol for monitoring information points includes: a temperature monitoring protocol, a voltage monitoring protocol, and a power consumption monitoring protocol.
[0126] It should be noted that the monitoring protocol is stored in a monitoring protocol resource pool, and the routing conversion control process obtains the required monitoring protocol through the monitoring protocol resource pool.
[0127] Step S102: Monitor the jth component according to the monitoring protocol through the i-th monitoring thread.
[0128] In an exemplary embodiment, the above step S92 can be implemented by the following steps S111-S112:
[0129] Step S111: determining an interaction protocol for a monitoring thread to interact with the monitoring information point resource pool, wherein the monitoring thread includes the i-th monitoring thread;
[0130] Optionally, the interaction protocol is stored in an interaction protocol resource pool, and the routing conversion control process obtains the required interaction protocol through the interaction protocol resource pool.
[0131] Step S112: storing the monitoring data of the jth component into the jth resource pool through the i-th monitoring thread according to the interaction protocol.
[0132] Obviously, the above-described embodiments are only embodiments of a part of the present invention, rather than all embodiments. In order to better understand the above method, the above process is described below in conjunction with embodiments, but it is not intended to limit the technical solutions of the embodiments of the present invention, specifically:
[0133] Taking the baseboard management controller BMC as an example, the routing of a component mainly includes three parts: hardware link design, BMC software system monitoring model design and I2C dynamic routing algorithm design:
[0134] 1. Hardware link design;
[0135] Hardware link design is carried out in the initial stage of server hardware design, which is a process of planning and designing the layout and bus distribution of I2C. Figure 3 As shown, there are multiple I2C buses in the BMC, one of which is designed as a routing management bus, and the remaining buses are used for server monitoring and management.
[0136] There are a total of 16 I2C buses in BMC, of which I2C-0 is used as a routing management bus, I2C-1 and I2C-2 are connected to the fixed components of the mainboard through a routing converter, and I2C3~I2C15 are used as master components to interact with various dynamic components on the server to achieve monitoring functions. Each bus is connected to an I2C routing adapter, which can implement the routing conversion function of the I2C link by logic devices such as CPLD or FPGA. The downstream of the routing converter is designed according to the number and distribution of monitoring devices on the project mainboard. The downstream bus is divided into two categories, one is the monitoring of fixed components on the mainboard, such as temperature sensors soldered to the mainboard, and the other is the monitoring of devices that can be dynamically configured when the server is shipped.
[0137] For the monitoring of fixed components, the I2C bus is designed according to the number of monitoring information points and the average monitoring frequency when the mainboard is designed. The possibility of I2C address conflicts can be avoided when the mainboard is designed. Fixed components do not participate in the automatic routing function of the I2C bus by default. The I2C-1 and I2C-2 buses are connected to different downstream buses through the switching circuit built into the conversion controller. Fixed components can also be modified to participate in the automatic routing function of the I2C bus by sending instructions to the routing converter.
[0138] For monitoring of dynamic components, the routing function of the bus must be involved by default, with I2C-1 and I2C-2 taking on the monitoring function. The I2C-3~I2C-15 involved in routing default to each bus's own downstream bus group.
[0139] Each bus expands its own functions based on the switch switching of the routing converter or the I2C bus. Its downstream contains 8 / 16 / 32 / 64 / 128 buses. The specific number of downstream buses is mainly determined by the motherboard design. For the different design requirements of single-channel, dual-channel, quad-channel, eight-channel, and AI smart servers, different downstream buses can be selected according to the number of components to be monitored and the monitoring frequency.
[0140] 2. Design of BMC software system monitoring model;
[0141] The BMC software system monitoring model is mainly based on hardware design, and designs processes / threads and monitoring models for component monitoring in the BMC software system. The entire system monitoring model consists of three parts: the protocol resource pool (the protocol resource pool includes but is not limited to the above-mentioned monitoring protocol resource pool and the interactive protocol resource pool), the monitoring driver process group (including the above-mentioned routing conversion control process and the above-mentioned i-th monitoring thread), and the information point resource pool (that is, the above-mentioned monitoring information point resource pool). Figure 4 As shown:
[0142] The information point resource pool mainly includes information points monitored based on various protocols, such as the voltage, current, status word and other information of the PSU, the temperature, power consumption, and peripheral component interconnect expression (PCIE) error number of the GPU. The information monitored by each process in the bus monitoring process group will be integrated into the information point resource pool according to the interaction protocol between the information point resource pool and the process group. The remaining modules, such as the Remote Direct Memory Access Controller (redfish) module, the Intelligent Platform Management Interface (IPMI) module, the Simple Network Management Protocol (SNMP) module, the information point processing module, etc., can obtain various information points from the information point resource pool through the inter-process communication bus (dbus) for display or information processing.
[0143] The bus monitoring process group is designed based on the I2C bus distribution in the BMC. Each I2C bus initiates a monitoring process. The main function of this process is to monitor the information of various slave components under the bus, and then integrate the monitored information into the information point resource pool after simple processing. Among them, the I2C converter routing process is a special process. This process follows the interaction protocol with the routing converter. It can send corresponding commands to the routing converter through the I2C-0 bus to realize related control functions. The control functions currently designed mainly include three categories. One is to turn on / off the automatic routing function of fixed components, which is used to turn on / off the automatic routing function of the bus I2C-1 / I2C-2 bus. The default is closed. Another category is to send corresponding commands to the routing converter. According to the address, access frequency, access rate, etc. of each slave component under each bus, the downstream slave components of the routing converter are routed to the corresponding bus according to the I2C dynamic routing algorithm. The third category is the recovery control command, which is to restore the slave components under each bus to the downstream bus of each bus. The processing logic of the bus router control process is as follows Figure 5 As shown:
[0144] The monitoring process of each bus will first obtain all the slave component types and addresses under the bus from the routing conversion control process, and then select the protocol with the corresponding protocol number from the protocol library according to the type of the slave component to monitor the component, obtain various information points corresponding to the component, and then update the information points to the information point resource pool after simple processing. The specific process logic is as follows: Figure 6 As shown:
[0145] The monitoring protocol resource pool mainly includes monitoring protocols for various types of components, including the framing of data frames for communication through the I2C link, sending data, receiving data, parsing data and other related processes. Each protocol component in this module is identified according to the protocol number, and the routing conversion control process corresponds to the component type and the protocol number. The process can obtain the protocol used by each type of component from the resource pool to interact with the specific component and parse the data according to the protocol format.
[0146] 3. Design of I2C dynamic routing algorithm;
[0147] The I2C dynamic routing algorithm is mainly called by the routing control process. The main purpose is to regularize the addresses and types of each slave component under the bus according to the algorithm, so that the address of each monitoring component of the server with different shipping configurations is in a state where there will be no address conflict when all channels are opened. In addition, the bus ownership of each slave is calculated based on the component type, the number of information points obtained by the component, the frequency of information point acquisition, the sensitivity of the information point, etc. Taking each slave component as the benchmark, the specific attribute information of each slave component is shown in Table 2.
[0148] The implementation of this algorithm mainly follows the following rules:
[0149] (1) The algorithm calculates a score for each bus, with an initial value of 0 and a maximum value of 100;
[0150] (2) The bus to which the slave address of the component is assigned will not conflict with the addresses of other slave components under the bus. If a conflict is unavoidable, the component is assigned to the bus with the lowest score calculated by the algorithm;
[0151] (3) The score of each bus is currently calculated based on the number of monitored information points, the monitoring frequency of each information point, the monitoring sensitivity of the information point, etc. The specific scores for each dimension are shown in Table 1 below.
[0152] For each type of component, the corresponding score is calculated according to the number of information points it monitors, the monitoring frequency of each information point, and the sensitivity. Then, the load on each I2C bus is measured according to the score of the bus, and the component can be placed on the bus with the smallest load.
[0153] It should be noted that the technical solution of this application can bring the following advantages:
[0154] (1) This solution can largely utilize all the I2C bus related resources of the chip where the BMC is located to achieve load balancing of the I2C bus resources;
[0155] (2) This solution can dynamically adjust the load according to the different shipping configurations of the server. Compared with the fixed correspondence between the bus and the slave components during the board design, this solution has higher flexibility;
[0156] (3) The design method of using a single process to manage a single I2C bus can minimize the resource contention and mutex resource overhead caused by the shared occupation of a single bus by multiple processes / threads, and can maximize the efficiency of component monitoring;
[0157] (4) This solution reduces the need to consider I2C slave component address conflicts during server motherboard design, which can reduce the difficulty of hardware design to a certain extent. It can also be compatible with more application scenarios and avoid the situation where the motherboard is incompatible with certain application scenarios once it is formed;
[0158] (5) It is compatible with various types of components that emerge in the server field. Even if address conflicts occur, the efficiency of component monitoring can be guaranteed to the greatest extent, so that the use of I2C bus resources can be maximized.
[0159] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0160] In this embodiment, a routing device of a component is also provided to implement the above-mentioned embodiments and preferred implementation modes, which have been described and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the modules described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0161] Figure 7 : is a structural block diagram of a routing device of a component according to an embodiment of the present application, the device comprising:
[0162] A determination module 702 is used to determine the M components connected to the routing converter using the first I2C of the N I2Cs through the routing conversion control process in the BMC;
[0163] The routing module 704 is used to route the M components to N-1 I2Cs so that the addresses of each component in a group of components connected to each I2C in the N-1 I2Cs are different from each other, wherein the N-1 I2Cs are the N-1 I2Cs in the N I2Cs except the first I2C.
[0164] The above device, through the routing conversion control process in the BMC, uses the first I2C of multiple I2Cs to determine multiple components connected to the routing converter, and routes the determined multiple components to I2Cs other than the first I2C, so that the address of each component in a group of components connected to each I2C is different, which solves the problem that the BMC cannot effectively avoid component address conflicts when monitoring and managing each component.
[0165] In an exemplary embodiment, the routing module 704 is further used to determine whether to enable the routing conversion function of the fixed component, wherein, when the routing conversion function of the fixed component is enabled, the fixed component is allowed to be routed to different I2Cs; when the routing conversion function of the fixed component is not enabled, the P fixed components are routed to Q I2Cs according to a preset routing relationship, and the K dynamic components are routed to D I2Cs based on a routing conversion algorithm, wherein the preset routing relationship is used to indicate the fixed components connected to each I2C on the Q I2Cs, and the routing conversion algorithm is used to route multiple components to multiple I2Cs so that the addresses of each component in a group of components connected to each I2C in the multiple I2Cs are different, Q+D=N-1; and / or when the routing conversion function of the fixed component is enabled, the M components are routed to N-1 I2Cs based on the routing conversion algorithm.
[0166] In an exemplary embodiment, the routing module 704 is also used to obtain the parameter value of the configuration parameter from the configuration file through the routing conversion control process; when the parameter value of the configuration parameter is a first value, determine to enable the routing conversion function of the fixed component; when the parameter value of the configuration parameter is a second value, determine not to enable the routing conversion function of the fixed component.
[0167] In an exemplary embodiment, the routing module 704 is also used to determine the routing conversion algorithm from the configuration file through the routing conversion control process; and when it is determined that the routing conversion function of the fixed component is not enabled, determine the preset routing relationship from the configuration file.
[0168] In an exemplary embodiment, the routing module 704 is further used to determine the load value of each of the K dynamic components; and route the K dynamic components to D I2Cs based on the load value of each dynamic component, so that the addresses of each component in a group of components connected to each of the D I2Cs are different from each other, and the variance of the load of the D I2Cs is less than the preset threshold, wherein the load of the I2C is equal to the sum of the load values of multiple components connected to the I2C.
[0169] In an exemplary embodiment, the routing module 704 is also used to determine the A monitoring information points, the A monitoring frequencies, and the A timeliness of the A monitoring information points corresponding to the k-th dynamic component; and determine the load value of the k-th dynamic component based on the A monitoring information points, the A monitoring frequencies, and the A timeliness.
[0170] In an exemplary embodiment, the routing module 704 is also used to determine a first value based on the number of the A monitoring information points, and to determine a second value based on the A monitoring frequencies, and to determine a third value based on the A timeliness; and to determine the load value of the kth dynamic component based on the first value, the second value and the third value.
[0171] In an exemplary embodiment, the routing module 704 is also used to determine the average monitoring frequency of the A monitoring frequencies; determine the second value based on the average monitoring frequency; determine the reference value corresponding to each of the A timelinesses to obtain A reference values; and determine the average value of the A reference values as the third value.
[0172] In an exemplary embodiment, the routing module 704 is also used to route the K dynamic components to D I2Cs based on the routing conversion algorithm, and then, when it is detected that the routing converter is connected to a target component and the M components do not include the target component, route the target component to a target I2C, wherein the target I2C is the I2C with the smallest load among the D I2Cs.
[0173] In an exemplary embodiment, the determination module 702 is used to send a first instruction to the routing converter using the first I2C through the routing conversion control process; and obtain component information of the M components sent by the routing converter in response to the first instruction.
[0174] In an exemplary embodiment, the device also includes: a sending module, which is used to send a second instruction to the routing converter using the first I2C through the routing conversion control process after routing the M components to N-1 I2Cs, wherein the second instruction is used to indicate the routing relationship between each of the M components of the routing converter and the N-1 I2Cs.
[0175] In an exemplary embodiment, the above-mentioned device also includes: a monitoring module, which is used to monitor the B components connected to the i-th I2C through the i-th monitoring thread corresponding to the i-th I2C among the N-1 I2Cs after routing the M components to N-1 I2Cs, where B is a positive integer greater than or equal to 1; a storage module, which is used to store the monitoring data of the j-th component among the B components monitored to the j-th resource pool through the i-th monitoring thread, wherein the j-th resource pool is a resource pool corresponding to the j-th component in the monitoring information point resource pool, and the monitoring information point resource pool is used to store the monitoring data of the M components monitored.
[0176] In an exemplary embodiment, the monitoring module is also used to determine the device type of the jth component through the i-th monitoring thread, and determine the monitoring protocol for monitoring the j-th component based on the device type; and monitor the j-th component according to the monitoring protocol through the i-th monitoring thread.
[0177] In an exemplary embodiment, the storage module is also used to determine the interaction protocol for the monitoring thread to interact with the monitoring information point resource pool, wherein the monitoring thread includes the i-th monitoring thread; through the i-th monitoring thread, the monitoring data of the j-th component is stored in the j-th resource pool according to the interaction protocol.
[0178] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0179] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0180] Optionally, in this embodiment, the computer program may be configured to perform the following steps by means of the computer program:
[0181] S1, determining the M components connected to the routing converter using the first I2C of the N I2Cs through the routing conversion control process in the BMC;
[0182] S2, routing the M components to N-1 I2Cs, so that the addresses of each component in a group of components connected to each of the N-1 I2Cs are different from each other, wherein the N-1 I2Cs are the N-1 I2Cs in the N I2Cs except the first I2C.
[0183] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0184] The embodiment of the present application also provides an electronic device, such as Figure 8 As shown, the electronic device includes a memory 802 and a processor 804. The memory 802 stores a computer program, and the processor 804 is configured to execute the steps in any of the above method embodiments through the computer program.
[0185] Optionally, in this embodiment, the processor 804 may be configured to perform the following steps through a computer program:
[0186] S1, determining the M components connected to the routing converter using the first I2C of the N I2Cs through the routing conversion control process in the BMC;
[0187] S2, routing the M components to N-1 I2Cs, so that the addresses of each component in a group of components connected to each of the N-1 I2Cs are different from each other, wherein the N-1 I2Cs are the N-1 I2Cs in the N I2Cs except the first I2C.
[0188] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0189] Alternatively, a person skilled in the art may understand that: Figure 8 The structure shown is for illustration only. Figure 8 The structure of the electronic device is not limited. For example, the electronic device may also include Figure 8 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 8 Different configurations shown.
[0190] Among them, the memory 802 can be used to store software programs and modules, such as the program instructions / modules corresponding to the routing method of the component and the routing device of the component in the embodiment of the present application. The processor 804 executes various functional applications and data processing by running the software programs and modules stored in the memory 802, that is, realizing the routing method of the above-mentioned component. The memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 802 may further include a memory remotely arranged relative to the processor 804, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 802 can be specifically, but not limited to, used to store information such as system configuration files. As an example, such as Figure 8 As shown, the memory 802 may include but is not limited to the determination module 702 and the routing module 704 in the routing device of the above components. In addition, other module units in the routing device of the above components may also be included but are not limited to, which will not be described in detail in this example.
[0191] Optionally, the transmission device 806 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 806 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 806 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0192] In addition, the electronic device mentioned above further includes: a display 808; and a connection bus 810, which is used to connect various module components in the electronic device mentioned above.
[0193] In other embodiments, the electronic device may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. The nodes may form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0194] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0195] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0196] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.
[0197] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0198] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A component routing method, characterized in that: The number of components is M, and the M components are respectively connected to the routing switch. The baseboard management controller BMC has N integrated circuit buses I2C, and the N I2Cs are connected to the routing switch. The M components are components to be monitored in the server, N is a positive integer greater than or equal to 3, and M is a positive integer greater than or equal to 2. include: Determine, by a routing conversion control process in the BMC, the M components connected to the routing converter using a first I2C of the N I2Cs; Routing the M components to N-1 I2Cs, so that the addresses of each component in a group of components connected to each of the N-1 I2Cs are different from each other, wherein the N-1 I2Cs are the N-1 I2Cs in the N I2Cs except the first I2C; The M components include P fixed components and K dynamic components, K+P=M, the fixed components are components fixed on the mainboard of the server, the dynamic components are components dynamically configured in the server, and the routing of the M components to N-1 I2Cs includes: determining whether to enable a routing conversion function of the fixed components, wherein when the routing conversion function of the fixed components is enabled, the fixed components are allowed to be routed to different I2Cs; Without enabling the routing conversion function of the fixed components, the P fixed components are routed to Q I2Cs according to a preset routing relationship, and the K dynamic components are routed to D I2Cs based on a routing conversion algorithm, wherein the preset routing relationship is used to indicate the fixed components connected to each I2C on the Q I2Cs, and the routing conversion algorithm is used to route multiple components to multiple I2Cs, so that the addresses of each component in a group of components connected to each I2C in the multiple I2Cs are different, Q+D=N-1, and the addresses of the P fixed components are different; and / or When the routing conversion function of the fixed components is enabled, the M components are routed to N-1 I2Cs based on the routing conversion algorithm.
2. The method according to claim 1, characterized in that The determining whether to enable the routing conversion function of the fixed component includes: Obtaining parameter values of configuration parameters from a configuration file through the routing conversion control process; When the parameter value of the configuration parameter is the first value, determining to enable the routing conversion function of the fixed component; When the parameter value of the configuration parameter is the second value, it is determined not to enable the routing conversion function of the fixed component.
3. The method according to claim 1, characterized in that: The method further comprises: Determining the route switching algorithm from a configuration file through the route switching control process; and In the case where it is determined not to enable the route conversion function of the fixed component, the preset route relationship is determined from the configuration file.
4. The method according to claim 1, characterized in that: The routing conversion algorithm is also used to route multiple components to multiple I2Cs so that the variance of the loads of the multiple I2Cs is less than a preset threshold. The method of routing the K dynamic components to D I2Cs based on a routing conversion algorithm includes: Determining a load value of each of the K dynamic components; The K dynamic components are routed to D I2Cs based on the load value of each dynamic component, so that the addresses of each component in a group of components connected to each I2C in the D I2Cs are different from each other, and the variance of the load of the D I2Cs is less than the preset threshold, wherein the load of the I2C is equal to the sum of the load values of multiple components connected to the I2C.
5. The method according to claim 4, characterized in that Determining the load value of each dynamic component in the K dynamic components includes: The load value of the kth dynamic component among the K dynamic components is determined in the following manner to determine the load value of each dynamic component among the K dynamic components, wherein k is a positive integer greater than or equal to 1 and less than or equal to K: Determine A monitoring information points corresponding to the k-th dynamic component, A monitoring frequencies of the A monitoring information points, and A timeliness of the A monitoring information points; The load value of the kth dynamic component is determined according to the A monitoring information points, the A monitoring frequencies, and the A timelinesses.
6. The method according to claim 5, characterized in that The step of determining the load value of the kth dynamic component according to the A monitoring information points, the A monitoring frequencies, and the A timelinesses includes: Determine a first value according to the number of the A monitoring information points, determine a second value according to the A monitoring frequencies, and determine a third value according to the A timeliness; The load value of the kth dynamic component is determined according to the first value, the second value and the third value.
7. The method according to claim 6, characterized in that Determining the second value according to the A monitoring frequencies includes: determining an average monitoring frequency of the A monitoring frequencies; and determining the second value according to the average monitoring frequency; Determining the third value based on the A timelinesses includes: determining a reference value corresponding to each of the A timelinesses to obtain A reference values; and determining an average value of the A reference values as the third value.
8. The method according to claim 5, characterized in that After routing the K dynamic components to D I2Cs based on the routing conversion algorithm, the method further includes: When it is detected that the routing converter is connected to a target component and the M components do not include the target component, the target component is routed to a target I2C, wherein the target I2C is the I2C with the smallest load among the D I2Cs.
9. The method according to claim 1, characterized in that: The method of determining the M components connected to the routing converter by using the first I2C of the N I2Cs through the routing conversion control process in the BMC includes: Sending a first instruction to the routing converter using the first I2C through the routing conversion control process; Component information of the M components sent by the routing switch in response to the first instruction is obtained.
10. The method according to claim 1, characterized in that After routing the M components to N-1 I2Cs, the method further includes: Through the routing conversion control process, using the first I2C to send a second instruction to the routing converter, The second instruction is used to indicate the routing relationship between each of the M components of the routing converter and the N-1 I2Cs.
11. The method according to claim 1, characterized in that After routing the M components to N-1 I2Cs, the method further includes: Monitor B components connected to the ith I2C through the ith monitoring thread corresponding to the ith I2C among the N-1 I2Cs, where B is a positive integer greater than or equal to 1; The monitoring data of the jth component among the B components monitored is stored in the jth resource pool through the i-th monitoring thread, wherein the j-th resource pool is a resource pool corresponding to the j-th component in the monitoring information point resource pool, and the monitoring information point resource pool is used to store the monitoring data of the M components monitored.
12. The method according to claim 11, characterized in that The monitoring of the B components connected to the ith I2C by the ith monitoring thread corresponding to the ith I2C among the N-1 I2Cs includes: The jth component among the B components is monitored in the following manner to monitor the B components: Determining a device type of the jth component through the i-th monitoring thread, and determining a monitoring protocol for monitoring the j-th component according to the device type; The j-th component is monitored through the i-th monitoring thread according to the monitoring protocol.
13. The method according to claim 11, characterized in that The storing, through the i-th monitoring thread, the monitoring data of the j-th component among the B components monitored into the j-th resource pool includes: Determining an interaction protocol for a monitoring thread to interact with the monitoring information point resource pool, wherein the monitoring thread includes the i-th monitoring thread; The monitoring data of the jth component is stored in the jth resource pool through the i-th monitoring thread according to the interaction protocol.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 13 when executed by a processor.
15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 13 are implemented.
16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.
