CN113626276A - Method, system, terminal and storage medium for identifying HBA card model of server - Google Patents
Method, system, terminal and storage medium for identifying HBA card model of server Download PDFInfo
- Publication number
- CN113626276A CN113626276A CN202110727630.9A CN202110727630A CN113626276A CN 113626276 A CN113626276 A CN 113626276A CN 202110727630 A CN202110727630 A CN 202110727630A CN 113626276 A CN113626276 A CN 113626276A
- Authority
- CN
- China
- Prior art keywords
- equipment
- information
- pcie
- linked list
- scanning
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000012216 screening Methods 0.000 claims abstract description 16
- 230000002457 bidirectional effect Effects 0.000 claims description 24
- 230000015654 memory Effects 0.000 claims description 20
- 238000012545 processing Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 238000007726 management method Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 108010028984 3-isopropylmalate dehydratase Proteins 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000006467 substitution reaction Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 241000700605 Viruses Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3027—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3051—Monitoring 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0026—PCI express
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Mathematical Physics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides a method, a system, a terminal and a storage medium for identifying the HBA card type of a server, comprising the following steps: scanning PCIE equipment at a server starting equipment scanning stage to acquire PCIE equipment information on a mainboard direct connection and a switching card; screening target PCIE equipment information containing first parameters of the HBA card from the PCIE equipment information; identifying a first parameter from target PCIE equipment information, wherein the first parameter comprises a sub-equipment identification code, a sub-equipment manufacturer identification code, a corresponding equipment type and a corresponding message type; and summarizing and storing the identified first parameters to the doubly linked list, sending the summarized first parameters in the doubly linked list to the BMC, and identifying the model of the HBA card by the BMC according to the local second parameters and the received first parameters. The invention can obtain the detailed model information of the HBA card under the condition of not influencing the running state of the server and the service, thereby effectively utilizing the HBA card.
Description
Technical Field
The invention relates to the technical field of servers, in particular to a method, a system, a terminal and a storage medium for identifying the HBA card type of a server.
Background
The HBA (host Bus adapter), a host Bus adapter, is a circuit board or integrated circuit adapter that provides input/output (I/O) processing and physical connections between a server and a storage device. Because the HBA relieves the host processor of the data storage and retrieval tasks, it can improve the performance of the server. An HBA and its associated disk subsystem are sometimes collectively referred to as a disk channel.
HBAs are used in storage systems to connect computer internal buses to storage networks. The HBA is the physical connection between the I/O channel inside the server and the I/O channel of the storage system. The most commonly used internal server I/O channels are PCI and Sbus, which are the communication protocols that connect the server CPU to peripheral devices. The I/O channel of the storage system is actually a fibre channel. The role of the HBA is to translate between the PCI or Sbus and FC protocols, which are internal channel protocols.
In view of the unique advantages of HBA cards, the M5 platform began to introduce HBA cards, but there are two problems that exist:
1) it is not possible to distinguish between 16G and 32G.
2) It is not possible to distinguish between single or double ports.
Without obtaining accurate model information of the HBA card, the HBA card cannot be programmed with appropriate task load bearing capacity, which may cause resource waste or overload operation of the HBA card.
Disclosure of Invention
In view of the above-mentioned deficiencies in the prior art, the present invention provides a method, a system, a terminal and a storage medium for identifying the HBA card type of a server, so as to solve the above-mentioned technical problems.
In a first aspect, the present invention provides a method for identifying a server HBA card model, including:
scanning PCIE equipment at a server starting equipment scanning stage to acquire PCIE equipment information on a mainboard direct connection and a switching card;
screening target PCIE equipment information containing first parameters of the HBA card from the PCIE equipment information;
identifying a first parameter from target PCIE equipment information, wherein the first parameter comprises a sub-equipment identification code, a sub-equipment manufacturer identification code, a corresponding equipment type and a corresponding message type;
and summarizing and storing the identified first parameters to the doubly linked list, sending the summarized first parameters in the doubly linked list to the BMC, and identifying the model of the HBA card by the BMC according to the local second parameters and the received first parameters.
Further, scanning the PCIE device at the server boot device scanning stage, and acquiring PCIE device information on the motherboard directly connected to the adapter card, including:
and judging whether the scanning authority of the PCIE equipment is started or not in the scanning stage, and executing the scanning of the PCIE equipment if the scanning authority is started.
Further, screening out target PCIE device information including the first parameter of the HBA card from the PCIE device information includes:
searching for a target PCIE device by taking the PCIE device name related to the first parameter as a keyword;
and clearing the PCIE equipment information except the target PCIE equipment information.
Further, summarize the first parameter of discerning and save to the two-way linked list to summarize the first parameter in the two-way linked list and send to BMC, BMC discerns HBA card type number according to local second parameter and the first parameter of receiving, include:
initializing a head node of a bidirectional linked list pointing to the bidirectional linked list in a ward;
writing a first parameter identified from each piece of target PCIE equipment information into a bidirectional linked list according to the head node;
the data in the two-way linked list is sent to the BMC through a designated ipmitool command, and the BMC identifies HBA card equipment information by combining different equipment model information of local equipment manufacturers and the same manufacturers and the received data and stores the equipment information to an equipment list;
and inquiring configuration information corresponding to the equipment from an equipment database according to the equipment information, wherein the configuration information comprises the HBA card model.
In a second aspect, the present invention provides a system for identifying a HBA card model of a server, including:
the equipment scanning unit is used for scanning the PCIE equipment at the starting-up equipment scanning stage of the server and acquiring the PCIE equipment information on the direct connection of the mainboard and the adapter card;
the target screening unit is used for screening target PCIE equipment information containing the first parameter of the HBA card from the PCIE equipment information;
the device comprises a parameter identification unit, a message type identification unit and a message sending unit, wherein the parameter identification unit is used for identifying a first parameter from target PCIE device information, and the first parameter comprises a sub-device identification code, a sub-device manufacturer identification code, a corresponding device type and a corresponding message type;
and the model identification unit is used for summarizing and storing the identified first parameters to the doubly linked list, sending the summarized first parameters in the doubly linked list to the BMC, and identifying the model of the HBA card by the BMC according to the local second parameters and the received first parameters.
Further, the device scanning unit includes:
and the scanning execution module is used for judging whether the scanning permission of the PCIE equipment is started in the scanning stage, and executing the scanning of the PCIE equipment if the scanning permission is started.
Further, the target screening unit includes:
the target searching module is used for searching a target PCIE device by taking the PCIE device name related to the first parameter as a keyword;
and the information clearing module is used for clearing the PCIE equipment information except the target PCIE equipment information.
Further, the model identification unit includes:
the linked list processing module is used for initializing head nodes of the bidirectional linked list pointing to the ward of the bidirectional linked list;
a data writing module, configured to write a first parameter identified from each piece of target PCIE device information into a bidirectional linked list according to the head node;
the device identification module is used for sending data in the two-way linked list to the BMC through a specified ipmitool command, and the BMC identifies device information by combining different device model information of a local device manufacturer and the same manufacturer with the received data and stores the device information to a device list;
and inquiring configuration information corresponding to the equipment from an equipment database according to the equipment information, wherein the configuration information comprises the HBA card model.
In a third aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program which,
the processor is used for calling and running the computer program from the memory so as to make the terminal execute the method of the terminal.
In a fourth aspect, a computer storage medium is provided having stored therein instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.
The beneficial effect of the invention is that,
the method for identifying the type of the HBA card of the server obtains all PCIE equipment information by scanning PCIE equipment, then inquires a sub-equipment identification code and a sub-equipment manufacturer identification code as well as a corresponding equipment type and a corresponding message type from the PCIE equipment information, sends the information to a BMC (baseboard management controller), identifies the HBA card equipment information by combining locally stored equipment manufacturer and different equipment type information of the same manufacturer, and inquires corresponding configuration information according to the HBA card equipment information, so that the detailed type information of the HBA card is obtained. The invention can obtain the detailed model information of the HBA card under the condition of not influencing the running state of the server and the service, thereby effectively utilizing the HBA card.
According to the identification system for the HBA card type number of the server, provided by the invention, the equipment scanning unit acquires all PCIE equipment information by scanning PCIE equipment, then the target screening unit and the parameter identification unit inquire the sub-equipment identification code and the sub-equipment manufacturer identification code as well as the corresponding equipment type and message type from the PCIE equipment information and send the information to the BMC, the BMC identifies the HBA card equipment information by combining locally stored equipment manufacturer and different equipment type information of the same manufacturer, and inquires corresponding configuration information according to the HBA card equipment information, so that the detailed type information of the HBA card is acquired. The invention can obtain the detailed model information of the HBA card under the condition of not influencing the running state of the server and the service, thereby effectively utilizing the HBA card.
The terminal provided by the invention comprises a processor, wherein the processor executes the method for identifying the HBA card model of the server, acquires all PCIE equipment information by scanning PCIE equipment, then inquires a sub-equipment identification code and a sub-equipment manufacturer identification code as well as a corresponding equipment type and a corresponding message type from the PCIE equipment information, and sends the information to a BMC (baseboard management controller), and the BMC identifies the HBA card equipment information by combining locally stored equipment manufacturer information and different equipment model information of the same manufacturer, inquires corresponding configuration information according to the HBA card equipment information, thereby acquiring the detailed model information of the HBA card. The invention can obtain the detailed model information of the HBA card under the condition of not influencing the running state of the server and the service, thereby effectively utilizing the HBA card.
The storage medium provided by the invention stores a program capable of executing the method for identifying the HBA card type of the server, acquires all PCIE equipment information by scanning PCIE equipment, then inquires a sub-equipment identification code and a sub-equipment manufacturer identification code as well as a corresponding equipment type and a corresponding message type from the PCIE equipment information, and sends the information to a BMC (baseboard management controller), and the BMC identifies the HBA card equipment information by combining locally stored equipment manufacturer information and different equipment type information of the same manufacturer, inquires corresponding configuration information according to the HBA card equipment information, thereby acquiring the detailed type information of the HBA card. The invention can obtain the detailed model information of the HBA card under the condition of not influencing the running state of the server and the service, thereby effectively utilizing the HBA card.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
FIG. 2 is a schematic flow diagram of a parameter identification process of a method of one embodiment of the invention.
Fig. 3 is a schematic flow diagram of a device identification process of a method of one embodiment of the invention.
FIG. 4 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following explains key terms appearing in the present invention.
The BMC executes a server remote Management controller, which is called Basebard Management controller in English. The method can perform operations such as firmware upgrading, machine equipment checking and the like on the machine in a state that the machine is not started. Fully implementing IPMI functionality in a BMC requires a powerful 16-bit or 32-bit microcontroller as well as RAM for data storage, flash memory and firmware for non-volatile data storage, providing basic remote manageability in terms of secure remote restart, secure re-power-up, LAN alerts and system health monitoring. In addition to the basic IPMI function and system operation monitoring function, the mBMC enables selection and protection of BIOS flash devices by storing the previous BIOS using one of 2 flash memories. For example, when the system cannot be started after the remote BIOS is upgraded, the remote administrator can switch back to the BIOS image that worked before to start the system. Once BIOS is upgraded, BIOS image can be locked to prevent virus from invading it.
BIOS is an abbreviation of English "Basic Input Output System", and the name of Chinese after translation is "Basic Input Output System". It is an industry standard firmware interface for IBMPC compatible systems. It is a set of programs solidified on a ROM chip on the internal mainboard of computer, it stores the most important basic input and output program of computer, self-checking program after starting up and system self-starting program, it can read and write the specific information set by system from CMOS. Its primary function is to provide the lowest level, most direct hardware setup and control for the computer. In addition, the BIOS provides some system parameters to the operating system. The change of system hardware is hidden by BIOS, and programs use BIOS functions rather than directly control the hardware. Modern operating systems ignore the abstraction layer provided by the BIOS and directly control the hardware components.
An Intelligent Platform Management Interface (Intelligent Platform Management Interface) is originally an industrial standard adopted by peripheral devices of an enterprise system with an Intel architecture. IPMI is also an open free standard that users can use without paying additional fees. IPMI can span different operating systems, firmware and hardware platforms, and can intelligently monitor, control and automatically report the operation status of a large number of servers, so as to reduce the cost of the server system.
The double linked list is also called double linked list, and is one kind of linked list, and each data node has two pointers pointing to direct successor and direct predecessor. Therefore, starting from any node in the doubly linked list, its predecessor and successor nodes can be easily accessed. Generally we construct a bi-directional circular linked list.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention. The execution subject in fig. 1 may be a server HBA card type number identification system.
As shown in fig. 1, the method includes:
and 140, summarizing and storing the identified first parameters to the doubly linked list, sending the summarized first parameters in the doubly linked list to the BMC, and identifying the model of the HBA card by the BMC according to the local second parameters and the received first parameters.
In order to facilitate understanding of the present invention, the method for identifying the server HBA card model provided by the present invention is further described below with reference to the principle of the method for identifying the server HBA card model of the present invention and the process for identifying the server HBA card model in the embodiment.
Specifically, referring to fig. 2 and 3, the method for identifying the HBA card model of the server includes:
s1, scanning the PCIE equipment in the scanning stage of the server starting equipment, and acquiring the PCIE equipment information on the direct connection of the mainboard and the adapter card.
And judging whether the scanning authority of the PCIE equipment is started or not in the scanning stage, and executing the scanning of the PCIE equipment if the scanning authority is started.
And starting the server. In the device scanning stage, a switch for transmitting SID and SVID is added (for the unnecessary customers, the switch is not needed to be opened, the information transmission is added, and the starting speed and the like are influenced). And if the switch is turned on, starting scanning the PCIE equipment, and if the switch is turned off, exiting the HBA card type number identification program and prompting the reason for exiting.
And S2, screening target PCIE equipment information containing the first parameter of the HBA card from the PCIE equipment information.
Searching for a target PCIE device by taking the PCIE device name related to the first parameter as a keyword; and clearing the PCIE equipment information except the target PCIE equipment information.
Since there are many PCIE devices in the server, it is necessary to determine a target PCIE device, that is, to use a target PCIE device name related to the HBA card as a keyword, and then search for target PCIE device information from the PCIE device information scanned in step S1. And eliminating PCIE equipment information which does not need to be identified except the target PCIE equipment information. The target PCIE device information may include information of a plurality of PCIE devices.
Therefore, the data processing amount can be reduced, and the data processing efficiency can be improved.
S3, identifying a first parameter from the target PCIE device information, where the first parameter includes a sub device identification code, a sub device vendor identification code, and a corresponding device type and a corresponding message type.
And judging whether the target PCIE equipment information is valid or not, and clearing the invalid target PCIE equipment information. The information such as SID (sub-device identification code, which is a secondary code of a device authorized to be manufactured), SVID (sub-device vendor identification code, which is an identification code of a secondary manufacturer authenticated by a PCI-SGI organization, which is a unique vendor identifier and does not allow duplication name), and corresponding device type, message type, etc. are inquired from the valid target PCIE device information.
And S4, summarizing and storing the identified first parameters to the doubly linked list, sending the summarized first parameters in the doubly linked list to the BMC, and identifying the model of the HBA card by the BMC according to the local second parameters and the received first parameters.
Initializing a head node of a bidirectional linked list pointing to the bidirectional linked list in a ward;
writing a first parameter identified from each piece of target PCIE equipment information into a bidirectional linked list according to the head node; the data in the two-way linked list is sent to the BMC through a designated ipmitool command, and the BMC identifies HBA card equipment information by combining different equipment model information of local equipment manufacturers and the same manufacturers and the received data and stores the equipment information to an equipment list; and inquiring configuration information corresponding to the equipment from an equipment database according to the equipment information, wherein the configuration information comprises the HBA card model.
Initializing a head node of the bidirectional linked list pointed by the ward of the bidirectional linked list, and storing the first parameters identified from the information of each target PCIE device to the initialized bidirectional linked list until all the identified first parameters are stored. And calling data of the bidirectional linked list, sequentially sending information in the linked list to the BMC according to an ipmitool command format agreed with the BMC, releasing resources in the linked list, and exiting the HBA card type number identification program and prompting that the bidirectional linked list is empty if the bidirectional linked list is empty.
The BMC receives an ipmitool command sent by the BIOS. And analyzing information of each field related to the PCIE according to the protocol content. And identifying information of the PCIE equipment by combining information such as VID, DID and the like according to the SID and the SVID, and displaying the information in an equipment list of the BMC according to the identified information.
When scanning a PCIE device, the BIOS needs to transmit an SID (sub-device identifier, which is a secondary code of a device authorized to be manufactured) and an SVID (sub-device vendor identifier, which is an identifier of a secondary manufacturer authorized by a PCI-SGI organization, and is a unique vendor identifier and does not allow duplication) to the BMC, and when the BIOS transmits these two pieces of information to the BMC, the BMC analyzes the information of the device in combination with VID (device vendor) and DID (different device types/model information of the same vendor), and displays the information in a device list of the BMC, and a user can query all configuration information of the device according to the displayed information, where the configuration information includes detailed model information.
Specifically, the method comprises the following steps:
BIOS end:
(1) and starting the server.
(2) In the device scanning stage, a switch for transmitting SID and SVID is added (for the unnecessary customers, the switch is not needed to be opened, the information transmission is added, and the starting speed and the like are influenced).
(3) If the switch is turned on, scanning the PCIE equipment is started, and if the switch is turned off, the following steps are not performed.
(4) The doubly linked list is initialized and the head node pointing to the doubly linked list is returned.
(5) And acquiring PCIE equipment information on the direct connection of the mainboard and the Raiser card.
(6) And according to the conditions, eliminating PCIE equipment information which does not need to be identified.
(7) And sequentially acquiring the information of the rest PCIE equipment.
(8) Determine whether PCIE device information is currently valid? If yes, go to step 9, if no, go to step 10.
(9) Inquiring SID and SVID from PCIE equipment information to be identified, putting the information such as the corresponding equipment type and the message type together into an initialized linked list, acquiring the next equipment information, and executing the step 8.
(10) And if the linked list is not empty, sequentially sending the information in the linked list to the BMC according to an ipmitool command format agreed with the BMC, releasing the resources in the linked list, and if the linked list is empty, executing the step 11.
(11) The function ends and the server continues with POST.
BMC end:
(1) and receiving an ipmitool command sent by the BIOS.
(2) And analyzing information of each field related to the PCIE according to the protocol content.
(3) According to the SID and SVID, combined with VID and DID information, the information for identifying PCIE equipment,
(4) and displaying the information to a device list of the BMC according to the identified information.
In the method for identifying the model of the HBA card of the server according to this embodiment, all PCIE device information is acquired by scanning PCIE devices, then a sub device identification code, a sub device manufacturer identification code, a corresponding device type and a corresponding message type are queried from the PCIE device information, and these pieces of information are sent to the BMC, the BMC identifies the HBA card device information by combining locally stored device manufacturer and different device model information of the same manufacturer, and queries corresponding configuration information according to the HBA card device information, thereby acquiring detailed model information of the HBA card. The invention can obtain the detailed model information of the HBA card under the condition of not influencing the running state of the server and the service, thereby effectively utilizing the HBA card.
As shown in fig. 4, the system 400 includes:
the device scanning unit 410 is configured to scan the PCIE device at a server boot device scanning stage, and acquire PCIE device information on the motherboard direct connection and the adapter card;
a target screening unit 420, configured to screen target PCIE device information including the first parameter of the HBA card from the PCIE device information;
a parameter identification unit 430, configured to identify a first parameter from target PCIE device information, where the first parameter includes a sub device identification code, a sub device vendor identification code, and a corresponding device type and a corresponding message type;
and the model identification unit 440 is configured to store the identified first parameters to the doubly linked list in a summary manner, and send the summarized first parameters in the doubly linked list to the BMC, and the BMC identifies the model of the HBA card according to the local second parameters and the received first parameters.
Optionally, as an embodiment of the present invention, the device scanning unit includes:
and the scanning execution module is used for judging whether the scanning permission of the PCIE equipment is started in the scanning stage, and executing the scanning of the PCIE equipment if the scanning permission is started.
Optionally, as an embodiment of the present invention, the target screening unit includes:
the target searching module is used for searching a target PCIE device by taking the PCIE device name related to the first parameter as a keyword;
and the information clearing module is used for clearing the PCIE equipment information except the target PCIE equipment information.
Optionally, as an embodiment of the present invention, the model identification unit includes:
the linked list processing module is used for initializing head nodes of the bidirectional linked list pointing to the ward of the bidirectional linked list;
a data writing module, configured to write a first parameter identified from each piece of target PCIE device information into a bidirectional linked list according to the head node;
the device identification module is used for sending data in the two-way linked list to the BMC through a specified ipmitool command, and the BMC identifies device information by combining different device model information of a local device manufacturer and the same manufacturer with the received data and stores the device information to a device list;
and inquiring configuration information corresponding to the equipment from an equipment database according to the equipment information, wherein the configuration information comprises the HBA card model.
Fig. 5 is a schematic structural diagram of a terminal 500 according to an embodiment of the present invention, where the terminal 500 may be used to execute the method for identifying the model of the HBA card of the server according to the embodiment of the present invention.
Among them, the terminal 500 may include: a processor 510, a memory 520, and a communication unit 530. The components communicate via one or more buses, and those skilled in the art will appreciate that the architecture of the servers shown in the figures is not intended to be limiting, and may be a bus architecture, a star architecture, a combination of more or less components than those shown, or a different arrangement of components.
The memory 520 may be used for storing instructions executed by the processor 510, and the memory 520 may be implemented by any type of volatile or non-volatile storage terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The executable instructions in memory 520, when executed by processor 510, enable terminal 500 to perform some or all of the steps in the method embodiments described below.
The processor 510 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by operating or executing software programs and/or modules stored in the memory 520 and calling data stored in the memory. The processor may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same or different functions. For example, processor 510 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
A communication unit 530 for establishing a communication channel so that the storage terminal can communicate with other terminals. And receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
Therefore, the invention acquires all PCIE equipment information by scanning the PCIE equipment, then inquires the sub-equipment identification code and the sub-equipment manufacturer identification code and the corresponding equipment type and message type from the PCIE equipment information, and sends the information to the BMC, the BMC identifies the HBA card equipment information by combining the locally stored equipment manufacturer and the different equipment model information of the same manufacturer, inquires the corresponding configuration information according to the HBA card equipment information, thereby acquiring the detailed model information of the HBA card. The present invention can obtain the detailed model information of the HBA card without affecting the operation state of the server and the service, thereby effectively utilizing the HBA card.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of a software product, where the computer software product is stored in a storage medium, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like, and the storage medium can store program codes, and includes instructions for enabling a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, and the like) to perform all or part of the steps of the method in the embodiments of the present invention.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. A method for identifying the HBA card model of a server is characterized by comprising the following steps:
scanning PCIE equipment at a server starting equipment scanning stage to acquire PCIE equipment information on a mainboard direct connection and a switching card;
screening target PCIE equipment information containing first parameters of the HBA card from the PCIE equipment information;
identifying a first parameter from target PCIE equipment information, wherein the first parameter comprises a sub-equipment identification code, a sub-equipment manufacturer identification code, a corresponding equipment type and a corresponding message type;
and summarizing and storing the identified first parameters to the doubly linked list, sending the summarized first parameters in the doubly linked list to the BMC, and identifying the model of the HBA card by the BMC according to the local second parameters and the received first parameters.
2. The method of claim 1, wherein scanning PCIE devices in a scanning stage of a server boot device to obtain PCIE device information on a motherboard direct connection and a riser card comprises:
and judging whether the scanning authority of the PCIE equipment is started or not in the scanning stage, and executing the scanning of the PCIE equipment if the scanning authority is started.
3. The method of claim 1, wherein the step of screening the target PCIE device information including the first parameter of the HBA card from the PCIE device information includes:
searching for a target PCIE device by taking the PCIE device name related to the first parameter as a keyword;
and clearing the PCIE equipment information except the target PCIE equipment information.
4. The method of claim 1, wherein storing the identified first parameters in a summary manner to a doubly linked list, and sending the summarized first parameters in the doubly linked list to a BMC, wherein the BMC identifies the HBA card type number according to the local second parameters and the received first parameters, and wherein the identifying comprises:
initializing a head node of a bidirectional linked list pointing to the bidirectional linked list in a ward;
writing a first parameter identified from each piece of target PCIE equipment information into a bidirectional linked list according to the head node;
the data in the two-way linked list is sent to the BMC through a designated ipmitool command, and the BMC identifies HBA card equipment information by combining different equipment model information of local equipment manufacturers and the same manufacturers and the received data and stores the equipment information to an equipment list;
and inquiring configuration information corresponding to the equipment from an equipment database according to the equipment information, wherein the configuration information comprises the HBA card model.
5. A system for identifying a server HBA card type number, comprising:
the equipment scanning unit is used for scanning the PCIE equipment at the starting-up equipment scanning stage of the server and acquiring the PCIE equipment information on the direct connection of the mainboard and the adapter card;
the target screening unit is used for screening target PCIE equipment information containing the first parameter of the HBA card from the PCIE equipment information;
the device comprises a parameter identification unit, a message type identification unit and a message sending unit, wherein the parameter identification unit is used for identifying a first parameter from target PCIE device information, and the first parameter comprises a sub-device identification code, a sub-device manufacturer identification code, a corresponding device type and a corresponding message type;
and the model identification unit is used for summarizing and storing the identified first parameters to the doubly linked list, sending the summarized first parameters in the doubly linked list to the BMC, and identifying the model of the HBA card by the BMC according to the local second parameters and the received first parameters.
6. The system of claim 5, wherein the device scanning unit comprises:
and the scanning execution module is used for judging whether the scanning permission of the PCIE equipment is started in the scanning stage, and executing the scanning of the PCIE equipment if the scanning permission is started.
7. The system of claim 5, wherein the target screening unit comprises:
the target searching module is used for searching a target PCIE device by taking the PCIE device name related to the first parameter as a keyword;
and the information clearing module is used for clearing the PCIE equipment information except the target PCIE equipment information.
8. The system according to claim 5, wherein the model identification unit comprises:
the linked list processing module is used for initializing head nodes of the bidirectional linked list pointing to the ward of the bidirectional linked list;
a data writing module, configured to write a first parameter identified from each piece of target PCIE device information into a bidirectional linked list according to the head node;
the device identification module is used for sending data in the two-way linked list to the BMC through a specified ipmitool command, and the BMC identifies device information by combining different device model information of a local device manufacturer and the same manufacturer with the received data and stores the device information to a device list;
and inquiring configuration information corresponding to the equipment from an equipment database according to the equipment information, wherein the configuration information comprises the HBA card model.
9. A terminal, comprising:
a processor;
a memory for storing instructions for execution by the processor;
wherein the processor is configured to perform the method of any one of claims 1-4.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110727630.9A CN113626276B (en) | 2021-06-29 | 2021-06-29 | Method, system, terminal and storage medium for identifying type of server HBA card |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110727630.9A CN113626276B (en) | 2021-06-29 | 2021-06-29 | Method, system, terminal and storage medium for identifying type of server HBA card |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113626276A true CN113626276A (en) | 2021-11-09 |
CN113626276B CN113626276B (en) | 2023-07-14 |
Family
ID=78378573
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110727630.9A Active CN113626276B (en) | 2021-06-29 | 2021-06-29 | Method, system, terminal and storage medium for identifying type of server HBA card |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113626276B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114064549A (en) * | 2021-11-23 | 2022-02-18 | 上海闻泰电子科技有限公司 | Method and device for converting device description information, computer device and medium |
TWI814617B (en) * | 2022-09-27 | 2023-09-01 | 新加坡商鴻運科股份有限公司 | Method and device for setting hba card boot disk and computer storage media |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111475398A (en) * | 2020-03-08 | 2020-07-31 | 苏州浪潮智能科技有限公司 | Server NIC diagnosis method, system, terminal and storage medium |
-
2021
- 2021-06-29 CN CN202110727630.9A patent/CN113626276B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111475398A (en) * | 2020-03-08 | 2020-07-31 | 苏州浪潮智能科技有限公司 | Server NIC diagnosis method, system, terminal and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114064549A (en) * | 2021-11-23 | 2022-02-18 | 上海闻泰电子科技有限公司 | Method and device for converting device description information, computer device and medium |
TWI814617B (en) * | 2022-09-27 | 2023-09-01 | 新加坡商鴻運科股份有限公司 | Method and device for setting hba card boot disk and computer storage media |
Also Published As
Publication number | Publication date |
---|---|
CN113626276B (en) | 2023-07-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5748980A (en) | System for configuring a computer system | |
US5655148A (en) | Method for automatically configuring devices including a network adapter without manual intervention and without prior configuration information | |
US5193174A (en) | System for automatically redirecting information to alternate system console in response to the comparison of present and default system configuration in personal computer system | |
CN110134446B (en) | Method for starting PCIE equipment scanning | |
CN113626276B (en) | Method, system, terminal and storage medium for identifying type of server HBA card | |
CN114003538B (en) | Identification method of intelligent network card and intelligent network card | |
US6546482B1 (en) | Invalid configuration detection resource | |
CN112699071B (en) | USB port binding structure and method based on Linux system | |
CN105068946A (en) | Android device identification method and apparatus | |
CN114003445B (en) | BMC I2C monitoring function test method, system, terminal and storage medium | |
US20170249165A1 (en) | Usb wireless network card configuration methods, host, usb wireless network card and communication system | |
CN114024853A (en) | Hardware information collection method and system for bare metal node and related components | |
CN106997313B (en) | Signal processing method and system of application program and terminal equipment | |
RU2643481C2 (en) | Method of identification of operating system type and usb device | |
CN117806716A (en) | Processing method and device for modifying SMBIOS Type information | |
CN113190279A (en) | Pre-boot function control method, system and medium | |
CN115098342A (en) | System log collection method, system, terminal and storage medium | |
CN114253573A (en) | PCIe device firmware batch upgrading method, system, terminal and storage medium | |
CN114968386A (en) | Equipment information management method, device and equipment of electronic equipment | |
CN114722927A (en) | Collapse clustering method and device, electronic equipment and storage medium | |
CN114385537A (en) | Page slot number dynamic allocation method, device, equipment and medium | |
CN112667544A (en) | Method, device, system and medium for controlling mainboard slot enabling | |
CN113656378A (en) | Server management method, device and medium | |
CN110555090B (en) | Method, system, terminal and storage medium for automatically acquiring CPU BUS Number | |
US7447900B2 (en) | Method and a system for designating a user selected console device as the primary console device for a particular computer |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |