CN116881072A - Network card monitoring method, device, system and equipment of baseboard management controller - Google Patents

Network card monitoring method, device, system and equipment of baseboard management controller Download PDF

Info

Publication number
CN116881072A
CN116881072A CN202310484736.XA CN202310484736A CN116881072A CN 116881072 A CN116881072 A CN 116881072A CN 202310484736 A CN202310484736 A CN 202310484736A CN 116881072 A CN116881072 A CN 116881072A
Authority
CN
China
Prior art keywords
network card
transmission protocol
monitoring
data bus
layer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310484736.XA
Other languages
Chinese (zh)
Inventor
张加书
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202310484736.XA priority Critical patent/CN116881072A/en
Publication of CN116881072A publication Critical patent/CN116881072A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a network card monitoring method of a baseboard management controller, which is applied to an open source baseboard management controller and comprises the following steps: acquiring a transmission protocol supported by the network card equipment to be monitored and a data bus corresponding to the network card equipment to be monitored; determining a target driving layer corresponding to the transmission protocol based on the transmission protocol; acquiring monitoring information of the network card equipment to be monitored through the target driving layer and the data bus; according to the invention, different threads do not need to be developed for different network card devices for monitoring, and when the network card devices supporting different transmission protocols are monitored, each layer above the driving layer can be reused for different transmission protocols, so that the code quantity is reduced, and the flexibility and the expandability of the system are improved.

Description

Network card monitoring method, device, system and equipment of baseboard management controller
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a system, a device, and a computer readable storage medium for monitoring a network card of a baseboard management controller.
Background
In the information age, with the development and maturity of the technology of the internet of things, the technical demands of high-speed data operation, high-efficiency data processing and data security storage are becoming huge, and with the delivery of the whole cabinet and the sustainable development of the scale expansion of the data center, the requirements on the server technology are also becoming higher and higher. The high-performance operation server plays an indispensable role in the information age, and the optimization of the high-performance operation server work is urgent.
The BMC (Baseboard Management Controller ) is a core control unit of the server, and is a motherboard processor used for managing the server on the ARM architecture. The OpenBMC (Open Baseboard Management Controller, open source baseboard management controller) is an open source software architecture for constructing a dedicated Linux system image of a complete BMC, the OpenBMC adopts a novel boost.IO technology, and has the advantages of modularized programming, modularized debugging, asynchronous scheme management and the like compared with the traditional BMC development, wherein boost.IO is a high-performance, flexible and extensible distributed data storage solution, and strong support is provided for constructing a distributed application program. In the field of servers, BMCs as core components play a great role in detecting health states of the servers, such as overall performance, power consumption, journals, monitoring and the like.
With the gradual formation of a national integrated large data center system, new requirements are put forward on the aspects of computation density, resource scheduling, autonomous controllability and the like of the data center. Under such a large trend, a high-speed, high-bandwidth network card is becoming an essential part of a server. The traditional BMC (high-speed serial computer expansion bus standard) network card needs to be started up firstly and hardware needs to be switched to a riser card for normal use when being installed, wherein the riser card is an expansion card for connecting a display card or other PCIe devices to a main board and is usually composed of a flat cable and a circuit board, and the OCP (Open Compute Project, open computing project) network card has the advantages of convenient installation, high expansibility and multi-rate selection, and becomes the first choice of a whole cabinet and a high-density server more and more.
The high-speed network card plays an important role in server data transmission, so that the OpenBMC is particularly important for monitoring the network card. According to the traditional BMC network card monitoring method, different network cards are independent threads, the whole monitoring scheme is driven from a bottom layer to a protocol layer, then to a lib library (i.e. a static library) and then to an upper layer for application development, OCP network card monitoring and pc ie network card monitoring data do not need to be shared, modules are independent, code interfaces do not need to interact, and the upper layer monitoring opens up independent threads for module monitoring. Under the advantage of ensuring that codes are not mutually influenced, development efficiency is sacrificed, code quantity and code reading time are increased, expandability is reduced, and flexibility is poor.
Disclosure of Invention
The embodiment of the invention aims to provide a network card monitoring method, device, system, equipment and computer readable storage medium of a substrate management controller, which can drive multiplexing of layers above a layer in the use process, reduce code quantity and improve flexibility and expandability.
In order to solve the above technical problems, an embodiment of the present invention provides a network card monitoring method of a baseboard management controller, which is applied to an open source baseboard management controller, including:
Acquiring a transmission protocol supported by network card equipment to be monitored and a data bus corresponding to the network card equipment to be monitored;
determining a target driving layer corresponding to the transmission protocol based on the transmission protocol;
and acquiring monitoring information of the network card equipment to be monitored through the target driving layer and the data bus.
Optionally, the acquiring the transmission protocol supported by the network card device to be monitored and the data bus corresponding to the network card device to be monitored includes:
acquiring a unique identifier of network card equipment to be monitored;
and determining the transmission protocol and the data bus corresponding to the network card equipment to be monitored based on the unique identification and the established corresponding relation of the unique identification, the transmission protocol and the data bus.
Optionally, the process of establishing the correspondence between the unique identifier, the transmission protocol and the data bus includes:
after the system is started, network card equipment discovery is carried out, and a transmission protocol supported by the network card equipment, a unique identifier of the network card equipment and a corresponding data bus are determined;
based on the transmission protocol of each network card device, the unique identification of the network card device and the corresponding data bus, the corresponding relationship among the unique identification of the network card device, the transmission protocol and the data bus is established.
Optionally, the transmission protocol is a management component transmission protocol based on a high-speed serial computer expansion bus standard, or a management component transmission protocol based on a system management bus.
Optionally, the discovering the network card device after the system is started, and determining a transmission protocol supported by the network card device, a unique identifier of the network card device and a corresponding data bus, includes:
after the system is started, a command carrying a management component transmission protocol based on a system management bus is sent through each driving layer and each data bus;
according to the received first response information, determining that a transmission protocol supported by network card equipment returning the first response information is a management component transmission protocol based on a system management bus, determining a data bus corresponding to the network card equipment, and setting a unique identifier of the network card equipment;
after the system is started, receiving a broadcast of a discovery notification request sent by network card equipment;
determining that the transmission protocol supported by the network card equipment is a management component transmission protocol based on a high-speed serial computer expansion bus standard based on the discovery notification request;
and setting the unique identifier of the network card equipment in a broadcasting mode, and setting the attribute of the data bus according to the unique identifier so as to determine the corresponding data bus.
Optionally, the setting the unique identifier of the network card device by broadcasting includes:
transmitting a broadcast of a ready discovery request;
after receiving the broadcast of the preparation discovery response sent by the network card equipment, sending the broadcast of the endpoint discovery request;
receiving an endpoint discovery response returned by the network card device with the discovery identifier not found;
sending a request for setting unique identification to the network card equipment with the found identification being not found, so that the network card equipment can perform identification setting based on the request for setting unique identification;
and receiving a setting identification response returned by the network card equipment with the found identification being not found, and acquiring the unique identification of the network card equipment based on the setting identification response.
Optionally, the monitoring information includes dynamic information of the network card and static information of the network card.
The embodiment of the invention also provides a network card monitoring device of the baseboard management controller, which is applied to the open source baseboard management controller and comprises the following components:
the acquisition module is used for acquiring a transmission protocol supported by the network card equipment to be monitored and a data bus corresponding to the network card equipment to be monitored;
a determining module, configured to determine a target driving layer corresponding to the transmission protocol based on the transmission protocol;
And the monitoring module is used for acquiring the monitoring information of the network card equipment to be monitored through the target driving layer and the data bus.
The embodiment of the invention also provides a network card monitoring system of the baseboard management controller, which is applied to the open source baseboard management controller and comprises driving layers, a communication layer, a network card discovery layer, a network card monitoring interface layer and a network card monitoring service layer which are sequentially arranged from a bottom layer to an application layer, wherein each driving layer aims at a transmission protocol; wherein:
the network card monitoring service layer is used for acquiring monitoring information of the network card equipment supporting the corresponding transmission protocol through the network card monitoring interface layer, the communication layer and the corresponding driving layer;
the network card monitoring interface layer is used for providing a monitoring interface for the network card monitoring service layer;
the network card discovery layer is used for discovering network card equipment and recording a transmission protocol supported by the network card equipment and a corresponding data bus;
and the communication layer is used for realizing communication with the network card equipment through the driving layer.
The embodiment of the invention also provides electronic equipment, which comprises:
a memory for storing a computer program;
and the processor is used for realizing the steps of the network card monitoring system method of the baseboard management controller when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium is stored with a computer program, and the computer program realizes the steps of the network card monitoring system method of the baseboard management controller when being executed by a processor.
Network card equipment to be monitored network card equipment to be monitored
The embodiment of the invention provides a network card monitoring method of a baseboard management controller, which is applied to an open source baseboard management controller and comprises the following steps: acquiring a transmission protocol supported by the network card equipment to be monitored and a data bus corresponding to the network card equipment to be monitored; determining a target driving layer corresponding to the transmission protocol based on the transmission protocol; and acquiring monitoring information of the network card equipment to be monitored through the target driving layer and the data bus.
Therefore, when the network card is monitored, the open source baseboard management controller can acquire the transmission protocol supported by the network card equipment to be monitored and acquire the data bus corresponding to the network card equipment to be monitored, and then can determine the target driving layer corresponding to the transmission protocol through the transmission protocol, so as to determine the communication link, acquire the monitoring information of the network card equipment to be monitored through the target driving layer and the communication link determined by the corresponding data bus, and realize the monitoring of the network card equipment; according to the invention, different threads do not need to be developed for different network card devices for monitoring, and when the network card devices supporting different transmission protocols are monitored, each layer above the driving layer can be reused for different transmission protocols, so that the code quantity is reduced, and the flexibility and the expandability of the system are improved.
The embodiment of the invention also provides a network card monitoring device, a system, equipment and a computer readable storage medium of the baseboard management controller, which have the same beneficial effects.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required in the prior art and the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a network card monitoring method of a baseboard management controller according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a pcie network card device discovery provided in an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a network card monitoring device of a baseboard management controller according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a network card monitoring system of another baseboard management controller according to an embodiment of the present invention;
fig. 5 is a monitoring flow implemented by a network card monitoring service layer according to an embodiment of the present invention;
Fig. 6 is a monitoring flow implemented by a network card monitoring service management layer according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a computer readable storage medium according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a network card monitoring method, a device, a system, equipment and a computer readable storage medium of a substrate management controller, which can drive multiplexing of layers above a layer in the use process, reduce code quantity and improve flexibility and expandability.
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of a network card monitoring method of a baseboard management controller according to an embodiment of the present invention. A network card monitoring method of a baseboard management controller is applied to an open source baseboard management controller and comprises the following steps:
S110: acquiring a transmission protocol supported by the network card equipment to be monitored and a data bus corresponding to the network card equipment to be monitored; it should be noted that, in the embodiment of the present invention, when each network card device to be monitored is monitored, a transmission protocol supported by the network card device to be monitored may be obtained for each network card device to be monitored, and a data bus corresponding to the network card device to be monitored may be obtained so as to interact with the network card device to be monitored through the data bus.
S120: determining a target driving layer corresponding to the transmission protocol based on the transmission protocol;
it can be understood that in the embodiment of the present invention, corresponding driving layers are set for different transmission protocols, so that after the transmission protocol supported by the network card device to be monitored is acquired, the target driving layer corresponding to the transmission protocol can be determined according to the transmission protocol. It should be further noted that, in the architecture of the network card monitoring system in the embodiment of the present invention, each layer above the driving layer may be multiplexed, that is, different transmission protocols may all be multiplexed,
s130: and acquiring monitoring information of the network card equipment to be monitored through the target driving layer and the data bus.
Specifically, after the data bus and the target driving layer corresponding to the network card device to be monitored are determined, the communication link between the target driving layer and the data bus can be determined, so that the monitoring information of the network card device to be monitored can be obtained through the target driving layer via the data bus, and the monitoring of each network card device to be monitored is realized. The monitoring information obtained in the monitoring process comprises network card dynamic information and network card static information, wherein the dynamic monitoring information comprises network card temperature, network card health status, optical module temperature, optical module health status, optical module mac address, the static monitoring information comprises manufacturer id, equipment id, bus number, equipment number, function number, current link speed, network card version information, network card channel, network card connection status, network card equipment position information, network card pn, network card sn, network card various asset information and the like.
Therefore, when the network card is monitored, the open source baseboard management controller can acquire the transmission protocol supported by the network card equipment to be monitored and acquire the data bus corresponding to the network card equipment to be monitored, and then can determine the target driving layer corresponding to the transmission protocol through the transmission protocol, so as to determine the communication link, acquire the monitoring information of the network card equipment to be monitored through the target driving layer and the communication link determined by the corresponding data bus, and realize the monitoring of the network card equipment; according to the invention, different threads do not need to be developed for different network card devices for monitoring, and when the network card devices supporting different transmission protocols are monitored, each layer above the driving layer can be reused for different transmission protocols, so that the code quantity is reduced, and the flexibility and the expandability of the system are improved.
On the basis of the above embodiments, the technical solution is further described and illustrated in the embodiments of the present invention, which are specifically as follows:
further, the step of obtaining the transmission protocol supported by the network card device to be monitored and the data bus corresponding to the network card device to be monitored in S110 includes:
acquiring a unique identifier of network card equipment to be monitored;
and determining the transmission protocol and the data bus corresponding to the network card equipment to be monitored based on the unique identification and the established corresponding relation among the unique identification, the transmission protocol and the data bus.
It should be noted that, in the embodiment of the present invention, for each network card device of the access system, a correspondence relationship between the unique identifier of the network card device, a transmission protocol, and a data bus may be established, where the transmission protocol is a transmission protocol supported by the network card device. And then, when the network card equipment to be monitored is required to be monitored, the transmission protocol supported by the network card equipment to be monitored and the data bus corresponding to the network card equipment to be monitored can be determined by acquiring the unique identifier of the network card equipment to be monitored and further according to the unique identifier and the established corresponding relationship among the unique identifier, the transmission protocol and the data bus.
Further, the process of establishing the correspondence between the unique identifier, the transmission protocol and the data bus may include:
after the system is started, network card equipment discovery is carried out, and a transmission protocol supported by the network card equipment, a unique identifier of the network card equipment and a corresponding data bus are determined;
based on the transmission protocol of each network card device, the unique identification of the network card device and the corresponding data bus, the corresponding relationship among the unique identification of the network card device, the transmission protocol and the data bus is established.
Specifically, in practical application, the network card device can be discovered through a network card discovery layer in the network card monitoring system architecture, and after the network card device is discovered, a unique identifier of the network card device is set, and a data bus of the network card device is determined. Therefore, in practical application, the network card device can be discovered after the system is started, the transmission protocol supported by the network card device, the unique identifier of the network card device and the data bus corresponding to the network card device are determined after the network card device is discovered, and then the corresponding relation is established based on the unique identifier of the network card device, the transmission protocol and the data bus.
Further, the transmission protocol in the embodiment of the present invention is a management component transmission protocol based on the high-speed serial computer expansion bus standard (i.e. the map over pcie), or a management component transmission protocol based on the system management bus (i.e. the mctp over SMBUS/I2C).
Of course, other transmission protocols supporting mctp may be used in practical applications, and may be specifically determined according to actual needs, which is not limited herein.
Further, the method for discovering the network card device after the system is started and determining the transmission protocol supported by the network card device, the unique identifier of the network card device and the corresponding data bus includes:
after the system is started, a command carrying a management component transmission protocol based on a system management bus is sent through each driving layer and each data bus;
according to the received first response information, determining that a transmission protocol supported by the network card equipment returning the first response information is a management component transmission protocol based on a system management bus, determining a data bus corresponding to the network card equipment, and setting a unique identifier of the network card equipment;
after the system is started, receiving a broadcast of a discovery notification request sent by network card equipment;
determining that the transmission protocol supported by the network card equipment is a management component transmission protocol based on a high-speed serial computer expansion bus standard based on the discovery notification request;
the unique identifier of the network card device is set in a broadcasting mode, and the attribute of the data bus is set according to the unique identifier so as to determine the corresponding data bus.
After the system is started (such as power-on start), a command carrying a management component transmission protocol mctp over SMBUS/I2C based on a system management bus can be sent through each driving layer supporting different protocols and each data bus corresponding to the driving layer, when each data bus corresponding to the driving layer supporting the mctp over SMBUS/I2C protocol is accessed to a network card device supporting the mctp over SMBUS/I2C protocol, the network card device receives the command carrying the mctp over SMBUS/I2C protocol, then responds to the command and returns first response information, after the system receives the first response information, the system determines that the transmission protocol supported by the network card device returning the first response information is the mctp over SMBUS/I2C protocol, further determines the data bus corresponding to the device, and then sends a setting identification request to the device through the data bus, so that the device sets its own unique identification, and returns the unique identification to the network card to the unique device, thereby obtaining the unique network card identification of the unique network card. Of course, the network card device supporting the management component transmission protocol map over pcie based on the high-speed serial computer expansion bus standard does not correspond to the command carrying the mctp over SMBUS/I2C protocol, so that the network card device supporting the mctp over SMBUS/I2C protocol can be discovered through the above process.
In addition, after the system is started, the network card device supporting the high-speed serial computer expansion bus standard of the access system transmits the broadcast of the discovery notification request sent by the network card device supporting the high-speed serial computer expansion bus standard, after the system receives the broadcast of the discovery notification request, the network card device can be determined to be the network card device supporting the matp over pc ie protocol, and then a setting identification request is sent to the network card device in a broadcasting mode, so that the network card device sets own unique identification based on the setting identification request, and sets data bus attributes according to the unique identification to determine a corresponding data bus.
Referring specifically to fig. 2, a discovery process for a network card device supporting a mat over pc ie protocol is shown in fig. 2, where the discovery process specifically may include:
receiving a broadcast of a discovery notification request sent by network card equipment;
returning a discovery notification response;
transmitting a broadcast of a ready discovery request;
after receiving the broadcast of the preparation discovery response sent by the network card equipment, sending the broadcast of the endpoint discovery request;
receiving an endpoint discovery response returned by the network card device with the discovery identifier not found;
sending a request for setting the unique identification to the network card equipment with the found identification being not found, so that the network card equipment can perform identification setting based on the request for setting the unique identification;
And receiving a setting identification response returned by the network card equipment with the found identification being not found, and acquiring the unique identification of the network card equipment based on the setting identification response.
It can be understood that, in the embodiment of the present invention, the network card device supporting the matp over pc ie protocol is specifically shown as the picture end in fig. 2, and the OpenBMC system is the mctp bus owner in fig. 2. Specifically, the destination may send a discovery notification request to an mctp bus owner (i.e., openBMC), where the mctp bus owner performs an endpoint discovery response based on the discovery notification request, returns the discovery notification response, and sends a broadcast for preparing the discovery request, so that the network card device that receives the broadcast makes preparation for querying an endpoint, the network card device that receives the broadcast returns a ready discovery response, where the mctp bus owner broadcasts an "endpoint discovery request", and only the network card device with an mctp function, whose discovery identifier is undiscovered, performs a request response after receiving the "endpoint discovery request", returns an endpoint discovery response, and sends a set identity request to the network card device, where the network card device sets its own identity based on the set identity request, and returns a set identity response, where the mctp bus owner obtains device information of the corresponding device based on the set identity response, where the device information includes a device identifier (i.e., identity). In addition, after the network card device sets the self identity based on the set identity request, the self discovery identity Discovered is set as Discovered, so that the network card device does not respond to the discovery preparation request sent by the mctp bus owner later until the discovery identity Discovered of the network card device is set as undiscovered because of other conditions.
It should be noted that, in the actual application, after the system is powered on, each network card device supporting the map over pc ie protocol sets the discovery identifier Discovered of itself as a default undiscovery.
On the basis of the foregoing embodiments, the embodiment of the present application further provides a network card monitoring device of a baseboard management controller, which is applied to an open source baseboard management controller, and referring to fig. 3 specifically, the device includes:
the acquiring module 11 is configured to acquire a transmission protocol supported by the network card device to be monitored and a data bus corresponding to the network card device to be monitored;
a determining module 12, configured to determine a target driving layer corresponding to a transmission protocol based on the transmission protocol;
the monitoring module 13 is configured to obtain monitoring information of the network card device to be monitored through the target driving layer and the data bus.
It should be noted that, the network card monitoring device of the baseboard management controller in the embodiment of the present application has the same advantages as the network card monitoring method of the baseboard management controller provided in the above embodiment, and the specific description of the network card monitoring method of the baseboard management controller in the embodiment of the present application refers to the above embodiment, and the disclosure is not repeated herein.
On the basis of the above embodiment, the embodiment of the present invention further provides a network card monitoring system of a baseboard management controller, which is applied to an open source baseboard management controller, referring to fig. 4 specifically, the system includes driving layers 1, a communication layer 2, a network card discovery layer 3, a network card monitoring interface layer 4 and a network card monitoring service layer 5 sequentially arranged from a bottom layer to an application layer, wherein each driving layer 1 is aimed at a transmission protocol; wherein:
the network card monitoring service layer 5 is used for acquiring monitoring information of the network card equipment supporting the corresponding transmission protocol through the network card monitoring interface layer 4, the communication layer 2 and the corresponding driving layer 1;
the network card monitoring interface layer 4 is used for providing a monitoring interface for the network card monitoring service layer 5;
the network card discovery layer 3 is used for discovering the network card equipment and recording the transmission protocol supported by the network card equipment and the corresponding data bus;
and the communication layer 2 is used for realizing communication with the network card device through the driving layer.
It should be noted that, the underlying driving layer 1 in the embodiment of the present invention may include an I2C driving layer (i.e. a driving layer supporting mctp over SMBUS/I2C protocol) and a pcie driving layer (i.e. a PCIe Device Driver mctp driving layer supporting pcie protocol), and the corresponding driving nodes may be generated according to different transmission protocols (in particular, mctp management component transmission protocol) so as to be connected with the access through the driving nodes The network card device of the system communicates, and a communication layer 2 (particularly a communication layer Libmctp Smbus/pcie based on a static library) above the driving layer 1 can combine the static library according to different transmission protocols to realize a network card discovery layer 3 with the last layerNamely Xyz.openbmc_project.mctpd@smbus +. pcie.service,smbus/pcieThe discovery equipment service of the protocol), the network card discovery layer 3 can call the static library in the communication layer 2, and operate the corresponding driving node to interact with the network card equipment, thereby acquiring the equipment information such as the unique identifier of the network card equipment, and determining the data bus corresponding to the network card equipment, so that the upper layer can acquire the network card monitoring information of the network card equipment through the data bus and the corresponding driving layer 1. The network card monitoring interface layer 4 (namely, the Nic-mctp-pcie/smbus.service for providing network card information acquisition for the upper layer) positioned on one layer of the network card discovery layer 3 can provide universal interfaces for acquiring various network card monitoring information of network card devices supporting corresponding transmission protocols for the network card monitoring service layer 5 (namely, the Nic-mgmt.service) according to different transmission protocols, so that the network card monitoring service layer 5 acquires the network card monitoring information of the corresponding network card devices through various universal interfaces and through various layers below, thereby realizing the monitoring of the network card devices. In practical application, the driver layer 1 loads the management component transmission protocol mctp driver, wherein the identifier of the successful driver loading is that the corresponding device descriptor is produced under the corresponding device driver file storage directory, that is, the corresponding device descriptor is produced under the corresponding device driver file storage directory (e.g., dev/directory), which indicates that the execution of the driver registration loading function is successful, otherwise, the loading is failed. For different mctp transport protocols, corresponding device descriptors are produced under the respective device driver file storage directory for each transport protocol, e.g. under the/dev/directory for the mctp over pcie protocol Corresponding device descriptors are produced, and pair-wise device descriptors are also produced under the/dev/i 2c directory for the mctp over i2c protocol. And then transplanting the driving source code to a preset path so as to provide a driving controller registration interface, and transplanting the corresponding missing header file so as to enable the registration driving to be successful, thereby generating driving nodes under the driving equipment file path. For example, for a linux-aspied system, a driving source code (such as asped-mctp. C) may be transplanted and stored under a driver/soc/asped/directory, and a corresponding actual header file (including, for example, linux_asped_mctp. H) may be transplanted, where the driving source code may be determined based on a specific transmission protocol (specifically derived from kernel source code), so that the registration driving is successful, and thus, a driving node is generated under a driving device file/dev path. It should be noted that, the aspeed is an integrated processor chip vendor used by OpenBMC.
Specifically, the driving layer 1 may add configuration information to the configuration file, where each configuration information may include: the management component transmits a protocol and register address (e.g., mctp@1e6ed000), a list of strings (e.g., composite) for binding the network card device to the driving node, a reg attribute for indicating the register start address and address length, an Interrupt attribute (Interrupt attribute that is used to assert an Interrupt when the current node has multiple Interrupt controllers), and a state in which the device is operational (e.g., represented by Status). In addition, mcpt configuration information, kernel configuration files, and the like can also be added.
In practical application, the name of the string list compound of the drive source code aspeed-mctp.c needs to be kept consistent with the name of the string list of mctp configured by the drive device tree file aspeed-g6.dtsi, otherwise, the user cannot go to the controller probe interface, dmesg checks the kernel debugging information to find that a failure error is found, and the/dev/aspeed drive node cannot generate. Where dmesg is a Linux command for looking at messages in the kernel ring buffer. In Linux systems, the kernel stores information such as messages, warnings, errors and the like during the running of the system in a ring buffer, and the dmesg command can read and display the messages in the buffer to help a user know the running state of the system and find possible problems.
In addition, the kernel driver configuration mainly includes: providing an interface for sending an mctp message, enabling libmctp (a dynamic link library of a management component transport protocol) to support two hardware binding bridging modes, adopting an mctp_bridge_tasks () function for bridging between two node nodes, initializing mctp, initializing two hardware binding modes, and setting a bridge. Wherein the function of the mctp_bridge_tasks () is to create a simple bi-directional bridge between mctp buses, and to open a way for communication between the motherboard and the device. libmctp code is intended to be integrated into other code libraries in two ways, first the most simple library (libmctp.{ a, so }) that can be compiled separately, can be generated using makefile (i.e., the name of a dynamically linked library that manages component transport protocols), and linked to the containing item; second, as a set of sources contained in the project, libmctp.a may be constructed using a makefile.inc file. Where makefile is a file used to compile and build items of software that contains a series of rules that instruct the build system how to generate executable programs or library files from source code. The rules in makefile typically contain information such as dependencies, object files, compiler options, linker options, etc., so that the build system can automatically compile and link source code as needed to generate executable programs or library files.
It should be noted that, the network card discovery layer 3 is mainly responsible for directly interacting with hardware, specifically, by calling the libmctp library, directly operating the driving node to interact with the network card device supporting the corresponding transmission protocol, searching the network card device to obtain the device information of the network card device, creating the data bus attribute, and determining the data bus. Specifically, a management component transport protocol device query and management service (e.g., mctp. Openbmc_project. Mctpd@security) may be created that loads mctp information in two ways: one is that the service obtains pcie information or smbus information from the configuration file/usr/share/mctp/mctp_config. Json, executes the./ mctpd-bpci/smbus command, and starts the mctp service; alternatively, the pcie information is acquired through an entity-manager (module for managing each entity object in the system) service.
It should be noted that, in the embodiment of the present invention, the network card discovery layer 3 is mainly responsible for discovering an endpoint in a network, that is, discovering a network card device in the network, specifically, after the network card device accesses a system (that is, openBMC), the network card device may first send a discovery notification request to a bus owner (that is, openBMC), and the OpenBMC obtains, according to a transmission protocol (for example, a pc ie or an SMBUS) supported by the network card device according to the received discovery notification request, device information of the network card device, where the device information may be a device identifier, and then binds the device identifier with a corresponding data bus. Specifically, a discovery flow for a network card device supporting the mat over pcie protocol is shown in fig. 2.
It should be noted that, in the embodiment of the present invention, an extended type management component transport protocol module (i.e. an mctp-wrapper module) may be further disposed between the network card discovery layer 3 and the network card monitoring interface layer 4 (i.e. the nic service layer) 4 in practical application, where the mctp-wrapper module relies on the libmctp library to provide a libmctpw.so.1 dynamic library for an upper layer application, provide a registration client, provide an endpoint node device list, and provide an asynchronous message receiving and sending interface, and the mctp-wrapper module is mainly used to accept the upper layer network card monitoring interface layer 4 and enable a lower layer libmctp static library.
Wherein, the mctp-wrapper module provides an interface for the upper network card monitoring interface layer 4, which comprises: synchronous sending of messages to an endpoint, registering of a client, searching of a data bus through a monitoring protocol type, asynchronous sending of messages, sending of mctp payload (actual transmission) data to the endpoint, and receiving of return of endpoint data are performed, and the actions are used for initializing and sending of received data by the nic service layer.
It should be further noted that, according to the protocol type, the network card monitoring interface layer 4 in the embodiment of the present invention may provide two different services, namely, the nic-mctp-smbus service and the nic-mctp-pcie service, so as to provide a general interface for the upper network card monitoring service management layer to obtain monitoring information of various network cards. Specifically, initialization of two protocol types, namely a smbus protocol or a pcie protocol, can be realized through an initialization interface, and the initialization interface calls a function interface provided by an mctpd-wrapper module to register a series of methods, including: acquisition of mctp information, acquisition of link status, acquisition of version number id, enabling channel, disabling channel, setting mac address, ncsioem command, etc., as shown in fig. 5.
The network card monitoring service layer 5 in the embodiment of the invention mainly provides the nic-mgnt.service, can acquire various network card monitoring information of the network card equipment to be monitored through each layer of the lower layer, can also provide monitoring interfaces respectively corresponding to each accessed network card equipment for the upper layer monitoring service, and adds the acquired various network card monitoring information of the network card equipment to the corresponding monitoring interfaces. The network card monitoring service layer 5 is an upper layer monitoring service, and mainly supports to obtain static monitoring information and dynamic monitoring information of network card devices such as network card devices supporting an mcpp over pc ie protocol, network card devices supporting an mcpp over SMBUS protocol (such as an ocp network card and a pc ie network card), and provides a monitoring policy for obtaining the monitoring information, where the monitoring policy is specifically shown in fig. 6.
Compared with the monitoring design scheme in the prior art, the network card monitoring method and the network card monitoring device realize network card monitoring in a layered mode, and can reduce code reading quantity by multiplexing the shared interfaces. The scheme can also be used for expanding and monitoring any network card device supporting the mctp over pc ie and smbus protocol. Aiming at the monitoring of extensible equipment, if a traditional raid card supporting an mctp over pc ie protocol is added, an independent route needs to be completely copied and output, and the scheme of the invention can realize the monitoring of the raid card equipment, can multiplex a driving layer, a libmctp layer and an equipment discovery layer, and can add a raid service layer to realize the functions of acquiring information such as hard disk temperature, health state and the like and managing a virtual disk. The Raid card is a hardware device specially used for managing and realizing disk array technology, and multiple hardware drivers can be combined together to form a virtual hard disk array so as to improve the security and reliability of data.
Fig. 7 is a block diagram of an electronic device according to an embodiment of the present application, as shown in fig. 7, where the electronic device includes: a memory 20 for storing a computer program;
the processor 21 is configured to implement the steps of the network card monitoring system method of the baseboard management controller when executing the computer program.
The electronic device provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like.
Processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 21 may also comprise a main processor, which is a processor for processing data in an awake state, also called CPU (Central ProcessingUnit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing a computer program 201, where the computer program, after being loaded and executed by the processor 21, can implement the relevant steps of the network card monitoring system method of the baseboard management controller disclosed in any one of the foregoing embodiments. In addition, the resources stored in the memory 20 may further include an operating system 202, data 203, and the like, where the storage manner may be transient storage or permanent storage. The operating system 202 may include Windows, unix, linux, among others. The data 203 may include, but is not limited to, a set offset, etc.
In some embodiments, the electronic device may further include a display 22, an input-output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the structure shown in fig. 7 is not limiting of the electronic device and may include more or fewer components than shown.
It will be appreciated that if the network card monitoring system method of the baseboard management controller in the above embodiment is implemented in the form of a software functional unit and sold or used as a separate product, it may be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in part or in whole or in part in the form of a software product stored in a storage medium for performing all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random-access Memory (Random Access Memory, RAM), an electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, a magnetic disk, or an optical disk, etc. various media capable of storing program codes.
Based on this, as shown in fig. 8, the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium 30 stores a computer program 31, and the computer program 31 implements the steps of the network card monitoring system method of the baseboard management controller when executed by the processor.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (11)

1. The network card monitoring method of the baseboard management controller is applied to the open source baseboard management controller and is characterized by comprising the following steps of:
acquiring a transmission protocol supported by network card equipment to be monitored and a data bus corresponding to the network card equipment to be monitored;
determining a target driving layer corresponding to the transmission protocol based on the transmission protocol;
and acquiring monitoring information of the network card equipment to be monitored through the target driving layer and the data bus.
2. The method for monitoring a network card of a baseboard management controller according to claim 1, wherein the acquiring a transmission protocol supported by a network card device to be monitored and a data bus corresponding to the network card device to be monitored includes:
acquiring a unique identifier of network card equipment to be monitored;
and determining the transmission protocol and the data bus corresponding to the network card equipment to be monitored based on the unique identification and the established corresponding relation of the unique identification, the transmission protocol and the data bus.
3. The method for monitoring the network card of the baseboard management controller according to claim 1, wherein the process of establishing the correspondence among the unique identifier, the transmission protocol and the data bus comprises:
After the system is started, network card equipment discovery is carried out, and a transmission protocol supported by the network card equipment, a unique identifier of the network card equipment and a corresponding data bus are determined;
based on the transmission protocol of each network card device, the unique identification of the network card device and the corresponding data bus, the corresponding relationship among the unique identification of the network card device, the transmission protocol and the data bus is established.
4. A method for monitoring a network card of a baseboard management controller according to claim 3, wherein the transmission protocol is a management component transmission protocol based on a high-speed serial computer expansion bus standard or a management component transmission protocol based on a system management bus.
5. The method for monitoring the network card of the baseboard management controller according to claim 4, wherein the network card device discovery is performed after the system is started, and the transmission protocol supported by the network card device, the unique identifier of the network card device and the corresponding data bus are determined, including:
after the system is started, a command carrying a management component transmission protocol based on a system management bus is sent through each driving layer and each data bus;
according to the received first response information, determining that a transmission protocol supported by network card equipment returning the first response information is a management component transmission protocol based on a system management bus, determining a data bus corresponding to the network card equipment, and setting a unique identifier of the network card equipment;
After the system is started, receiving a broadcast of a discovery notification request sent by network card equipment;
determining that the transmission protocol supported by the network card equipment is a management component transmission protocol based on a high-speed serial computer expansion bus standard based on the discovery notification request;
and setting the unique identifier of the network card equipment in a broadcasting mode, and setting the attribute of the data bus according to the unique identifier so as to determine the corresponding data bus.
6. The network card monitoring method of the baseboard management controller according to claim 5, wherein the setting the unique identifier of the network card device by broadcasting includes:
transmitting a broadcast of a ready discovery request;
after receiving the broadcast of the preparation discovery response sent by the network card equipment, sending the broadcast of the endpoint discovery request;
receiving an endpoint discovery response returned by the network card device with the discovery identifier not found;
sending a request for setting unique identification to the network card equipment with the found identification being not found, so that the network card equipment can perform identification setting based on the request for setting unique identification;
and receiving a setting identification response returned by the network card equipment with the found identification being not found, and acquiring the unique identification of the network card equipment based on the setting identification response.
7. The method of claim 5, wherein the monitoring information includes network card dynamic information and network card static information.
8. A network card monitoring device of a baseboard management controller, which is applied to an open source baseboard management controller, and is characterized by comprising:
the acquisition module is used for acquiring a transmission protocol supported by the network card equipment to be monitored and a data bus corresponding to the network card equipment to be monitored;
a determining module, configured to determine a target driving layer corresponding to the transmission protocol based on the transmission protocol;
and the monitoring module is used for acquiring the monitoring information of the network card equipment to be monitored through the target driving layer and the data bus.
9. The network card monitoring system of the baseboard management controller is applied to an open source baseboard management controller and is characterized by comprising a driving layer, a communication layer, a network card discovery layer, a network card monitoring interface layer and a network card monitoring service layer which are sequentially arranged from a bottom layer to an application layer, wherein each driving layer aims at a transmission protocol; wherein:
the network card monitoring service layer is used for acquiring monitoring information of the network card equipment supporting the corresponding transmission protocol through the network card monitoring interface layer, the communication layer and the corresponding driving layer;
The network card monitoring interface layer is used for providing a monitoring interface for the network card monitoring service layer;
the network card discovery layer is used for discovering network card equipment and recording a transmission protocol supported by the network card equipment and a corresponding data bus;
and the communication layer is used for realizing communication with the network card equipment through the driving layer.
10. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the network card monitoring system method of the baseboard management controller according to any one of claims 1 to 7 when executing the computer program.
11. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the network card monitoring system method of the baseboard management controller according to any one of claims 1 to 7.
CN202310484736.XA 2023-04-28 2023-04-28 Network card monitoring method, device, system and equipment of baseboard management controller Pending CN116881072A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310484736.XA CN116881072A (en) 2023-04-28 2023-04-28 Network card monitoring method, device, system and equipment of baseboard management controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310484736.XA CN116881072A (en) 2023-04-28 2023-04-28 Network card monitoring method, device, system and equipment of baseboard management controller

Publications (1)

Publication Number Publication Date
CN116881072A true CN116881072A (en) 2023-10-13

Family

ID=88253606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310484736.XA Pending CN116881072A (en) 2023-04-28 2023-04-28 Network card monitoring method, device, system and equipment of baseboard management controller

Country Status (1)

Country Link
CN (1) CN116881072A (en)

Similar Documents

Publication Publication Date Title
CN101840346B (en) Method and system for deploying cloud host computer
US7363480B1 (en) Method, system, and computer-readable medium for updating the firmware of a computing device via a communications network
US20080196043A1 (en) System and method for host and virtual machine administration
CN110908753B (en) Intelligent fusion cloud desktop server, client and system
JP2009518703A (en) Method and system for communicating multiple interrupted runtime images
CN116541227B (en) Fault diagnosis method and device, storage medium, electronic device and BMC chip
CN110520844A (en) Cloud management platform, virtual machine management method and its system
CN106790403B (en) Method for realizing mobile cloud computing intermediate platform and method for realizing distribution
US20050240669A1 (en) BIOS framework for accommodating multiple service processors on a single server to facilitate distributed/scalable server management
US11113070B1 (en) Automated identification and disablement of system devices in a computing system
CN116521209B (en) Upgrading method and device of operating system, storage medium and electronic equipment
CN116701285A (en) Remote access control apparatus, remote access control method, remote access control device, and computer readable medium
US8078637B1 (en) Memory efficient peim-to-peim interface database
CN116881072A (en) Network card monitoring method, device, system and equipment of baseboard management controller
CN116339756A (en) Application program mounting method, device, equipment and storage medium
US6636964B1 (en) Method and apparatus for loading an object-oriented operating system by providing an initial execution environment and migrating to a core execution environment thereafter
US20050132084A1 (en) Method and apparatus for providing server local SMBIOS table through out-of-band communication
US10402454B1 (en) Obtaining platform-specific information in a firmware execution environment
US11921582B2 (en) Out of band method to change boot firmware configuration
WO2024067053A1 (en) Application program installation method and electronic device
CN115509590B (en) Continuous deployment method and computer equipment
US11789821B1 (en) Out-of-band method to change boot firmware configuration
CN117389691B (en) Virtual machine based on embedded operating system
CN117687703B (en) Method, device and system for starting server, storage medium and electronic equipment
US11372653B1 (en) Runtime access to firmware platform configuration data

Legal Events

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