技术领域Technical Field
本发明涉及设备管理技术领域,具体涉及硬件设备管理方法、装置、BMC、存储介质及程序产品。The present invention relates to the technical field of equipment management, and in particular to a hardware equipment management method, device, BMC, storage medium and program product.
背景技术Background technique
PCIE(Peripheral Component Interconnect Express)在服务器应用中扮演着重要的角色。PCIE是一种高速串行总线标准,用于连接计算机内部的各种硬件设备,如显卡、网卡、存储控制器等。PCIE在服务器应用中起到了连接和扩展各种硬件设备的关键作用,提供了高速、可靠的数据传输通道,满足了服务器对性能和扩展性的需求。PCIE (Peripheral Component Interconnect Express) plays an important role in server applications. PCIE is a high-speed serial bus standard used to connect various hardware devices inside the computer, such as graphics cards, network cards, storage controllers, etc. PCIE plays a key role in connecting and expanding various hardware devices in server applications, providing a high-speed and reliable data transmission channel to meet the server's performance and scalability requirements.
为了更好的监视和控制这些网卡,网卡设备往往提供了带内、带外等管理方式。BMC就是通过带外方式管理PCIe接口卡类的设备的。槽网卡物理连接是插接在存储设备的riser卡上的PCIe接口里,PCIe接口中有smbus连线与网卡相连,BMC通过I2C switch器件与riser卡相连,riser卡再通过I2C switch器件,与网卡相连。如图1所示,为网卡的连接方式。In order to better monitor and control these network cards, network card devices often provide in-band and out-of-band management methods. BMC manages PCIe interface card devices in an out-of-band manner. The physical connection of the slot network card is plugged into the PCIe interface on the riser card of the storage device. The PCIe interface has an SMBus connection connected to the network card. The BMC is connected to the riser card through the I2C switch device, and the riser card is connected to the network card through the I2C switch device. As shown in Figure 1, this is the connection method of the network card.
BMC在管理网卡时,通常需要人工将网卡的连接方式以表格的形式输入至BMC中,BMC根据用户输入的表格,确定网卡的连接方式,然后对网卡进行管理。但是,当网卡的连接方式发生变化,BMC无法通过切换I2C链路正确找到与BMC连接的硬件设备,从而造成BMC对PCIe接口卡设备无法识别、监控。When BMC manages the network card, it is usually necessary to manually input the connection mode of the network card into the BMC in the form of a table. BMC determines the connection mode of the network card based on the table entered by the user, and then manages the network card. However, when the connection mode of the network card changes, BMC cannot correctly find the hardware device connected to BMC by switching the I2C link, resulting in BMC being unable to identify and monitor the PCIe interface card device.
发明内容Summary of the invention
有鉴于此,本发明提供了一种硬件设备管理方法、装置、BMC、存储介质及程序产品,以解决当网卡的连接方式发生变化,BMC无法通过切换I2C链路正确找到与BMC连接的硬件设备,从而造成BMC对PCIe接口卡设备无法识别、监控的问题。In view of this, the present invention provides a hardware device management method, apparatus, BMC, storage medium and program product to solve the problem that when the connection mode of the network card changes, the BMC cannot correctly find the hardware device connected to the BMC by switching the I2C link, thereby causing the BMC to be unable to identify and monitor the PCIe interface card device.
第一方面,本发明提供了一种硬件设备管理方法,应用于BMC,方法包括:In a first aspect, the present invention provides a hardware device management method, which is applied to a BMC, and the method comprises:
获取当前与BMC连接的至少一个硬件设备对应的设备信息;设备信息中包括硬件设备对应的标识信息以及硬件设备连接的PCIe接口;Obtain device information corresponding to at least one hardware device currently connected to the BMC; the device information includes identification information corresponding to the hardware device and a PCIe interface connected to the hardware device;
基于与各硬件设备之间的通信连接,确定各硬件设备对应的目标通信链路;Based on the communication connection with each hardware device, determine the target communication link corresponding to each hardware device;
根据各硬件设备对应的设备信息与目标通信链路,生成硬件设备映射表;Generate a hardware device mapping table according to the device information corresponding to each hardware device and the target communication link;
基于硬件设备映射表,对各硬件设备进行管理。Based on the hardware device mapping table, each hardware device is managed.
本申请实施例提供的硬件设备管理方法,获取当前与BMC连接的至少一个硬件设备对应的设备信息;基于与各硬件设备之间的通信连接,确定各硬件设备对应的目标通信链路,保证了确定的各硬件设备对应的目标通信链路的准确性。根据各硬件设备对应的设备信息与目标通信链路,生成硬件设备映射表,保证了生成的硬件设备映射表的准确性,进而不需要人为在BMC中输入硬件设备映射表。基于硬件设备映射表,对各硬件设备进行管理。由于BMC可以根据当前与BMC连接各硬件设备对应的设备信息以及目标通信链路生成硬件设备映射表,因此,不会导致BMC无法通过切换I2C链路正确找到与BMC连接的硬件设备,从而造成BMC对PCIe接口卡设备无法识别、监控。The hardware device management method provided in the embodiment of the present application obtains the device information corresponding to at least one hardware device currently connected to the BMC; based on the communication connection between each hardware device, the target communication link corresponding to each hardware device is determined, thereby ensuring the accuracy of the target communication link corresponding to each determined hardware device. A hardware device mapping table is generated based on the device information and target communication link corresponding to each hardware device, thereby ensuring the accuracy of the generated hardware device mapping table, and thus there is no need to manually input the hardware device mapping table into the BMC. Based on the hardware device mapping table, each hardware device is managed. Since the BMC can generate a hardware device mapping table based on the device information corresponding to each hardware device currently connected to the BMC and the target communication link, it will not cause the BMC to be unable to correctly find the hardware device connected to the BMC by switching the I2C link, thereby causing the BMC to be unable to identify and monitor the PCIe interface card device.
在一种可选的实施方式中,基于与各硬件设备之间的通信连接,确定各硬件设备对应的目标通信链路,包括;In an optional implementation, determining a target communication link corresponding to each hardware device based on a communication connection with each hardware device includes:
获取BMC对应的多个可用通信链路;Get multiple available communication links corresponding to the BMC;
基于各可用通信链路发送是否在位检测信息;Sending presence detection information based on each available communication link;
当接收硬件设备发送的在位信息后,确定可用通信链路为硬件设备对应的目标通信链路。After receiving the presence information sent by the hardware device, it is determined that the available communication link is the target communication link corresponding to the hardware device.
本申请实施例提供的硬件设备管理方法,获取BMC对应的多个可用通信链路,基于各可用通信链路发送是否在位检测信息,从而使得在位的硬件设备可以接收到是否在位检测信息。当硬件设备接收到是否在位检测信息之后,可以向BMC反馈在位信息。当BMC接收硬件设备发送的在位信息后,确定可用通信链路为硬件设备对应的目标通信链路,从而保证了确定的硬件设备对应的目标通信链路的准确性。The hardware device management method provided in the embodiment of the present application obtains multiple available communication links corresponding to the BMC, and sends presence detection information based on each available communication link, so that the hardware device in place can receive the presence detection information. After the hardware device receives the presence detection information, the presence information can be fed back to the BMC. After the BMC receives the presence information sent by the hardware device, it determines that the available communication link is the target communication link corresponding to the hardware device, thereby ensuring the accuracy of the target communication link corresponding to the determined hardware device.
在一种可选的实施方式中,目标通信链路中包括硬件设备连接的PCIe接口,根据各硬件设备对应的设备信息与目标通信链路,生成硬件设备映射表,包括:In an optional implementation, the target communication link includes a PCIe interface to which the hardware device is connected, and a hardware device mapping table is generated according to device information corresponding to each hardware device and the target communication link, including:
根据各硬件设备对应的目标通信链路,生成通信链路拓扑结构;Generate a communication link topology structure according to the target communication link corresponding to each hardware device;
根据通信链路拓扑结构,生成硬件设备拓扑表;Generate a hardware device topology table based on the communication link topology structure;
根据各硬件设备对应的PCIe接口,将硬件设备对应的设备信息添加至硬件设备拓扑表,生成硬件设备映射表。According to the PCIe interface corresponding to each hardware device, the device information corresponding to the hardware device is added to the hardware device topology table to generate a hardware device mapping table.
本申请实施例提供的硬件设备管理方法,根据各硬件设备对应的目标通信链路,生成通信链路拓扑结构,保证了生成的通信链路拓扑结构的准确性,进而可以保证根据通信链路拓扑结构生成的硬件设备映射表的准确性。The hardware device management method provided in the embodiment of the present application generates a communication link topology structure according to the target communication link corresponding to each hardware device, thereby ensuring the accuracy of the generated communication link topology structure, and further ensuring the accuracy of the hardware device mapping table generated according to the communication link topology structure.
根据通信链路拓扑结构,生成硬件设备拓扑表,保证了生成的硬件设备拓扑表的准确性。根据各硬件设备对应的PCIe接口,将硬件设备对应的设备信息添加至硬件设备拓扑表,生成硬件设备映射表,保证了生成的硬件设备映射表的准确性。According to the communication link topology structure, a hardware device topology table is generated to ensure the accuracy of the generated hardware device topology table. According to the PCIe interface corresponding to each hardware device, the device information corresponding to the hardware device is added to the hardware device topology table to generate a hardware device mapping table to ensure the accuracy of the generated hardware device mapping table.
在一种可选的实施方式中,方法还包括:向用户展示硬件设备映射表,以检测硬件设备映射表是否准确。In an optional implementation, the method further includes: displaying the hardware device mapping table to the user to detect whether the hardware device mapping table is accurate.
本申请实施例提供的硬件设备管理方法,向用户展示硬件设备映射表,以检测硬件设备映射表是否准确,从而可以进一步保证生成的硬件设备映射表的准确性,进而保证基于硬件设备映射表,对各硬件设备进行管理的准确性。The hardware device management method provided in the embodiment of the present application displays the hardware device mapping table to the user to detect whether the hardware device mapping table is accurate, thereby further ensuring the accuracy of the generated hardware device mapping table, and then ensuring the accuracy of the management of each hardware device based on the hardware device mapping table.
在一种可选的实施方式中,方法还包括:In an optional embodiment, the method further includes:
检测是否存在与BMC连接的新增硬件设备;Check whether there are new hardware devices connected to the BMC;
当存在新增硬件设备时,确定新增硬件设备对应的新增通信链路;When there is a new hardware device, determine a new communication link corresponding to the new hardware device;
基于新增通信链路中对应的新增PCIe接口,检测是否接收到新增硬件设备对应的新增设备信息;Based on the newly added PCIe interface corresponding to the newly added communication link, detecting whether the newly added device information corresponding to the newly added hardware device is received;
当未接收到新增设备信息时,向与BMC连接的BIOS发送获取新增设备信息的消息;When no new device information is received, a message for obtaining the new device information is sent to the BIOS connected to the BMC;
接收BIOS发送的新增设备信息;Receive new device information sent by BIOS;
将新增通信链路和新增设备信息,添加至硬件设备映射表。Add the newly added communication link and the newly added device information to the hardware device mapping table.
本申请实施例提供的硬件设备管理方法,检测是否存在与BMC连接的新增硬件设备,从而使得BMC可以及时检测到新增硬件设备。当存在新增硬件设备时,确定新增硬件设备对应的新增通信链路,保证了确定的新增硬件设备对应的新增通信链路的准确性。基于新增通信链路中对应的新增PCIe接口,检测是否接收到新增硬件设备对应的新增设备信息。当未接收到新增设备信息时,向与BMC连接的BIOS发送获取新增设备信息的消息,接收BIOS发送的新增设备信息,将新增通信链路和新增设备信息,添加至硬件设备映射表。进而使得硬件设备映射表中包括新增硬件设备,不需要人为将新增硬件设备对应的新增通信链路和新增设备信息输入至BMC,进而可以保证基于硬件设备映射表对新增硬件设备进行管理。The hardware device management method provided in the embodiment of the present application detects whether there is a new hardware device connected to the BMC, so that the BMC can detect the new hardware device in time. When there is a new hardware device, the new communication link corresponding to the new hardware device is determined to ensure the accuracy of the new communication link corresponding to the determined new hardware device. Based on the corresponding new PCIe interface in the new communication link, detect whether the new device information corresponding to the new hardware device is received. When the new device information is not received, a message for obtaining the new device information is sent to the BIOS connected to the BMC, the new device information sent by the BIOS is received, and the new communication link and the new device information are added to the hardware device mapping table. Thereby, the new hardware device is included in the hardware device mapping table, and there is no need to manually input the new communication link and the new device information corresponding to the new hardware device into the BMC, thereby ensuring that the new hardware device is managed based on the hardware device mapping table.
在一种可选的实施方式中,基于硬件设备映射表,对各硬件设备进行管理,包括:In an optional implementation, each hardware device is managed based on the hardware device mapping table, including:
基于各目标通信链路向各硬件设备发送状态检测信息;Sending status detection information to each hardware device based on each target communication link;
当接收到硬件设备发送的反馈信息时,确定硬件设备处于正常工作状态;When receiving feedback information sent by the hardware device, determining that the hardware device is in a normal working state;
读取处于正常工作状态的正常硬件设备对应的第一标识信息;Reading first identification information corresponding to a normal hardware device in a normal working state;
在硬件设备映射表查询正常硬件设备对应的第二标识信息;Query the hardware device mapping table for second identification information corresponding to the normal hardware device;
将第一标识信息与第二标识信息进行对比;comparing the first identification information with the second identification information;
当第一标识信息与第二标识信息不一致时,利用第一标识信息替换第二标识信息;When the first identification information is inconsistent with the second identification information, the second identification information is replaced by the first identification information;
当未接收到硬件设备发送的反馈信息时,检测目标通信链路中除硬件设备外的其他通信设备是否正常;When no feedback information sent by the hardware device is received, detecting whether other communication devices except the hardware device in the target communication link are normal;
当其他通信设备正常时,确定硬件设备处于异常状态;When other communication devices are normal, it is determined that the hardware device is in an abnormal state;
从硬件设备映射表中查找处于异常状态的异常硬件设备对应的第三标识信息;Searching the hardware device mapping table for third identification information corresponding to the abnormal hardware device in the abnormal state;
基于第三标识信息,向用户输出告警信息。Based on the third identification information, warning information is output to the user.
本申请实施例提供的硬件设备管理方法,基于各目标通信链路向各硬件设备发送状态检测信息;当接收到硬件设备发送的反馈信息时,确定硬件设备处于正常工作状态,保证了确定的硬件设备处于正常工作状态的结果的准确性。读取处于正常工作状态的正常硬件设备对应的第一标识信息,在硬件设备映射表查询正常硬件设备对应的第二标识信息;将第一标识信息与第二标识信息进行对比;当第一标识信息与第二标识信息不一致时,利用第一标识信息替换第二标识信息,从而可以保证硬件设备映射表中正常硬件设备对应的第二标识信息的准确性。当未接收到硬件设备发送的反馈信息时,检测目标通信链路中除硬件设备外的其他通信设备是否正常,从而避免由于目标通信链路中除硬件设备外的其他通信设备发生异常导致未接收到硬件设备发送的反馈信息。当其他通信设备正常时,确定硬件设备处于异常状态,保证了确定的硬件设备处于异常状态的准确性。从硬件设备映射表中查找处于异常状态的异常硬件设备对应的第三标识信息;基于第三标识信息,向用户输出告警信息,使得用户可以接收到异常硬件设备对应的告警信息,且可以根据异常硬件设备对应的第三标识信息查找到异常硬件设备。The hardware device management method provided in the embodiment of the present application sends status detection information to each hardware device based on each target communication link; when the feedback information sent by the hardware device is received, it is determined that the hardware device is in a normal working state, thereby ensuring the accuracy of the result that the hardware device is in a normal working state. Read the first identification information corresponding to the normal hardware device in the normal working state, and query the second identification information corresponding to the normal hardware device in the hardware device mapping table; compare the first identification information with the second identification information; when the first identification information is inconsistent with the second identification information, replace the second identification information with the first identification information, thereby ensuring the accuracy of the second identification information corresponding to the normal hardware device in the hardware device mapping table. When the feedback information sent by the hardware device is not received, detect whether other communication devices other than the hardware device in the target communication link are normal, thereby avoiding the failure to receive the feedback information sent by the hardware device due to abnormalities in other communication devices other than the hardware device in the target communication link. When other communication devices are normal, it is determined that the hardware device is in an abnormal state, thereby ensuring the accuracy of the determined hardware device in an abnormal state. Search the hardware device mapping table for the third identification information corresponding to the abnormal hardware device in the abnormal state; based on the third identification information, output warning information to the user, so that the user can receive the warning information corresponding to the abnormal hardware device, and can find the abnormal hardware device according to the third identification information corresponding to the abnormal hardware device.
第二方面,本发明提供了一种硬件设备管理装置,应用于BMC,装置包括:In a second aspect, the present invention provides a hardware device management device, which is applied to BMC, and the device includes:
获取模块,用于获取当前与BMC连接的至少一个硬件设备对应的设备信息;设备信息中包括硬件设备对应的标识信息以及硬件设备连接的PCIe接口;An acquisition module, used to acquire device information corresponding to at least one hardware device currently connected to the BMC; the device information includes identification information corresponding to the hardware device and a PCIe interface connected to the hardware device;
第一确定模块,用于基于与各硬件设备之间的通信连接,确定各硬件设备对应的目标通信链路;A first determination module, configured to determine a target communication link corresponding to each hardware device based on a communication connection with each hardware device;
生成模块,用于根据各硬件设备对应的设备信息与目标通信链路,生成硬件设备映射表;A generation module, used to generate a hardware device mapping table according to device information corresponding to each hardware device and a target communication link;
管理模块,用于基于硬件设备映射表,对各硬件设备进行管理。The management module is used to manage various hardware devices based on the hardware device mapping table.
本申请实施例提供的硬件设备管理装置,获取当前与BMC连接的至少一个硬件设备对应的设备信息;基于与各硬件设备之间的通信连接,确定各硬件设备对应的目标通信链路,保证了确定的各硬件设备对应的目标通信链路的准确性。根据各硬件设备对应的设备信息与目标通信链路,生成硬件设备映射表,保证了生成的硬件设备映射表的准确性,进而不需要人为在BMC中输入硬件设备映射表。基于硬件设备映射表,对各硬件设备进行管理。由于BMC可以根据当前与BMC连接各硬件设备对应的设备信息以及目标通信链路生成硬件设备映射表,因此,不会导致BMC无法通过切换I2C链路正确找到与BMC连接的硬件设备,从而造成BMC对PCIe接口卡设备无法识别、监控。The hardware device management device provided in the embodiment of the present application obtains the device information corresponding to at least one hardware device currently connected to the BMC; based on the communication connection between each hardware device, the target communication link corresponding to each hardware device is determined, thereby ensuring the accuracy of the target communication link corresponding to each determined hardware device. A hardware device mapping table is generated based on the device information and target communication link corresponding to each hardware device, thereby ensuring the accuracy of the generated hardware device mapping table, and thus there is no need to manually input the hardware device mapping table into the BMC. Based on the hardware device mapping table, each hardware device is managed. Since the BMC can generate a hardware device mapping table based on the device information and target communication link corresponding to each hardware device currently connected to the BMC, it will not cause the BMC to be unable to correctly find the hardware device connected to the BMC by switching the I2C link, thereby causing the BMC to be unable to identify and monitor the PCIe interface card device.
第三方面,本发明提供了一种BMC,包括:存储器和处理器,存储器和处理器之间互相通信连接,存储器中存储有计算机指令,处理器通过执行计算机指令,从而执行上述第一方面或其对应的任一实施方式的硬件设备管理方法。In a third aspect, the present invention provides a BMC, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the hardware device management method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
第四方面,本发明提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机指令,计算机指令用于使计算机执行上述第一方面或其对应的任一实施方式的硬件设备管理方法。In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the hardware device management method of the first aspect or any corresponding embodiment thereof.
第五方面,本发明提供了一种计算机程序产品,包括计算机指令,计算机指令用于使计算机执行上述第一方面或其对应的任一实施方式的硬件设备管理方法。In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the hardware device management method of the first aspect or any corresponding embodiment thereof.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
图1是根据本发明实施例的网卡的连接方式的结构示意图;1 is a schematic diagram of the structure of a connection method of a network card according to an embodiment of the present invention;
图2是根据本发明实施例的硬件设备管理方法的流程示意图;2 is a schematic diagram of a process flow of a hardware device management method according to an embodiment of the present invention;
图3是根据本发明实施例的另一硬件设备管理方法的流程示意图;3 is a schematic flow chart of another hardware device management method according to an embodiment of the present invention;
图4是根据本发明实施例的BMC生成的硬件设备映射表;FIG4 is a hardware device mapping table generated by a BMC according to an embodiment of the present invention;
图5是根据本发明实施例的I2C switch芯片的出线号对应riser卡上的slot位置的示意图;5 is a schematic diagram of the slot positions on the riser card corresponding to the line numbers of the I2C switch chip according to an embodiment of the present invention;
图6是根据本发明实施例的硬件设备在机箱的丝印的示意图;6 is a schematic diagram of a silk screen of a hardware device on a chassis according to an embodiment of the present invention;
图7是根据本发明实施例的又一硬件设备管理方法的流程示意图;7 is a schematic flow chart of another hardware device management method according to an embodiment of the present invention;
图8是根据本发明实施例的再一硬件设备管理方法的流程示意图;8 is a schematic flow chart of yet another hardware device management method according to an embodiment of the present invention;
图9是根据本发明实施例的硬件设备管理装置的结构框图;9 is a block diagram of a hardware device management apparatus according to an embodiment of the present invention;
图10是本发明实施例的BMC的硬件结构示意图。FIG. 10 is a schematic diagram of the hardware structure of the BMC according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
PCIE(Peripheral Component Interconnect Express)在服务器应用中扮演着重要的角色。PCIE是一种高速串行总线标准,用于连接计算机内部的各种硬件设备,如显卡、网卡、存储控制器等。在服务器领域,PCIE被广泛应用于以下几个方面:PCIE (Peripheral Component Interconnect Express) plays an important role in server applications. PCIE is a high-speed serial bus standard used to connect various hardware devices inside the computer, such as graphics cards, network cards, storage controllers, etc. In the server field, PCIE is widely used in the following aspects:
(1)扩展插槽:服务器通常需要支持多个扩展卡,如网络适配器、存储控制器、加密卡等。PCIE提供了高带宽和低延迟的连接方式,可以满足服务器对各种扩展卡的需求。(1) Expansion slots: Servers usually need to support multiple expansion cards, such as network adapters, storage controllers, encryption cards, etc. PCIE provides a high-bandwidth and low-latency connection method to meet the server's needs for various expansion cards.
(2)存储和加速卡:随着数据量的不断增长,服务器对存储容量和速度的要求也越来越高。PCIE接口可以连接高速固态硬盘(SSD)和闪存卡等存储设备,实现快速的数据传输。此外,PCIE还可以连接加速卡,如图像处理器、加密解密卡等,提升服务器的计算和处理能力。(2) Storage and acceleration cards: As the amount of data continues to grow, servers have higher and higher requirements for storage capacity and speed. The PCIE interface can connect to storage devices such as high-speed solid-state drives (SSDs) and flash cards to achieve fast data transmission. In addition, PCIE can also connect to acceleration cards such as image processors and encryption and decryption cards to improve the computing and processing capabilities of the server.
(3)GPU加速:在大规模数据处理和科学计算领域,服务器常常需要使用图形处理器(GPU)进行并行计算。PCIE接口为GPU提供了高带宽和低延迟的连接通道,实现与主处理器的协同工作,提升计算性能。(3) GPU acceleration: In the field of large-scale data processing and scientific computing, servers often need to use graphics processing units (GPUs) for parallel computing. The PCIE interface provides a high-bandwidth and low-latency connection channel for the GPU, enabling it to work in coordination with the main processor and improve computing performance.
PCIE在服务器应用中起到了连接和扩展各种硬件设备的关键作用,提供了高速、可靠的数据传输通道,满足了服务器对性能和扩展性的需求。PCIE plays a key role in connecting and expanding various hardware devices in server applications, providing a high-speed, reliable data transmission channel and meeting the server's requirements for performance and scalability.
例如在云存储时代,海量数据传输需要占用超大的带宽,更需要用到大量的高性能的网卡设备。为了更好的监视和控制这些网卡,网卡设备往往提供了带内、带外等管理方式,如支持ncsi over mctp over smbus的功能以供带外管理,支持ncsi over rmii的功能以供带内管理,通过NSCI命令对网卡进行查询和配置。BMC就是通过带外方式管理PCIe接口卡类的设备的。For example, in the era of cloud storage, massive data transmission requires a large bandwidth, and a large number of high-performance network card devices are needed. In order to better monitor and control these network cards, network card devices often provide in-band and out-of-band management methods, such as supporting ncsi over mctp over smbus for out-of-band management, supporting ncsi over rmii for in-band management, and querying and configuring network cards through NSCI commands. BMC manages PCIe interface card devices in an out-of-band manner.
如图1所示,为网卡的连接方式。槽网卡物理连接是插接在存储设备的riser卡上的PCIe接口里,PCIe接口中有smbus连线与网卡相连,BMC通过I2C switch器件与riser卡相连,riser卡再通过I2C switch器件,与网卡相连。As shown in Figure 1, this is the connection method of the network card. The physical connection of the slot network card is plugged into the PCIe interface on the riser card of the storage device. The PCIe interface has an SMBus connection connected to the network card, the BMC is connected to the riser card through the I2C switch device, and the riser card is connected to the network card through the I2C switch device.
当前采取的方式是BMC获取BIOS发送的PCIe设备信息,得到一个PCIe设备信息的列表,内含PCIe设备VendorID、DeviceID、PCIE_unique_id等信息。BMC则根据PCIE_unique_id在内部代码中查表获取带外访问网卡信息的I2C通路进行访问,并尝试读信息,读取返回正确即认为网卡存在。The current method is that BMC obtains the PCIe device information sent by BIOS and obtains a list of PCIe device information, including PCIe device VendorID, DeviceID, PCIE_unique_id, etc. BMC then looks up the table in the internal code based on PCIE_unique_id to obtain the I2C channel for out-of-band access to the network card information and tries to read the information. If the read returns correct, it is considered that the network card exists.
但是在实际应用过程中,BMC对于卡的识别的所有操作都是内化到程序中的,只要电路、接线、器件(比如riser卡)发生了变化,都有可能使原有的映射关系发生变化,导致BMC无法通过切换I2C链路正确找到PCIe接口卡设备,从而造成BMC对PCIe接口卡设备无法识别、监控。However, in actual application, all operations of BMC for card identification are internalized into the program. As long as the circuit, wiring, and devices (such as riser card) change, the original mapping relationship may change, resulting in the BMC being unable to correctly find the PCIe interface card device by switching the I2C link, resulting in the BMC being unable to identify and monitor the PCIe interface card device.
需要说明的是,本申请实施例提供的硬件设备管理的方法,其执行主体可以是硬件设备管理的装置,该硬件设备管理的装置可以通过软件、硬件或者软硬件结合的方式实现成为BMC的部分或者全部,其中,该BMC可以是服务器或者终端,其中,本申请实施例中的服务器可以为一台服务器,也可以为由多台服务器组成的服务器集群,本申请实施例中的终端可以是智能手机、个人电脑、平板电脑、可穿戴设备以及智能机器人等其他智能硬件设备。下述方法实施例中,均以执行主体是电子设备为例来进行说明。It should be noted that the execution subject of the method for hardware device management provided in the embodiment of the present application can be a device for hardware device management, and the device for hardware device management can be implemented as part or all of the BMC through software, hardware, or a combination of software and hardware, wherein the BMC can be a server or a terminal, wherein the server in the embodiment of the present application can be a single server or a server cluster composed of multiple servers, and the terminal in the embodiment of the present application can be a smart phone, a personal computer, a tablet computer, a wearable device, an intelligent robot, and other intelligent hardware devices. In the following method embodiments, the execution subject is an electronic device as an example for explanation.
根据本发明实施例,提供了一种硬件设备管理方法实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。According to an embodiment of the present invention, a hardware device management method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
在本实施例中提供了一种硬件设备管理方法,可用于上述的BMC,图2是根据本发明实施例的硬件设备管理方法的流程图,如图2所示,该流程包括如下步骤:In this embodiment, a hardware device management method is provided, which can be used for the above-mentioned BMC. FIG. 2 is a flow chart of the hardware device management method according to an embodiment of the present invention. As shown in FIG. 2 , the process includes the following steps:
步骤S101,获取当前与BMC连接的至少一个硬件设备对应的设备信息。Step S101: acquiring device information corresponding to at least one hardware device currently connected to the BMC.
其中,设备信息中包括硬件设备对应的标识信息以及硬件设备连接的PCIe接口。The device information includes identification information corresponding to the hardware device and the PCIe interface to which the hardware device is connected.
其中,硬件设备的标识信息可以包括:硬件设备对应的VendorID、PCIE_device_id、Riser_type、PCIE_mark_id等标识信息。其中,Vendor ID是一个由PCI-SIG(PCISpecial Interest Group)分配给硬件制造商的16位标识符。它用于唯一地标识硬件设备的制造商。每个厂商都有自己独特的Vendor ID。PCIE_device_id是由硬件设备制造商分配的16位标识符,用于唯一地标识硬件设备本身。相同厂商的不同设备将具有不同的PCIE_device_id。Riser_type是PCIe硬件设备插在机器上槽座部件,PCIE_mark_id是硬件设备在机箱的丝印。Among them, the identification information of the hardware device may include: the VendorID, PCIE_device_id, Riser_type, PCIE_mark_id and other identification information corresponding to the hardware device. Among them, the Vendor ID is a 16-bit identifier assigned to the hardware manufacturer by the PCI-SIG (PCI Special Interest Group). It is used to uniquely identify the manufacturer of the hardware device. Each manufacturer has its own unique Vendor ID. PCIE_device_id is a 16-bit identifier assigned by the hardware device manufacturer to uniquely identify the hardware device itself. Different devices from the same manufacturer will have different PCIE_device_id. Riser_type is the slot component of the PCIe hardware device inserted into the machine, and PCIE_mark_id is the silk screen of the hardware device on the chassis.
具体地,BMC可以接收BIOS发送的当前与BMC连接的至少一个硬件设备对应的设备信息,也可以接收其他设备发送的当前与BMC连接的至少一个硬件设备对应的设备信息,还可以接收用户输入的当前与BMC连接的至少一个硬件设备对应的设备信息。Specifically, the BMC can receive device information corresponding to at least one hardware device currently connected to the BMC sent by the BIOS, or can receive device information corresponding to at least one hardware device currently connected to the BMC sent by other devices, or can receive device information corresponding to at least one hardware device currently connected to the BMC input by a user.
本申请实施例对BMC获取当前与BMC连接的至少一个硬件设备对应的设备信息的方式不做具体限定。The embodiment of the present application does not specifically limit the manner in which the BMC obtains the device information corresponding to at least one hardware device currently connected to the BMC.
步骤S102,基于与各硬件设备之间的通信连接,确定各硬件设备对应的目标通信链路。Step S102: determining a target communication link corresponding to each hardware device based on the communication connection with each hardware device.
具体地,BMC可以基于与各硬件设备之间的通信连接,向各硬件设备发送检测信息,基于检测结果,确定各硬件设备对应的目标通信链路。Specifically, the BMC may send detection information to each hardware device based on the communication connection between the BMC and each hardware device, and determine the target communication link corresponding to each hardware device based on the detection result.
关于该步骤将在下文进行详细介绍。This step will be described in detail below.
步骤S103,根据各硬件设备对应的设备信息与目标通信链路,生成硬件设备映射表。Step S103: Generate a hardware device mapping table according to the device information corresponding to each hardware device and the target communication link.
具体地,BMC在确定了各硬件设备对应的设备信息与目标通信链路之后,BMC可以根据各硬件设备对应的设备信息与目标通信链路之间的对应关系,生成硬件设备映射表。Specifically, after the BMC determines the device information corresponding to each hardware device and the target communication link, the BMC may generate a hardware device mapping table according to the corresponding relationship between the device information corresponding to each hardware device and the target communication link.
关于该步骤将在下文进行详细介绍。This step will be described in detail below.
步骤S104,基于硬件设备映射表,对各硬件设备进行管理。Step S104: managing each hardware device based on the hardware device mapping table.
具体地,BMC可以基于硬件设备映射表确定各硬件设备对应的链路连接关系,然后,根据各硬件设备对应的链路连接关系,对各硬件设备进行管理,并在发生异常情况时,可以输出告警信息。Specifically, the BMC may determine the link connection relationship corresponding to each hardware device based on the hardware device mapping table, and then manage each hardware device according to the link connection relationship corresponding to each hardware device, and may output alarm information when an abnormal situation occurs.
关于该步骤将在下文进行详细介绍。This step will be described in detail below.
本实施例提供的硬件设备管理方法,获取当前与BMC连接的至少一个硬件设备对应的设备信息;基于与各硬件设备之间的通信连接,确定各硬件设备对应的目标通信链路,保证了确定的各硬件设备对应的目标通信链路的准确性。根据各硬件设备对应的设备信息与目标通信链路,生成硬件设备映射表,保证了生成的硬件设备映射表的准确性,进而不需要人为在BMC中输入硬件设备映射表。基于硬件设备映射表,对各硬件设备进行管理。由于BMC可以根据当前与BMC连接各硬件设备对应的设备信息以及目标通信链路生成硬件设备映射表,因此,不会导致BMC无法通过切换I2C链路正确找到与BMC连接的硬件设备,从而造成BMC对PCIe接口卡设备无法识别、监控。The hardware device management method provided in this embodiment obtains the device information corresponding to at least one hardware device currently connected to the BMC; based on the communication connection between each hardware device, the target communication link corresponding to each hardware device is determined, thereby ensuring the accuracy of the target communication link corresponding to each determined hardware device. A hardware device mapping table is generated based on the device information and target communication link corresponding to each hardware device, thereby ensuring the accuracy of the generated hardware device mapping table, and thus there is no need to manually input the hardware device mapping table into the BMC. Based on the hardware device mapping table, each hardware device is managed. Since the BMC can generate a hardware device mapping table based on the device information corresponding to each hardware device currently connected to the BMC and the target communication link, it will not cause the BMC to be unable to correctly find the hardware device connected to the BMC by switching the I2C link, thereby causing the BMC to be unable to identify and monitor the PCIe interface card device.
在本实施例中提供了一种硬件设备管理方法,可用于上述的BMC,图3是根据本发明实施例的硬件设备管理方法的流程图,如图3所示,该流程包括如下步骤:In this embodiment, a hardware device management method is provided, which can be used for the above-mentioned BMC. FIG. 3 is a flowchart of the hardware device management method according to an embodiment of the present invention. As shown in FIG. 3 , the process includes the following steps:
步骤S201,获取当前与BMC连接的至少一个硬件设备对应的设备信息。Step S201: Acquire device information corresponding to at least one hardware device currently connected to the BMC.
关于该步骤请参见图3对步骤S101的介绍,在此不进行赘述。For details about this step, please refer to the introduction of step S101 in FIG3 , which will not be described in detail here.
步骤S202,基于与各硬件设备之间的通信连接,确定各硬件设备对应的目标通信链路。Step S202: determining a target communication link corresponding to each hardware device based on the communication connection with each hardware device.
具体地,上述步骤S202,可以包括如下步骤:Specifically, the above step S202 may include the following steps:
步骤S2021,获取BMC对应的多个可用通信链路。Step S2021, obtaining multiple available communication links corresponding to the BMC.
具体地,BMC可以接收用户输入的BMC对应的多个可用通信链路,也可以接收其他设备发送的BMC对应的多个可用通信链路。Specifically, the BMC may receive multiple available communication links corresponding to the BMC input by a user, or may receive multiple available communication links corresponding to the BMC sent by other devices.
其中,BMC对应的多个可用通信链路中可以包括BMC中的各个I2C接口连接的I2Cswitch芯片的情况,一个各I2C switch芯片与riser卡的连接关系。The multiple available communication links corresponding to the BMC may include situations of I2C switch chips connected to each I2C interface in the BMC, and connection relationships between each I2C switch chip and a riser card.
示例性的,如图1所示,多个可用通信链路可以是从BMC的I2C接口4,连接到I2Cswitch芯片1,然后从I2C switch芯片1的I2C接口4,连接到A区riser卡1;然后,A区riser卡1对应的PCIe接口可以连接各硬件设备;从BMC的I2C接口4,连接到I2C switch芯片1,然后从I2C switch芯片1的I2C接口6,连接到B区riser卡1;然后,B区riser卡1对应的PCIe接口可以连接各硬件设备;从BMC的I2C接口6,连接到I2C switch芯片2,然后从I2Cswitch芯片2的I2C接口4,连接到D区riser卡1;然后,D区riser卡1对应的PCIe接口可以连接各硬件设备。Exemplarily, as shown in FIG1 , multiple available communication links may be connected from the I2C interface 4 of the BMC to the I2C switch chip 1, and then from the I2C interface 4 of the I2C switch chip 1 to the riser card 1 in zone A; then, the PCIe interface corresponding to the riser card 1 in zone A may be connected to various hardware devices; from the I2C interface 4 of the BMC to the I2C switch chip 1, and then from the I2C interface 6 of the I2C switch chip 1 to the riser card 1 in zone B; then, the PCIe interface corresponding to the riser card 1 in zone B may be connected to various hardware devices; from the I2C interface 6 of the BMC to the I2C switch chip 2, and then from the I2C interface 4 of the I2C switch chip 2 to the riser card 1 in zone D; then, the PCIe interface corresponding to the riser card 1 in zone D may be connected to various hardware devices.
可选的,BMC也可以接收用户输入的BMC对应的通信链路框架,该通信链路框架中可以包括与BMC连接的至少一个I2C switch芯片,还有与各I2Cswitch芯片连接的至少一个riser卡。BMC对通信链路框架进行识别,确定多个可用通信链路。Optionally, the BMC may also receive a communication link framework corresponding to the BMC input by a user, wherein the communication link framework may include at least one I2C switch chip connected to the BMC and at least one riser card connected to each I2C switch chip. The BMC identifies the communication link framework and determines multiple available communication links.
其中,BMC对应的通信链路框架可以是:BMC的I2C接口4与I2C switch芯片1连接,I2C switch芯片1的I2C接口4与连接A区riser卡1连接;BMC的I2C接口4与I2C switch芯片1,I2C switch芯片1的I2C接口6与B区riser卡1;BMC的I2C接口6与I2C switch芯片2,I2Cswitch芯片2的I2C接口4与D区riser卡1连接。Among them, the communication link framework corresponding to the BMC can be: the I2C interface 4 of the BMC is connected to the I2C switch chip 1, and the I2C interface 4 of the I2C switch chip 1 is connected to the riser card 1 of the A area; the I2C interface 4 of the BMC is connected to the I2C switch chip 1, and the I2C interface 6 of the I2C switch chip 1 is connected to the riser card 1 of the B area; the I2C interface 6 of the BMC is connected to the I2C switch chip 2, and the I2C interface 4 of the I2C switch chip 2 is connected to the riser card 1 of the D area.
步骤S2022,基于各可用通信链路发送是否在位检测信息。Step S2022: Send presence detection information based on each available communication link.
具体地,电子设备可以基于各可用通信链路发送是否在位检测信息。Specifically, the electronic device may send presence detection information based on each available communication link.
步骤S2023,当接收硬件设备发送的在位信息后,确定可用通信链路为硬件设备对应的目标通信链路。Step S2023: after receiving the presence information sent by the hardware device, determining that the available communication link is the target communication link corresponding to the hardware device.
具体地,当接收硬件设备发送的在位信息后,确定可用通信链路为硬件设备对应的目标通信链路。Specifically, after receiving the presence information sent by the hardware device, it is determined that the available communication link is the target communication link corresponding to the hardware device.
示例性的,BMC基于BMC的I2C接口4向I2C switch芯片1发送是否在位检测信息,然后通过I2C switch芯片1的I2C接口4发送到A区riser卡1,然后通过A区riser卡的接口1发送至网卡1,网卡1向BMC发送在位信息,当接收网卡1发送的在位信息后,BMC确定这个可用通信链路为网卡1对应的目标通信链路。Exemplarily, the BMC sends presence detection information to the I2C switch chip 1 based on the I2C interface 4 of the BMC, and then sends it to the riser card 1 in area A through the I2C interface 4 of the I2C switch chip 1, and then sends it to the network card 1 through the interface 1 of the riser card in area A. The network card 1 sends presence information to the BMC. After receiving the presence information sent by the network card 1, the BMC determines that this available communication link is the target communication link corresponding to the network card 1.
步骤S203,根据各硬件设备对应的设备信息与目标通信链路,生成硬件设备映射表。Step S203: Generate a hardware device mapping table according to the device information corresponding to each hardware device and the target communication link.
具体地,上述步骤S203,可以包括如下步骤:Specifically, the above step S203 may include the following steps:
步骤S2031,根据各硬件设备对应的目标通信链路,生成通信链路拓扑结构。Step S2031: Generate a communication link topology structure according to the target communication link corresponding to each hardware device.
具体地,在获取到各硬件设备对应的目标通信链路之后,BMC可以根据各硬件设备对应的目标通信链路,确定通信设备之间的通信需求和连接关系,然后根据通信设备之间的通信需求和连接关系生成通信链路拓扑结构。Specifically, after obtaining the target communication link corresponding to each hardware device, the BMC can determine the communication requirements and connection relationships between the communication devices according to the target communication link corresponding to each hardware device, and then generate a communication link topology structure according to the communication requirements and connection relationships between the communication devices.
步骤S2032,根据通信链路拓扑结构,生成硬件设备拓扑表。Step S2032: Generate a hardware device topology table according to the communication link topology structure.
具体地,BMC可以根据通信链路拓扑结构以及通信链路拓扑结构中各通信设备对应的标识信息,生成硬件设备拓扑表。Specifically, the BMC may generate a hardware device topology table according to the communication link topology structure and identification information corresponding to each communication device in the communication link topology structure.
步骤S2033,根据各硬件设备对应的PCIe接口,将硬件设备对应的设备信息添加至硬件设备拓扑表,生成硬件设备映射表。Step S2033: According to the PCIe interface corresponding to each hardware device, the device information corresponding to the hardware device is added to the hardware device topology table to generate a hardware device mapping table.
具体地,在生成硬件设备拓扑表之后,BMC可以根据各硬件设备对应的PCIe接口,在各硬件设备对应的设备信息中查找各硬件设备对应的标识信息。Specifically, after generating the hardware device topology table, the BMC may search for identification information corresponding to each hardware device in device information corresponding to each hardware device according to the PCIe interface corresponding to each hardware device.
然后,将硬件设备对应的标识信息添加至硬件设备拓扑表,生成硬件设备映射表。Then, the identification information corresponding to the hardware device is added to the hardware device topology table to generate a hardware device mapping table.
其中,硬件设备的标识信息可以包括:硬件设备对应的VendorID、PCIE_device_id、Riser_type、PCIE_mark_id等标识信息。其中,Vendor ID是一个由PCI-SIG(PCISpecial Interest Group)分配给硬件制造商的16位标识符。它用于唯一地标识硬件设备的制造商。每个厂商都有自己独特的Vendor ID。PCIE_device_id是由硬件设备制造商分配的16位标识符,用于唯一地标识硬件设备本身。相同厂商的不同设备将具有不同的PCIE_device_id。Riser_type是PCIe硬件设备插在机器上槽座部件,它对I2C switch切换地址有影响,不同的riser卡其I2C switch bus的排列顺序不一样。PCIE_mark_id是硬件设备在机箱的丝印。Among them, the identification information of the hardware device may include: the identification information such as the VendorID, PCIE_device_id, Riser_type, PCIE_mark_id corresponding to the hardware device. Among them, the Vendor ID is a 16-bit identifier assigned to the hardware manufacturer by the PCI-SIG (PCI Special Interest Group). It is used to uniquely identify the manufacturer of the hardware device. Each manufacturer has its own unique Vendor ID. PCIE_device_id is a 16-bit identifier assigned by the hardware device manufacturer to uniquely identify the hardware device itself. Different devices from the same manufacturer will have different PCIE_device_id. Riser_type is the slot component of the PCIe hardware device inserted into the machine. It affects the I2C switch switching address. Different riser cards have different arrangement orders of the I2C switch bus. PCIE_mark_id is the silk screen of the hardware device on the chassis.
示例性的,如图4所示为BMC生成的硬件设备映射表。其中PCIE_device_id是由硬件设备制造商分配的16位标识符,用于唯一地标识硬件设备本身;PCIE_unique_id是BIOS识别到的硬件设备连接的PCIe接口的唯一标识,由PCIE线路实际接到机箱的丝印位置情况获得。Riser_type是PCIe硬件设备插在机器上槽座部件。For example, as shown in FIG4 , the hardware device mapping table generated by the BMC is shown. PCIE_device_id is a 16-bit identifier assigned by the hardware device manufacturer, which is used to uniquely identify the hardware device itself; PCIE_unique_id is the unique identifier of the PCIe interface connected to the hardware device identified by the BIOS, which is obtained from the silkscreen position of the PCIE line actually connected to the chassis. Riser_type is the slot component of the PCIe hardware device inserted into the machine.
I2C_bus、I2C_first_switch、I2C_second_switch是目标通信链路的地址,当通信链路拓扑结构中只存在两级switch芯片结构,所以取了三个变量。I2C_bus是BMC的I2C出线bus号连接到一级I2C switch芯片,一级I2C switch芯片的出线号I2C_first_switch连接到riser卡上的I2C switch芯片。如图5所示,是riser卡上的I2C switch芯片的出线号I2C_second_switch对应riser卡上的slot位置。示例性的,如图6所示,为硬件设备在机箱的丝印的示意图。图中所示,A区PCIE0槽上的raid卡与riser卡的上PCIE接口3连接;PCIE1槽上的raid卡与riser卡的上PCIE接口2连接;PCIE0槽上的raid卡与riser卡的上PCIE接口3连接。I2C_bus, I2C_first_switch, and I2C_second_switch are the addresses of the target communication link. When there are only two levels of switch chip structures in the communication link topology, three variables are taken. I2C_bus is the I2C output bus number of the BMC connected to the first-level I2C switch chip, and the output line number I2C_first_switch of the first-level I2C switch chip is connected to the I2C switch chip on the riser card. As shown in Figure 5, the output line number I2C_second_switch of the I2C switch chip on the riser card corresponds to the slot position on the riser card. Exemplarily, as shown in Figure 6, it is a schematic diagram of the silk screen of the hardware device in the chassis. As shown in the figure, the raid card on the PCIE0 slot of area A is connected to the upper PCIE interface 3 of the riser card; the raid card on the PCIE1 slot is connected to the upper PCIE interface 2 of the riser card; the raid card on the PCIE0 slot is connected to the upper PCIE interface 3 of the riser card.
BMC在要得到PCIE0槽上的raid卡信息,可以通过I2C访问bus总线地址I2C-4上的I2C switch控制器,再将一级I2C switch器件PCA9548切换至通道1来访问二级I2C switch控制器,再将二级I2C switch器件PCA9546切换至通道3,在BMC和PCIe器件之前形成I2C通路。I2C链路与raid卡形成通路后,设置raid卡通过mctp协议读取raid卡版本信息,确认raid卡类型正确,读取raid卡工作状态和硬盘信息,完成带外管理。To obtain the information of the raid card on the PCIE0 slot, the BMC can access the I2C switch controller on the bus address I2C-4 through I2C, then switch the primary I2C switch device PCA9548 to channel 1 to access the secondary I2C switch controller, and then switch the secondary I2C switch device PCA9546 to channel 3 to form an I2C path between the BMC and the PCIe device. After the I2C link forms a path with the raid card, set the raid card to read the raid card version information through the mctp protocol, confirm that the raid card type is correct, read the raid card working status and hard disk information, and complete out-of-band management.
步骤S2034,向用户展示硬件设备映射表,以检测硬件设备映射表是否准确。Step S2034: display the hardware device mapping table to the user to detect whether the hardware device mapping table is accurate.
具体地,BMC可以基于与显示设备之间的连接,通过显示设备向用户展示硬件设备映射表,从而使得用户可以检测硬件设备映射表是否准确,进而可以根据用户指令修改硬件设备映射表中不正确的信息,保证硬件设备映射表的准确性。Specifically, the BMC can display the hardware device mapping table to the user through the display device based on the connection with the display device, so that the user can detect whether the hardware device mapping table is accurate, and then modify incorrect information in the hardware device mapping table according to user instructions to ensure the accuracy of the hardware device mapping table.
步骤S204,基于硬件设备映射表,对各硬件设备进行管理。Step S204: managing each hardware device based on the hardware device mapping table.
关于该步骤请参见图2对步骤S104的介绍,在此不进行赘述。For details about this step, please refer to the description of step S104 in FIG. 2 , which will not be described in detail here.
本申请实施例提供的硬件设备管理方法,获取BMC对应的多个可用通信链路,基于各可用通信链路发送是否在位检测信息,从而使得在位的硬件设备可以接收到是否在位检测信息。当硬件设备接收到是否在位检测信息之后,可以向BMC反馈在位信息。当BMC接收硬件设备发送的在位信息后,确定可用通信链路为硬件设备对应的目标通信链路,从而保证了确定的硬件设备对应的目标通信链路的准确性。The hardware device management method provided in the embodiment of the present application obtains multiple available communication links corresponding to the BMC, and sends presence detection information based on each available communication link, so that the hardware device in place can receive the presence detection information. After the hardware device receives the presence detection information, the presence information can be fed back to the BMC. After the BMC receives the presence information sent by the hardware device, it determines that the available communication link is the target communication link corresponding to the hardware device, thereby ensuring the accuracy of the target communication link corresponding to the determined hardware device.
然后,根据各硬件设备对应的目标通信链路,生成通信链路拓扑结构,保证了生成的通信链路拓扑结构的准确性,进而可以保证根据通信链路拓扑结构生成的硬件设备映射表的准确性。Then, a communication link topology structure is generated according to the target communication link corresponding to each hardware device, thereby ensuring the accuracy of the generated communication link topology structure, and further ensuring the accuracy of the hardware device mapping table generated according to the communication link topology structure.
根据通信链路拓扑结构,生成硬件设备拓扑表,保证了生成的硬件设备拓扑表的准确性。根据各硬件设备对应的PCIe接口,将硬件设备对应的设备信息添加至硬件设备拓扑表,生成硬件设备映射表,保证了生成的硬件设备映射表的准确性。According to the communication link topology structure, a hardware device topology table is generated to ensure the accuracy of the generated hardware device topology table. According to the PCIe interface corresponding to each hardware device, the device information corresponding to the hardware device is added to the hardware device topology table to generate a hardware device mapping table to ensure the accuracy of the generated hardware device mapping table.
此外,BMC还可以向用户展示硬件设备映射表,以检测硬件设备映射表是否准确,从而可以进一步保证生成的硬件设备映射表的准确性,进而保证基于硬件设备映射表,对各硬件设备进行管理的准确性。In addition, the BMC can also display the hardware device mapping table to the user to detect whether the hardware device mapping table is accurate, thereby further ensuring the accuracy of the generated hardware device mapping table, and further ensuring the accuracy of the management of each hardware device based on the hardware device mapping table.
在本实施例中提供了一种硬件设备管理方法,可用于上述的BMC,图7是根据本发明实施例的硬件设备管理方法的流程图,如图7所示,该流程包括如下步骤:In this embodiment, a hardware device management method is provided, which can be used for the above-mentioned BMC. FIG. 7 is a flowchart of the hardware device management method according to an embodiment of the present invention. As shown in FIG. 7 , the process includes the following steps:
步骤S301,获取当前与BMC连接的至少一个硬件设备对应的设备信息。Step S301: Acquire device information corresponding to at least one hardware device currently connected to the BMC.
关于该步骤请参见图3对步骤S201的介绍,在此不进行赘述。For the description of this step, please refer to the description of step S201 in FIG3 , which will not be described in detail here.
步骤S302,基于与各硬件设备之间的通信连接,确定各硬件设备对应的目标通信链路。Step S302: determining a target communication link corresponding to each hardware device based on the communication connection with each hardware device.
关于该步骤请参见图3对步骤S202的介绍,在此不进行赘述。For details about this step, please refer to the introduction of step S202 in FIG3 , which will not be described in detail here.
步骤S303,根据各硬件设备对应的设备信息与目标通信链路,生成硬件设备映射表。Step S303: Generate a hardware device mapping table according to the device information corresponding to each hardware device and the target communication link.
关于该步骤请参见图3对步骤S203的介绍,在此不进行赘述。For details about this step, please refer to the introduction of step S203 in FIG3 , which will not be described in detail here.
步骤S304,基于硬件设备映射表,对各硬件设备进行管理。Step S304: managing each hardware device based on the hardware device mapping table.
具体地,上述步骤S304,可以包括如下步骤:Specifically, the above step S304 may include the following steps:
步骤S3041,基于各目标通信链路向各硬件设备发送状态检测信息。Step S3041: Send status detection information to each hardware device based on each target communication link.
具体地,BMC可以基于各目标通信链路向各硬件设备发送状态检测信息。Specifically, the BMC may send status detection information to each hardware device based on each target communication link.
步骤S3042,当接收到硬件设备发送的反馈信息时,确定硬件设备处于正常工作状态。Step S3042: When feedback information sent by the hardware device is received, it is determined that the hardware device is in a normal working state.
具体地,当硬件设备接收到BMC发送的状态检测信息之后,硬件设备可以向BMC发送反馈信息。当BMC接收到硬件设备发送的反馈信息时,确定硬件设备处于正常工作状态。Specifically, after the hardware device receives the status detection information sent by the BMC, the hardware device may send feedback information to the BMC. When the BMC receives the feedback information sent by the hardware device, it determines that the hardware device is in a normal working state.
步骤S3043,读取处于正常工作状态的正常硬件设备对应的第一标识信息。Step S3043, reading the first identification information corresponding to the normal hardware device in the normal working state.
可选的,BMC可以向正常硬件设备发送获取标识信息指令,然后接收正常硬件设备发送的正常硬件设备对应的第一标识信息。然后,BMC读取处于正常工作状态的正常硬件设备对应的第一标识信息。Optionally, the BMC may send an instruction to obtain identification information to the normal hardware device, and then receive the first identification information corresponding to the normal hardware device sent by the normal hardware device. Then, the BMC reads the first identification information corresponding to the normal hardware device in a normal working state.
可选的,BMC还可以接收用户输入或者其他设备发送的正常工作状态的正常硬件设备对应的第一标识信息,然后读取第一标识信息。Optionally, the BMC may also receive first identification information corresponding to a normal hardware device in a normal working state input by a user or sent by other devices, and then read the first identification information.
步骤S3044,在硬件设备映射表查询正常硬件设备对应的第二标识信息。Step S3044: query the hardware device mapping table for the second identification information corresponding to the normal hardware device.
具体地,BMC还可以在硬件设备映射表查询正常硬件设备对应的第二标识信息。Specifically, the BMC may also query the hardware device mapping table for the second identification information corresponding to the normal hardware device.
步骤S3045,将第一标识信息与第二标识信息进行对比。Step S3045: compare the first identification information with the second identification information.
具体地,BMC将正常硬件设备对应的第一标识信息与第二标识信息进行对比。Specifically, the BMC compares the first identification information corresponding to the normal hardware device with the second identification information.
步骤S3046,当第一标识信息与第二标识信息不一致时,利用第一标识信息替换第二标识信息。Step S3046: When the first identification information is inconsistent with the second identification information, the second identification information is replaced by the first identification information.
具体地,当第一标识信息与第二标识信息不一致时,利用第一标识信息替换第二标识信息。Specifically, when the first identification information is inconsistent with the second identification information, the second identification information is replaced by the first identification information.
步骤S3047,当未接收到硬件设备发送的反馈信息时,检测目标通信链路中除硬件设备外的其他通信设备是否正常。Step S3047: When no feedback information sent by the hardware device is received, it is detected whether other communication devices except the hardware device in the target communication link are normal.
具体地,当未接收到硬件设备发送的反馈信息时,BMC可以基于与目标通信链路中除硬件设备外的其他通信设备之间的通信连接,检测目标通信链路中除硬件设备外的其他通信设备是否正常。Specifically, when the feedback information sent by the hardware device is not received, the BMC may detect whether other communication devices in the target communication link except the hardware device are normal based on the communication connection with other communication devices in the target communication link except the hardware device.
步骤S3048,当其他通信设备正常时,确定硬件设备处于异常状态。Step S3048: When other communication devices are normal, it is determined that the hardware device is in an abnormal state.
具体地,当其他通信设备正常时,确定硬件设备处于异常状态。Specifically, when other communication devices are normal, it is determined that the hardware device is in an abnormal state.
步骤S3049,从硬件设备映射表中查找处于异常状态的异常硬件设备对应的第三标识信息。Step S3049: searching the hardware device mapping table for third identification information corresponding to the abnormal hardware device in the abnormal state.
具体地,BMC可以从硬件设备映射表中查找处于异常状态的异常硬件设备对应的第三标识信息。Specifically, the BMC may search the hardware device mapping table for the third identification information corresponding to the abnormal hardware device in the abnormal state.
步骤S30410,基于第三标识信息,向用户输出告警信息。Step S30410: output warning information to the user based on the third identification information.
具体地,BMC可以基于第三标识信息,生成告警信息,其中该告警信息中包括第三标识信息。然后,BMC将告警信息向用户输出。Specifically, the BMC may generate warning information based on the third identification information, wherein the warning information includes the third identification information. Then, the BMC outputs the warning information to the user.
本申请实施例提供的硬件设备管理方法,基于各目标通信链路向各硬件设备发送状态检测信息;当接收到硬件设备发送的反馈信息时,确定硬件设备处于正常工作状态,保证了确定的硬件设备处于正常工作状态的结果的准确性。读取处于正常工作状态的正常硬件设备对应的第一标识信息,在硬件设备映射表查询正常硬件设备对应的第二标识信息;将第一标识信息与第二标识信息进行对比;当第一标识信息与第二标识信息不一致时,利用第一标识信息替换第二标识信息,从而可以保证硬件设备映射表中正常硬件设备对应的第二标识信息的准确性。当未接收到硬件设备发送的反馈信息时,检测目标通信链路中除硬件设备外的其他通信设备是否正常,从而避免由于目标通信链路中除硬件设备外的其他通信设备发生异常导致未接收到硬件设备发送的反馈信息。当其他通信设备正常时,确定硬件设备处于异常状态,保证了确定的硬件设备处于异常状态的准确性。从硬件设备映射表中查找处于异常状态的异常硬件设备对应的第三标识信息;基于第三标识信息,向用户输出告警信息,使得用户可以接收到异常硬件设备对应的告警信息,且可以根据异常硬件设备对应的第三标识信息查找到异常硬件设备。The hardware device management method provided in the embodiment of the present application sends status detection information to each hardware device based on each target communication link; when the feedback information sent by the hardware device is received, it is determined that the hardware device is in a normal working state, thereby ensuring the accuracy of the result that the hardware device is in a normal working state. Read the first identification information corresponding to the normal hardware device in the normal working state, and query the second identification information corresponding to the normal hardware device in the hardware device mapping table; compare the first identification information with the second identification information; when the first identification information is inconsistent with the second identification information, replace the second identification information with the first identification information, thereby ensuring the accuracy of the second identification information corresponding to the normal hardware device in the hardware device mapping table. When the feedback information sent by the hardware device is not received, detect whether other communication devices other than the hardware device in the target communication link are normal, thereby avoiding the failure to receive the feedback information sent by the hardware device due to abnormalities in other communication devices other than the hardware device in the target communication link. When other communication devices are normal, it is determined that the hardware device is in an abnormal state, thereby ensuring the accuracy of the determined hardware device in an abnormal state. Search the hardware device mapping table for the third identification information corresponding to the abnormal hardware device in the abnormal state; based on the third identification information, output warning information to the user, so that the user can receive the warning information corresponding to the abnormal hardware device, and can find the abnormal hardware device according to the third identification information corresponding to the abnormal hardware device.
在本实施例中提供了一种硬件设备管理方法,可用于上述的BMC,图8是根据本发明实施例的硬件设备管理方法的流程图,如图8所示,该流程包括如下步骤:In this embodiment, a hardware device management method is provided, which can be used for the above-mentioned BMC. FIG. 8 is a flow chart of the hardware device management method according to an embodiment of the present invention. As shown in FIG. 8 , the process includes the following steps:
步骤S401,获取当前与BMC连接的至少一个硬件设备对应的设备信息。Step S401: Acquire device information corresponding to at least one hardware device currently connected to the BMC.
关于该步骤请参见图7对步骤S301的介绍,在此不进行赘述。For the description of this step, please refer to the description of step S301 in FIG7 , which will not be described in detail here.
步骤S402,基于与各硬件设备之间的通信连接,确定各硬件设备对应的目标通信链路。Step S402: determining a target communication link corresponding to each hardware device based on the communication connection with each hardware device.
关于该步骤请参见图7对步骤S302的介绍,在此不进行赘述。For details about this step, please refer to the introduction of step S302 in FIG. 7 , which will not be described in detail here.
步骤S403,根据各硬件设备对应的设备信息与目标通信链路,生成硬件设备映射表。Step S403: Generate a hardware device mapping table according to the device information corresponding to each hardware device and the target communication link.
关于该步骤请参见图7对步骤S303的介绍,在此不进行赘述。For details about this step, please refer to the introduction of step S303 in FIG. 7 , which will not be described in detail here.
步骤S404,基于硬件设备映射表,对各硬件设备进行管理。Step S404: managing each hardware device based on the hardware device mapping table.
关于该步骤请参见图7对步骤S304的介绍,在此不进行赘述。For details about this step, please refer to the introduction of step S304 in FIG. 7 , which will not be described in detail here.
步骤S405,检测是否存在与BMC连接的新增硬件设备。Step S405: Detect whether there is a new hardware device connected to the BMC.
具体地,BMC可以向各空闲的可用通信链路发送是否在位检测信息。当接收到在位信息后,确定存在与BMC连接的新增硬件设备Specifically, the BMC can send presence detection information to each idle available communication link. After receiving the presence information, it is determined that there is a new hardware device connected to the BMC.
步骤S406,当存在新增硬件设备时,确定新增硬件设备对应的新增通信链。Step S406: when there is a newly added hardware device, determine a newly added communication link corresponding to the newly added hardware device.
具体地,当存在新增硬件设备时,BMC可以将接收到在位信息的可用通信链路确定为新增硬件设备对应的新增通信链。Specifically, when there is a newly added hardware device, the BMC may determine the available communication link for which the presence information is received as the newly added communication link corresponding to the newly added hardware device.
步骤S407,基于新增通信链路中对应的新增PCIe接口,检测是否接收到新增硬件设备对应的新增设备信息。Step S407: Based on the newly added PCIe interface corresponding to the newly added communication link, it is detected whether the newly added device information corresponding to the newly added hardware device is received.
具体地,BMC可以基于新增通信链路中对应的新增PCIe接口,在存储空间的数据中查询是否存在新增PCIe接口对应的新增硬件设备对应的新增设备信息。Specifically, the BMC may query the data in the storage space whether there is new device information corresponding to the new hardware device corresponding to the new PCIe interface based on the new PCIe interface corresponding to the new communication link.
步骤S408,当未接收到新增设备信息时,向与BMC连接的BIOS发送获取新增设备信息的消息。Step S408: When no new device information is received, a message for obtaining the new device information is sent to the BIOS connected to the BMC.
具体地,当未接收到新增设备信息时,向与BMC连接的BIOS发送获取新增设备信息的消息。Specifically, when no new device information is received, a message for acquiring the new device information is sent to the BIOS connected to the BMC.
步骤S409,接收BIOS发送的新增设备信息。Step S409: receiving the newly added device information sent by the BIOS.
具体地,BMC可以基于与BIOS的通信连接,接收BIOS发送的新增设备信息。Specifically, the BMC may receive the newly added device information sent by the BIOS based on the communication connection with the BIOS.
步骤S410,将新增通信链路和新增设备信息,添加至硬件设备映射表。Step S410: Add the newly added communication link and the newly added device information to the hardware device mapping table.
具体地,BMC可以将新增通信链路和新增设备信息,添加至硬件设备映射表。Specifically, the BMC may add the newly added communication link and the newly added device information to the hardware device mapping table.
本申请实施例提供的硬件设备管理方法,检测是否存在与BMC连接的新增硬件设备,从而使得BMC可以及时检测到新增硬件设备。当存在新增硬件设备时,确定新增硬件设备对应的新增通信链路,保证了确定的新增硬件设备对应的新增通信链路的准确性。基于新增通信链路中对应的新增PCIe接口,检测是否接收到新增硬件设备对应的新增设备信息。当未接收到新增设备信息时,向与BMC连接的BIOS发送获取新增设备信息的消息,接收BIOS发送的新增设备信息,将新增通信链路和新增设备信息,添加至硬件设备映射表。进而使得硬件设备映射表中包括新增硬件设备,不需要人为将新增硬件设备对应的新增通信链路和新增设备信息输入至BMC,进而可以保证基于硬件设备映射表对新增硬件设备进行管理。The hardware device management method provided in the embodiment of the present application detects whether there is a new hardware device connected to the BMC, so that the BMC can detect the new hardware device in time. When there is a new hardware device, the new communication link corresponding to the new hardware device is determined to ensure the accuracy of the new communication link corresponding to the determined new hardware device. Based on the corresponding new PCIe interface in the new communication link, detect whether the new device information corresponding to the new hardware device is received. When the new device information is not received, a message for obtaining the new device information is sent to the BIOS connected to the BMC, the new device information sent by the BIOS is received, and the new communication link and the new device information are added to the hardware device mapping table. Thereby, the new hardware device is included in the hardware device mapping table, and there is no need to manually input the new communication link and the new device information corresponding to the new hardware device into the BMC, thereby ensuring that the new hardware device is managed based on the hardware device mapping table.
在本实施例中还提供了一种硬件设备管理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In the present embodiment, a hardware device management device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made 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 device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
本实施例提供一种硬件设备管理装置,如图9所示,包括:This embodiment provides a hardware device management device, as shown in FIG9 , including:
获取模块501,用于获取当前与BMC连接的至少一个硬件设备对应的设备信息;设备信息中包括硬件设备对应的标识信息以及硬件设备连接的PCIe接口;The acquisition module 501 is used to acquire device information corresponding to at least one hardware device currently connected to the BMC; the device information includes identification information corresponding to the hardware device and a PCIe interface connected to the hardware device;
第一确定模块502,用于基于与各硬件设备之间的通信连接,确定各硬件设备对应的目标通信链路;A first determination module 502, configured to determine a target communication link corresponding to each hardware device based on the communication connection with each hardware device;
生成模块503,用于根据各硬件设备对应的设备信息与目标通信链路,生成硬件设备映射表;A generating module 503, for generating a hardware device mapping table according to device information corresponding to each hardware device and a target communication link;
管理模块504,用于基于硬件设备映射表,对各硬件设备进行管理。The management module 504 is used to manage each hardware device based on the hardware device mapping table.
在一些可选的实施方式中,第一确定模块502,具体用于获取BMC对应的多个可用通信链路;基于各可用通信链路发送是否在位检测信息;当接收硬件设备发送的在位信息后,确定可用通信链路为硬件设备对应的目标通信链路。In some optional implementations, the first determination module 502 is specifically used to obtain multiple available communication links corresponding to the BMC; send presence detection information based on each available communication link; and after receiving the presence information sent by the hardware device, determine that the available communication link is the target communication link corresponding to the hardware device.
在一些可选的实施方式中,生成模块503,具体用于根据各硬件设备对应的目标通信链路,生成通信链路拓扑结构;根据通信链路拓扑结构,生成硬件设备拓扑表;根据各硬件设备对应的PCIe接口,将硬件设备对应的设备信息添加至硬件设备拓扑表,生成硬件设备映射表。In some optional implementations, the generation module 503 is specifically used to generate a communication link topology structure based on the target communication link corresponding to each hardware device; generate a hardware device topology table based on the communication link topology structure; add the device information corresponding to the hardware device to the hardware device topology table based on the PCIe interface corresponding to each hardware device, and generate a hardware device mapping table.
在一些可选的实施方式中,硬件设备管理装置,还包括:In some optional implementations, the hardware device management apparatus further includes:
展示模块,用于向用户展示硬件设备映射表,以检测硬件设备映射表是否准确。The display module is used to display the hardware device mapping table to the user to detect whether the hardware device mapping table is accurate.
在一些可选的实施方式中,硬件设备管理装置,还包括:In some optional implementations, the hardware device management apparatus further includes:
第一检测模块,用于检测是否存在与BMC连接的新增硬件设备;The first detection module is used to detect whether there is a new hardware device connected to the BMC;
第二确定模块,用于当存在新增硬件设备时,确定新增硬件设备对应的新增通信链路;A second determination module is used to determine a new communication link corresponding to the new hardware device when there is a new hardware device;
第二检测模块,用于基于新增通信链路中对应的新增PCIe接口,检测是否接收到新增硬件设备对应的新增设备信息;A second detection module is used to detect whether the newly added device information corresponding to the newly added hardware device is received based on the newly added PCIe interface corresponding to the newly added communication link;
发送模块,用于当未接收到新增设备信息时,向与BMC连接的BIOS发送获取新增设备信息的消息;The sending module is used to send a message for obtaining the new device information to the BIOS connected to the BMC when no new device information is received;
接收模块,用于接收BIOS发送的新增设备信息;A receiving module, used for receiving the newly added device information sent by BIOS;
添加模块,用于将新增通信链路和新增设备信息,添加至硬件设备映射表。The adding module is used to add the newly added communication link and the newly added device information to the hardware device mapping table.
在一些可选的实施方式中,管理模块504,具体用于基于各目标通信链路向各硬件设备发送状态检测信息;当接收到硬件设备发送的反馈信息时,确定硬件设备处于正常工作状态;读取处于正常工作状态的正常硬件设备对应的第一标识信息;在硬件设备映射表查询正常硬件设备对应的第二标识信息;将第一标识信息与第二标识信息进行对比;当第一标识信息与第二标识信息不一致时,利用第一标识信息替换第二标识信息;当未接收到硬件设备发送的反馈信息时,检测目标通信链路中除硬件设备外的其他通信设备是否正常;当其他通信设备正常时,确定硬件设备处于异常状态;从硬件设备映射表中查找处于异常状态的异常硬件设备对应的第三标识信息;基于第三标识信息,向用户输出告警信息。In some optional embodiments, the management module 504 is specifically used to send status detection information to each hardware device based on each target communication link; when feedback information sent by the hardware device is received, determine that the hardware device is in a normal working state; read the first identification information corresponding to the normal hardware device in the normal working state; query the second identification information corresponding to the normal hardware device in the hardware device mapping table; compare the first identification information with the second identification information; when the first identification information is inconsistent with the second identification information, replace the second identification information with the first identification information; when no feedback information sent by the hardware device is received, detect whether other communication devices except the hardware device in the target communication link are normal; when other communication devices are normal, determine that the hardware device is in an abnormal state; search the hardware device mapping table for the third identification information corresponding to the abnormal hardware device in the abnormal state; based on the third identification information, output an alarm message to the user.
上述各个模块和单元的更进一步的功能描述与上述对应实施例相同,在此不再赘述。The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
本实施例中的硬件设备管理装置是以功能单元的形式来呈现,这里的单元是指ASIC(Application Specific Integrated Circuit,专用集成电路)电路,执行一个或多个软件或固定程序的处理器和存储器,和/或其他可以提供上述功能的器件。The hardware device management apparatus in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and/or other devices that can provide the above functions.
本发明实施例还提供一种BMC,具有上述图10所示的硬件设备管理装置。The embodiment of the present invention further provides a BMC having the hardware device management apparatus shown in FIG. 10 .
请参阅图10,图10是本发明可选实施例提供的一种BMC的结构示意图,如图10所示,该BMC包括:一个或多个处理器10、存储器20,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相通信连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在BMC内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在一些可选的实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个BMC,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。图10中以一个处理器10为例。Please refer to Figure 10, which is a schematic diagram of the structure of a BMC provided by an optional embodiment of the present invention. As shown in Figure 10, the BMC includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the BMC, including instructions stored in or on the memory to display graphical information of the GUI on an external input/output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and/or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple BMCs can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). In Figure 10, a processor 10 is taken as an example.
处理器10可以是中央处理器,网络处理器或其组合。其中,处理器10还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路,可编程逻辑器件或其组合。上述可编程逻辑器件可以是复杂可编程逻辑器件,现场可编程逻辑门阵列,通用阵列逻辑或其任意组合。The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
其中,所述存储器20存储有可由至少一个处理器10执行的指令,以使所述至少一个处理器10执行实现上述实施例示出的方法。The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
存储器20可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据BMC的使用所创建的数据等。此外,存储器20可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些可选的实施方式中,存储器20可选包括相对于处理器10远程设置的存储器,这些远程存储器可以通过网络连接至该BMC。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the BMC, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the BMC 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.
存储器20可以包括易失性存储器,例如,随机存取存储器;存储器也可以包括非易失性存储器,例如,快闪存储器,硬盘或固态硬盘;存储器20还可以包括上述种类的存储器的组合。The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
该BMC还包括通信接口30,用于该BMC与其他设备或通信网络通信。The BMC further includes a communication interface 30 for the BMC to communicate with other devices or a communication network.
本发明实施例还提供了一种计算机可读存储介质,上述根据本发明实施例的方法可在硬件、固件中实现,或者被实现为可记录在存储介质,或者被实现通过网络下载的原始存储在远程存储介质或非暂时机器可读存储介质中并将被存储在本地存储介质中的计算机代码,从而在此描述的方法可被存储在使用通用计算机、专用处理器或者可编程或专用硬件的存储介质上的这样的软件处理。其中,存储介质可为磁碟、光盘、只读存储记忆体、随机存储记忆体、快闪存储器、硬盘或固态硬盘等;进一步地,存储介质还可以包括上述种类的存储器的组合。可以理解,计算机、处理器、微处理器控制器或可编程硬件包括可存储或接收软件或计算机代码的存储组件,当软件或计算机代码被计算机、处理器或硬件访问且执行时,实现上述实施例示出的方法。The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
本发明的一部分可被应用为计算机程序产品,例如计算机程序指令,当其被计算机执行时,通过该计算机的操作,可以调用或提供根据本发明的方法和/或技术方案。本领域技术人员应能理解,计算机程序指令在计算机可读介质中的存在形式包括但不限于源文件、可执行文件、安装包文件等,相应地,计算机程序指令被计算机执行的方式包括但不限于:该计算机直接执行该指令,或者该计算机编译该指令后再执行对应的编译后程序,或者该计算机读取并执行该指令,或者该计算机读取并安装该指令后再执行对应的安装后程序。在此,计算机可读介质可以是可供计算机访问的任意可用的计算机可读存储介质或通信介质。A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and/or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
虽然结合附图描述了本发明的实施例,但是本领域技术人员可以在不脱离本发明的精神和范围的情况下做出各种修改和变型,这样的修改和变型均落入由所附权利要求所限定的范围之内。Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410389780.7ACN118427020A (en) | 2024-03-29 | 2024-03-29 | Hardware equipment management method, device, BMC, storage medium and program product |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410389780.7ACN118427020A (en) | 2024-03-29 | 2024-03-29 | Hardware equipment management method, device, BMC, storage medium and program product |
| Publication Number | Publication Date |
|---|---|
| CN118427020Atrue CN118427020A (en) | 2024-08-02 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410389780.7APendingCN118427020A (en) | 2024-03-29 | 2024-03-29 | Hardware equipment management method, device, BMC, storage medium and program product |
| Country | Link |
|---|---|
| CN (1) | CN118427020A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120179584A (en)* | 2025-05-23 | 2025-06-20 | 苏州元脑智能科技有限公司 | A server |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120179584A (en)* | 2025-05-23 | 2025-06-20 | 苏州元脑智能科技有限公司 | A server |
| Publication | Publication Date | Title |
|---|---|---|
| CN104202194A (en) | Configuration method and device of PCIe (peripheral component interface express) topology | |
| CN114003445B (en) | BMC I2C monitoring function test method, system, terminal and storage medium | |
| US10324888B2 (en) | Verifying a communication bus connection to a peripheral device | |
| CN107273245B (en) | Operation device and operation method | |
| CN118714015B (en) | Computer system for bandwidth allocation, bandwidth allocation method and product | |
| CN113835762B (en) | Method and system for updating default configuration of hard disk backboard | |
| CN117687944A (en) | Topology generation method, expansion board card and server | |
| CN116560586B (en) | Determination method and device of attribute value, storage medium and electronic equipment | |
| CN115905083A (en) | Hard disk lighting device, method, system, computer equipment and storage medium | |
| CN118427020A (en) | Hardware equipment management method, device, BMC, storage medium and program product | |
| CN113900718A (en) | Method, system and device for decoupling asset information of BMC (baseboard management controller) and BIOS (basic input/output system) | |
| CN115878533A (en) | Adaptive configuration method, device, equipment and storage medium of AI server | |
| CN119356975A (en) | A method, device, equipment and medium for reporting server asset information | |
| CN118069562A (en) | Method, device, equipment and storage medium for managing hard disk backboard of double-node server | |
| CN119807106B (en) | Expansion card circuit and communication method capable of being inserted into external device | |
| CN118643000B (en) | Method for generating configuration information table of PCIe port of server, method and device for sending configuration information table | |
| CN114741350A (en) | A method, system, device and medium for cascading multiple NVME hard disk backplanes | |
| CN118550578B (en) | Computer system, single and double uplink mode detection method, storage medium and program product | |
| CN119201603A (en) | Host bus adapter monitoring method, device and motherboard management controller | |
| CN115314416A (en) | Network card state automatic detection method, device, electronic device and storage medium | |
| CN118708035A (en) | Device slot identification method, electronic device and storage medium | |
| CN118132458A (en) | MMIO address resource allocation method, device, computing device and storage medium | |
| CN118467042A (en) | Data processor startup control method, system, device, equipment and storage medium | |
| CN118093031A (en) | A wiring inspection method, device, equipment and machine-readable storage medium | |
| CN114139163B (en) | Security monitoring system and server system |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |