CN113626276B - Method, system, terminal and storage medium for identifying type of server HBA card - Google Patents

Method, system, terminal and storage medium for identifying type of server HBA card Download PDF

Info

Publication number
CN113626276B
CN113626276B CN202110727630.9A CN202110727630A CN113626276B CN 113626276 B CN113626276 B CN 113626276B CN 202110727630 A CN202110727630 A CN 202110727630A CN 113626276 B CN113626276 B CN 113626276B
Authority
CN
China
Prior art keywords
equipment
information
pcie
linked list
parameters
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.)
Active
Application number
CN202110727630.9A
Other languages
Chinese (zh)
Other versions
CN113626276A (en
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 CN202110727630.9A priority Critical patent/CN113626276B/en
Publication of CN113626276A publication Critical patent/CN113626276A/en
Application granted granted Critical
Publication of CN113626276B publication Critical patent/CN113626276B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3027Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a bus
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0026PCI express
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy 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 type of a server HBA card, which comprise the following steps: scanning PCIE equipment in a scanning stage of the starting equipment of the server to acquire PCIE equipment information on the direct connection and transfer card of the main board; screening target PCIE equipment information containing the 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 message type; and the identified first parameters are summarized and stored into a double-linked list, the summarized first parameters in the double-linked list are sent to the BMC, and the BMC identifies the type of the HBA card 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 conditions of not influencing the running state of the server and not influencing the service, thereby effectively utilizing the HBA card.

Description

Method, system, terminal and storage medium for identifying type of server HBA card
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 type of a server HBA card.
Background
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 servers and storage devices. Because the HBA relieves the host processor of the burden of data storage and retrieval tasks, it can improve server performance. An HBA and the disk subsystem to which it is connected are sometimes collectively referred to as a disk channel.
HBAs are used in storage systems to connect computer internal buses to a storage network. The HBA is a physical connection between an I/O channel inside the server and an I/O channel of the storage system. The most commonly used internal I/O channels of the server are PCI and Sbus, which are communication protocols that connect the server CPU and peripheral devices. The I/O channels of a storage system are effectively fibre channel. The HBA is used for realizing conversion between an internal channel protocol PCI or Sbus and an FC protocol.
In view of the unique advantages of HBA cards, the M5 platform began to introduce HBA cards, but there are currently two problems:
1) It is impossible to distinguish between 16G and 32G.
2) It is impossible to distinguish between single-port and double-port.
Without obtaining accurate model information of the HBA card, the HBA card cannot be provided with proper task amount bearing capacity, which may cause resource waste or overload operation of the HBA card.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a method, a system, a terminal and a storage medium for identifying the type of a server HBA card, so as to solve the technical problems.
In a first aspect, the present invention provides a method for identifying a HBA card model of a server, including:
scanning PCIE equipment in a scanning stage of the starting equipment of the server to acquire PCIE equipment information on the direct connection and transfer card of the main board;
screening target PCIE equipment information containing the 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 message type;
and the identified first parameters are summarized and stored into a double-linked list, the summarized first parameters in the double-linked list are sent to the BMC, and the BMC identifies the type of the HBA card according to the local second parameters and the received first parameters.
Further, scanning PCIE devices in a server startup device scanning stage, obtaining PCIE device information on a main board direct connection and transfer card, including:
and judging whether to start PCIE equipment scanning permission or not in the scanning stage, and executing PCIE equipment scanning if the permission is started.
Further, screening target PCIE device information including the first parameter of the HBA card from PCIE device information includes:
taking the PCIE equipment name related to the first parameter as a keyword, and searching for target PCIE equipment;
and clearing PCIE device information except the target PCIE device information.
Further, the identified first parameters are summarized and stored to a doubly linked list, and the summarized first parameters in the doubly linked list are sent to the BMC, and the BMC identifies the type of the HBA card according to the local second parameters and the received first parameters, including:
initializing a doubly linked list and returning a head node pointing to the doubly linked list;
writing a first parameter identified from each item of PCIE equipment information into a double-linked list according to the head node;
the data in the bidirectional linked list is sent to the BMC through a specified ipmitool command, and the BMC combines the local equipment manufacturer, different equipment model information of the same manufacturer and the received data to identify HBA card equipment information 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 an HBA card model.
In a second aspect, the present invention provides a system for identifying a HBA card model of a server, including:
the device scanning unit is used for scanning PCIE devices in a server startup device scanning stage and acquiring PCIE device information on the main board direct connection and the adapter card;
the target screening unit is used for screening target PCIE equipment information containing the first parameters of the HBA card from the PCIE equipment information;
the device comprises a parameter identification unit, a message type identification unit and a message type identification unit, wherein the parameter identification unit is used for identifying a first parameter from target PCIE equipment information, and the first parameter comprises a sub-equipment identification code, a sub-equipment manufacturer identification code, a corresponding equipment type and a message type;
the model identification unit is used for summarizing and storing the identified first parameters into the doubly-linked list, sending summarized first parameters in the doubly-linked list to the BMC, and identifying the HBA card model 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 PCIE equipment scanning permission is started in the scanning stage, and executing PCIE equipment scanning if the permission is started.
Further, the target screening unit includes:
the target searching module is used for searching target PCIE equipment by taking the PCIE equipment 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 the bidirectional linked list and returning a head node pointing to the bidirectional linked list;
the data writing module is used for writing a first parameter identified from each piece of PCIE equipment information into a double-linked list according to the head node;
the device identification module is used for sending the data in the doubly linked list to the BMC through a designated ipmitool command, and the BMC identifies the device information by combining the local device manufacturer, different device model information of the same manufacturer and the received data and stores the device information to the device list;
and inquiring configuration information corresponding to the equipment from an equipment database according to the equipment information, wherein the configuration information comprises an 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,
the processor is configured to call and run the computer program from the memory, so that the terminal performs the method of the terminal as described above.
In a fourth aspect, there is provided a computer storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of the above aspects.
The invention has the advantages that,
according to the method for identifying the type of the HBA card of the server, provided by the invention, all PCIE equipment information is obtained by scanning PCIE equipment, then the identification codes of the sub-equipment and the identification codes of the manufacturers of the sub-equipment and the corresponding equipment types and message types are inquired from the PCIE equipment information, and the information is sent to the BMC, the BMC identifies the equipment information of the HBA card by combining the locally stored equipment manufacturers and different equipment type information of the same manufacturer, and the corresponding configuration information is inquired according to the equipment information of the HBA card, 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 conditions of not influencing the running state of the server and not influencing the service, thereby effectively utilizing the HBA card.
According to the identification system for the type of the HBA card of the server, 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 identification codes of the sub-equipment and the manufacturer of the sub-equipment and the corresponding equipment types and the message types from the PCIE equipment information and send the information to the BMC, the BMC identifies the equipment information of the HBA card by combining the locally stored equipment manufacturer and different equipment type information of the same manufacturer, and the corresponding configuration information is inquired according to the equipment information of the HBA card, 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 conditions of not influencing the running state of the server and not influencing the service, thereby effectively utilizing the HBA card.
The terminal provided by the invention comprises a processor, wherein the processor executes an identification method of the type of the HBA card of the server, acquires all PCIE equipment information by scanning PCIE equipment, inquires a sub-equipment identification code and a sub-equipment manufacturer identification code as well as corresponding equipment types and message types from the PCIE equipment information, and sends the information to a BMC, the BMC identifies the equipment information of the HBA card by combining locally stored equipment manufacturer and different equipment type information of the same manufacturer, and inquires corresponding configuration information according to the equipment information of the HBA card, thereby acquiring detailed type information of the HBA card. The invention can obtain the detailed model information of the HBA card under the conditions of not influencing the running state of the server and not influencing the service, thereby effectively utilizing the HBA card.
The storage medium provided by the invention stores a program capable of executing an identification method of the type of the HBA card of the server, acquires all PCIE equipment information by scanning PCIE equipment, inquires a sub-equipment identification code and a sub-equipment manufacturer identification code and corresponding equipment types and message types from the PCIE equipment information, and sends the information to the BMC, wherein the BMC identifies the HBA card equipment information by combining equipment manufacturers and different equipment type information of the same manufacturer which are locally stored, inquires corresponding configuration information according to the HBA card equipment information, and further acquires detailed type information of the HBA card. The invention can obtain the detailed model information of the HBA card under the conditions of not influencing the running state of the server and not influencing 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 of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of a method of one embodiment of the invention.
FIG. 2 is a schematic flow chart of a parameter identification process of a method of one embodiment of the invention.
Fig. 3 is a schematic flow chart 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 the technical solution of the present invention better understood by those skilled in the art, the technical solution 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 only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
The following explains key terms appearing in the present invention.
BMC, execution server remote management controller, english name Baseboard Management controller. The method can perform firmware upgrade, check machine equipment and other operations 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 and RAM for data storage, flash memory for non-volatile data storage, and firmware to provide basic remote manageability in terms of secure remote reboot, secure re-power-up, LAN alerting, and system health monitoring. In addition to the basic IPMI and system operation monitoring functions, the mBMC can also enable BIOS flash element selection and protection by storing the previous BIOS using one of the 2 flash memories. For example, when the system fails to boot after a remote BIOS upgrade, the remote administrator may switch back to the previously-working BIOS image to boot the system. Once BIOS is upgraded, the BIOS image can be locked, so as to effectively prevent virus from invading it.
BIOS is an acronym of English "Bas ic Input Output System", and the Chinese name is "basic input output System" after being translated. On IBM PC compatible systems, is a industry standard firmware interface. The computer is a set of programs solidified on a ROM chip on a main board in the computer, which stores the most important programs of basic input and output, self-checking programs after starting up and system self-starting programs, and can read and write specific information of system settings from CMOS. Its main function is to provide the lowest, most direct hardware setup and control for the computer. In addition, the BIOS provides some system parameters to the operating system. The system hardware changes are hidden by the BIOS and the program uses the BIOS functions rather than directly controlling the hardware. Modern operating systems ignore the abstraction layer provided by the BIOS and directly control the hardware components.
The intelligent platform management interface (Intell igent Platform Management Interface) is an industry standard adopted by peripheral devices of an Intel architecture enterprise system. 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 back 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 to direct succession and direct predecessor. Therefore, starting from any node in the doubly linked list, its predecessor and successor nodes can be accessed very conveniently. We generally construct a doubly-linked circular list.
FIG. 1 is a schematic flow chart of a method of one embodiment of the invention. The execution body of fig. 1 may be an identification system of a server HBA card model.
As shown in fig. 1, the method includes:
step 110, scanning PCIE equipment in a scanning stage of the server startup equipment, and obtaining PCIE equipment information on the main board direct connection and the adapter card;
step 120, target PCIE device information including the first parameter of the HBA card is screened out from PCIE device information;
step 130, identifying a first parameter from the target PCIE device information, where the first parameter includes a sub-device identification code and a sub-device vendor identification code, and a corresponding device type and a message type;
and 140, summarizing and storing the identified first parameters into a doubly-linked list, and sending summarized first parameters in the doubly-linked list to the BMC, wherein the BMC identifies the type of the HBA card according to the local second parameters and the received first parameters.
In order to facilitate understanding of the present invention, the method for identifying a server HBA card model provided by the present invention is further described below by using the principle of the method for identifying a server HBA card model of the present invention, and combining the process of identifying a server HBA card model in the embodiment.
Specifically, referring to fig. 2 and fig. 3, the method for identifying the HBA card model of the server includes:
s1, scanning PCIE equipment in a scanning stage of the server startup equipment, and acquiring PCIE equipment information on the main board direct connection and the transfer card.
And judging whether to start PCIE equipment scanning permission or not in the scanning stage, and executing PCIE equipment scanning if the permission is started.
The server is started. In the device scanning stage, a switch for transmitting SID and SVID is added (for an unnecessary client, the switch is not required to be opened, and the information transmission is newly added, so that the starting speed and the like are influenced). If the switch is opened, the PCIE equipment starts to be scanned, and if the switch is closed, the HBA card model identification program is exited, and the reason of the exit is prompted.
S2, target PCIE equipment information containing the first parameters of the HBA card is screened out from the PCIE equipment information.
Taking the PCIE equipment name related to the first parameter as a keyword, and searching for target PCIE equipment; and clearing PCIE device information except the target PCIE device information.
Because the PCIE devices of the server are many, it is necessary to determine the target PCIE device, that is, the name of the target PCIE device related to the HBA card is used as a keyword, and then search the target PCIE device information from the PCIE device information scanned in step S1. And removing PCIE equipment information which does not need to be identified except the target PCIE equipment information. The target PCIE device information may include a plurality of pieces of PCIE device information.
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 equipment information, wherein the first parameter comprises a sub-equipment identification code, a sub-equipment manufacturer identification code, a corresponding equipment type and a message type.
And judging whether the target PCIE equipment information is valid or not, and clearing the invalid target PCIE equipment information. And inquiring SID (sub-equipment identification code, which is the secondary code of the equipment authorized to be manufactured), SVID (sub-equipment manufacturer identification code, which is the identification code of the secondary manufacturer authenticated by PCI-SGI organization, which is the unique manufacturer identification and does not allow duplicate name), and corresponding equipment type, message type and other information from the effective target PCIE equipment information.
And S4, summarizing and storing the identified first parameters into a doubly-linked list, and sending summarized first parameters in the doubly-linked list to the BMC, wherein the BMC identifies the type of the HBA card according to the local second parameters and the received first parameters.
Initializing a doubly linked list and returning a head node pointing to the doubly linked list;
writing a first parameter identified from each item of PCIE equipment information into a double-linked list according to the head node; the data in the bidirectional linked list is sent to the BMC through a specified ipmitool command, and the BMC combines the local equipment manufacturer, different equipment model information of the same manufacturer and the received data to identify HBA card equipment information 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 an HBA card model.
Initializing a doubly linked list, returning to a head node pointing to the doubly linked list, and storing the first parameters identified from each piece of PCIE equipment information to the initialized doubly 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 BMC, releasing resources in the linked list, and if the bidirectional linked list is empty, exiting the HBA card type identification program and prompting that the bidirectional linked list is empty.
The BMC receives an ipmitool command sent by the BIOS. And analyzing the information of each field related to the PCIE according to the protocol content. And identifying information of PCIE equipment according to the SID, the SVID, the VID, the DID and other information, and displaying the information in an equipment list of the BMC according to the identified information.
When the BIOS scans PCIE devices, it needs to transmit SID (sub device identifier, which is a secondary code of a device authorized to be manufactured) and SVID (sub device manufacturer identifier, which is a unique manufacturer identifier of a secondary manufacturer authenticated by the PCI-SGI organization, and not allowing a duplicate name) to the BMC, and when the BIOS transmits these two information to the BMC, the BMC combines VID (device manufacturer) and DID (different device type/model information of the same manufacturer), then analyzes the information of the devices, displays the information in a device list of the BMC, and a user can query all configuration information of the devices according to the displayed information, where the configuration information includes detailed model information.
Specifically, the method comprises the following steps:
BIOS end:
(1) The server is started.
(2) In the device scanning stage, a switch for transmitting SID and SVID is added (for an unnecessary client, the switch is not required to be opened, and the information transmission is newly added, so that the starting speed and the like are influenced).
(3) If the switch is opened, scanning PCIE equipment is started, and if the switch is closed, the following steps are not performed.
(4) Initializing a doubly linked list and returning a head node pointing to the doubly linked list.
(5) And obtaining PCIE equipment information on the direct connection of the main board and the Raiser card.
(6) And removing PCIE equipment information which does not need to be identified according to the conditions.
(7) And sequentially acquiring the rest PCIE equipment information.
(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 SID and SVID and corresponding equipment type, message type and other information into an initialized linked list, acquiring next equipment information, and executing step 8.
(10) And if the linked list is not empty, sequentially sending the information in the linked list to the BMC according to the 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 POST.
BMC end:
(1) And receiving an ipmitool command sent by the BIOS.
(2) And analyzing the information of each field related to the PCIE according to the protocol content.
(3) Based on SID, SVID, combining VID, DID, etc., identifying information of PCIE equipment,
(4) And displaying the information to a device list of the BMC according to the identified information.
According to the identification method of the server HBA card type, all PCIE equipment information is obtained through scanning PCIE equipment, then the identification codes of the sub-equipment and the manufacturer identification codes of the sub-equipment and the corresponding equipment types and message types are inquired from the PCIE equipment information, the information is sent to the BMC, the BMC is combined with locally stored equipment manufacturer and different equipment type information of the same manufacturer to identify the HBA card equipment information, and corresponding configuration information is inquired according to the HBA card equipment information, so that detailed type information of the HBA card is obtained. The invention can obtain the detailed model information of the HBA card under the conditions of not influencing the running state of the server and not influencing 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 PCIE devices in a server startup device scanning stage, and obtain PCIE device information on the main board direct connection and the adapter card;
the target screening unit 420 is configured to screen target PCIE device information including the first parameter of the HBA card from PCIE device information;
the parameter identifying unit 430 is configured to identify a first parameter from the target PCIE device information, where the first parameter includes a sub-device identification code and a sub-device vendor identification code, and a corresponding device type and a message type;
the model identifying unit 440 is configured to store the identified first parameter summary to the doubly linked list, and send the summarized first parameter in the doubly linked list to the BMC, where the BMC identifies the HBA card model according to the local second parameter and the received first parameter.
Optionally, as an embodiment of the present invention, the device scanning unit includes:
and the scanning execution module is used for judging whether the PCIE equipment scanning permission is started in the scanning stage, and executing PCIE equipment scanning if the permission is started.
Optionally, as an embodiment of the present invention, the target screening unit includes:
the target searching module is used for searching target PCIE equipment by taking the PCIE equipment 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 identifying unit includes:
the linked list processing module is used for initializing the bidirectional linked list and returning a head node pointing to the bidirectional linked list;
the data writing module is used for writing a first parameter identified from each piece of PCIE equipment information into a double-linked list according to the head node;
the device identification module is used for sending the data in the doubly linked list to the BMC through a designated ipmitool command, and the BMC identifies the device information by combining the local device manufacturer, different device model information of the same manufacturer and the received data and stores the device information to the device list;
and inquiring configuration information corresponding to the equipment from an equipment database according to the equipment information, wherein the configuration information comprises an 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 a server HBA card type according to the embodiment of the present invention.
The terminal 500 may include: a processor 510, a memory 520 and a communication unit 530. The components may communicate via one or more buses, and it will be appreciated by those skilled in the art that the configuration of the server as shown in the drawings is not limiting of the invention, as it may be a bus-like structure, a star-like structure, or include more or fewer components than shown, or may be a combination of certain components or a different arrangement of components.
The memory 520 may be used to store instructions for execution by the processor 510, and the memory 520 may be implemented by any type of volatile or non-volatile memory 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 execution of the instructions in memory 520, when executed by processor 510, enables 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 running or executing software programs and/or modules stored in the memory 520, and invoking data stored in the memory. The processor may be comprised of an integrated circuit (Integrated Circuit, simply referred to as an IC), for example, a single packaged IC, or may be comprised of a plurality of packaged ICs connected to the same function or different functions. For example, the processor 510 may include only a central processing unit (Central Processing Unit, simply CPU). In the embodiment of the invention, the CPU can be a single operation core or can comprise multiple operation cores.
A communication unit 530 for establishing a communication channel so that the storage terminal can communicate with other terminals. Receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium in which a program may be stored, which 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), a random-access memory (random access memory, RAM), or the like.
Therefore, the invention obtains all PCIE equipment information by scanning PCIE equipment, then inquires the identification code of the sub equipment and the identification code of the manufacturer of the sub equipment as well as 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 different equipment model information of the same manufacturer, and inquires the corresponding configuration information according to the HBA card equipment information, thereby obtaining the detailed model information of the HBA card. The invention can obtain the detailed model information of the HBA card under the conditions of not influencing the running state of the server and not influencing the service, thereby effectively utilizing the HBA card, and the technical effects achieved by the embodiment can be seen from the description above and are not repeated here.
It will be apparent to those skilled in the art that the techniques of embodiments of the present invention may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solution in the embodiments of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium such as a U-disc, a mobile hard disc, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, etc. various media capable of storing program codes, including several instructions for causing a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the method described in the embodiments of the present invention.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for the terminal embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference should be made to the description in the method embodiment for relevant points.
In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods may be implemented in other ways. For example, the system embodiments described above are merely illustrative, e.g., the division of the elements is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interface, system or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
Although the present invention has been described in detail by way of preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Various equivalent modifications and substitutions may be made in the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and it is intended that all such modifications and substitutions be within the scope of the present invention/be within the scope of the present invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. The method for identifying the type of the HBA card of the server is characterized by comprising the following steps of:
scanning PCIE equipment in a scanning stage of the starting equipment of the server to acquire PCIE equipment information on the direct connection and transfer card of the main board;
screening target PCIE equipment information containing the 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 message type;
and the identified first parameters are summarized and stored into a double-linked list, the summarized first parameters in the double-linked list are sent to the BMC, and the BMC identifies the type of the HBA card according to the local second parameters and the received first parameters.
2. The method of claim 1, wherein scanning PCIE devices during a server boot device scanning phase to obtain PCIE device information on a main board direct connection and transit card includes:
and judging whether to start PCIE equipment scanning permission or not in the scanning stage, and executing PCIE equipment scanning if the permission is started.
3. The method of claim 1, wherein screening out target PCIE device information including HBA card first parameters from PCIE device information comprises:
taking the PCIE equipment name related to the first parameter as a keyword, and searching for target PCIE equipment;
and clearing PCIE device information except the target PCIE device information.
4. The method of claim 1, wherein the step of storing the identified first parameter summary in a doubly linked list and sending the summarized first parameter in the doubly linked list to the BMC, wherein the BMC identifies the HBA card model based on the local second parameter and the received first parameter comprises:
initializing a doubly linked list and returning a head node pointing to the doubly linked list;
writing a first parameter identified from each item of PCIE equipment information into a double-linked list according to the head node;
the data in the bidirectional linked list is sent to the BMC through a specified ipmitool command, and the BMC combines the local equipment manufacturer, different equipment model information of the same manufacturer and the received data to identify HBA card equipment information 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 an HBA card model.
5. A server HBA card model identification system comprising:
the device scanning unit is used for scanning PCIE devices in a server startup device scanning stage and acquiring PCIE device information on the main board direct connection and the adapter card;
the target screening unit is used for screening target PCIE equipment information containing the first parameters of the HBA card from the PCIE equipment information;
the device comprises a parameter identification unit, a message type identification unit and a message type identification unit, wherein the parameter identification unit is used for identifying a first parameter from target PCIE equipment information, and the first parameter comprises a sub-equipment identification code, a sub-equipment manufacturer identification code, a corresponding equipment type and a message type;
the model identification unit is used for summarizing and storing the identified first parameters into the doubly-linked list, sending summarized first parameters in the doubly-linked list to the BMC, and identifying the HBA card model 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 PCIE equipment scanning permission is started in the scanning stage, and executing PCIE equipment scanning if the permission is started.
7. The system of claim 5, wherein the target screening unit comprises:
the target searching module is used for searching target PCIE equipment by taking the PCIE equipment 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 of claim 5, wherein the model identification unit comprises:
the linked list processing module is used for initializing the bidirectional linked list and returning a head node pointing to the bidirectional linked list;
the data writing module is used for writing a first parameter identified from each piece of PCIE equipment information into a double-linked list according to the head node;
the device identification module is used for sending the data in the doubly linked list to the BMC through a designated ipmitool command, and the BMC identifies the device information by combining the local device manufacturer, different device model information of the same manufacturer and the received data and stores the device information to the device list;
and inquiring configuration information corresponding to the equipment from an equipment database according to the equipment information, wherein the configuration information comprises an HBA card model.
9. A terminal, comprising:
a processor;
a memory for storing execution instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1-4.
10. A computer readable storage medium storing a computer program, which when executed by a processor implements the method of any one of claims 1-4.
CN202110727630.9A 2021-06-29 2021-06-29 Method, system, terminal and storage medium for identifying type of server HBA card Active CN113626276B (en)

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 CN113626276A (en) 2021-11-09
CN113626276B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
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
CN117827711A (en) * 2022-09-27 2024-04-05 富联精密电子(天津)有限公司 HBA card starting disk setting method, device and computer readable storage medium

Citations (1)

* Cited by examiner, † Cited by third party
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

Patent Citations (1)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
CN113626276A (en) 2021-11-09

Similar Documents

Publication Publication Date Title
US5748980A (en) System for configuring a computer system
US6336152B1 (en) Method for automatically configuring devices including a network adapter without manual intervention and without prior configuration information
CN103412769B (en) External card parameter configuration, equipment and system
US8448165B1 (en) System and method for logging operations of virtual machines
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
US20070011491A1 (en) Method for platform independent management of devices using option ROMs
CN113626276B (en) Method, system, terminal and storage medium for identifying type of server HBA card
CN110134446B (en) Method for starting PCIE equipment scanning
JP2009230766A (en) Network enhanced bios for enabling remote management of computer without functioning operation system
JP2003527654A (en) Method, system and computer readable storage medium for automatic device driver configuration
CN109426613A (en) The method and its computer system of tune-up data are retrieved in UEFI
Gay Mastering the raspberry PI
US20170249165A1 (en) Usb wireless network card configuration methods, host, usb wireless network card and communication system
CN105068946A (en) Android device identification method and apparatus
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
CN114003445B (en) BMC I2C monitoring function test method, system, terminal and storage medium
US10509656B2 (en) Techniques of providing policy options to enable and disable system components
CN115766682A (en) Data transmission method and device
CN114968386A (en) Equipment information management method, device and equipment of electronic equipment
CN115291951A (en) UEFI (unified extensible firmware interface) starting method and device, electronic equipment and storage medium
CN114253573A (en) PCIe device firmware batch upgrading method, system, terminal 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
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