Search

CN-114116336-B - Method, system, equipment and medium for checking hardware consistency of server

CN114116336BCN 114116336 BCN114116336 BCN 114116336BCN-114116336-B

Abstract

The invention discloses a method, a system, equipment and a medium for checking hardware consistency of a server, wherein the method comprises the steps of configuring a hardware configuration list of the server; obtaining a server to be checked, setting a network environment of the server to be checked, generating a node list according to the server to be checked and a hardware configuration list corresponding to the server to be checked, sequentially checking hardware consistency of the servers on the node list according to a pre-configured checking file, recording a checking log and generating a checking result. By the scheme of the invention, the hardware consistency check can be automatically carried out on the server in a network environment, repeated work can be obviously reduced, the investment of manpower workload is reduced, and the checking efficiency of the hardware consistency of the server is improved.

Inventors

  • CHEN YUANZHE

Assignees

  • 济南浪潮数据技术有限公司
  • 济南浪潮数据技术有限公司

Dates

Publication Date
20260421
Application Date
20211107
Priority Date
20211107

Claims (9)

  1. 1. A hardware consistency check method of a server, comprising: configuring a hardware configuration list of the server; acquiring a server to be checked, setting a network environment of the server to be checked, and generating a node list according to the server to be checked and a hardware configuration list corresponding to the server to be checked, wherein the node list comprises a hardware configuration list; sequentially carrying out hardware consistency check on the servers on the node list based on the hardware consistency check step, recording check logs and generating check results; The hardware consistency check step comprises the steps of reading a node list, logging in a first server on the node list, creating a folder in the server, generating a compressed package by a pre-configured check file, uploading the compressed package to the folder, decompressing the compressed package to obtain the pre-configured check file, executing the pre-configured check file to read a hardware configuration list of the server from the node list, carrying out consistency check on each hardware of the server according to the hardware configuration list, acquiring a check log and a check result of the server in response to the completion of the server check, generating a compressed package by the check log and the check result, and returning to a step of reading the node list to carry out consistency check on the next server in the node list until all servers in the node list are checked; The checking items comprise whether a certain hardware is absent from the server, whether the model of the main board is consistent with the model of the main board which is pre-configured in the checking file, whether the number of memory banks is correct, whether the model of the memory banks is consistent with preset parameters, CPU information, related information of a hard disk, related information of a network card and all PCI device information, wherein the CPU information comprises the model of a CPU, the number of actual physical CPUs in the system and the number of cores in each physical CPU.
  2. 2. The method of claim 1, wherein the node list further comprises server IP, user name, login password.
  3. 3. The method of claim 2, wherein logging on to the first server on the node list comprises: And linking the first server IP on the node list, and remotely logging in the server through the user name and the password.
  4. 4. The method of claim 1, wherein the hardware configuration inventory includes checking expected results; reading a hardware configuration list of the server from the node list, and performing consistency check on each hardware of the server according to the hardware configuration list comprises the following steps: reading a hardware configuration list of the server, and checking each hardware of the server according to the hardware configuration list; Comparing the checking result with the checking expected result, if the comparison result is consistent, passing the checking item, otherwise, failing the checking item; and summarizing the detection results of the hardware to generate a final detection result of the server.
  5. 5. The method of claim 4, wherein the hardware configuration manifest further comprises a hardware inspection item name, an inspection command, the method further comprising: and recording the hardware inspection item name, the inspection command, the inspection expected result, the inspection result and the passing information in the inspection log.
  6. 6. The method as recited in claim 5, further comprising: Screening information of failed inspection items from the inspection log, and recording the information of the failed inspection items in the log of the server.
  7. 7. A hardware consistency check system of a server, comprising: The configuration module is configured to configure a hardware configuration list of the server; the generation module is configured to acquire a server to be checked, set a network environment of the server to be checked, and generate a node list according to the server to be checked and a hardware configuration list corresponding to the server to be checked, wherein the node list comprises a server IP, a user name, a login password and a corresponding hardware configuration list; The system comprises a node list, a checking module, a server creating folder, a server IP (Internet protocol) and a user name, wherein the node list comprises a first server, a second server, a client and a server, the checking module is configured to sequentially perform hardware consistency checking on the server on the node list according to a pre-configured checking file based on a hardware consistency checking step, record a checking log and generate a checking result, the hardware consistency checking step comprises the steps of reading the node list, logging in a first server on the node list, creating a folder in the server, uploading the pre-configured checking file into the folder, decompressing the compressed package to obtain the pre-configured checking file, executing the pre-configured checking file to read the hardware configuration list of the server from the node list, and performing consistency checking on each hardware of the server according to the hardware configuration list, responding to the end of the server, acquiring the checking log and the checking result of the server, and generating a compressed package back to a remote server; The checking items comprise whether a certain hardware is absent from the server, whether the model of the main board is consistent with the model of the main board which is pre-configured in the checking file, whether the number of memory banks is correct, whether the model of the memory banks is consistent with preset parameters, CPU information, related information of a hard disk, related information of a network card and all PCI device information, wherein the CPU information comprises the model of a CPU, the number of actual physical CPUs in the system and the number of cores in each physical CPU.
  8. 8. A computer device, comprising: At least one processor, and A memory storing a computer program executable on the processor, wherein the processor performs the steps of the method of any one of claims 1-6 when the program is executed.
  9. 9. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor performs the steps of the method according to any one of claims 1-6.

Description

Method, system, equipment and medium for checking hardware consistency of server Technical Field The present invention relates to the field of computer information technologies, and in particular, to a method, a system, an apparatus, and a medium for checking hardware consistency of a server. Background With the rise of new technologies such as 5G, cloud computing, internet of things, etc., global IP traffic is growing at considerable speeds. Traffic bursts mean bursts of data volumes, which require a large number of servers to support, and the demand for servers continues to grow. The explosion of data and traffic is a necessary result of the current informatization transformation, and the construction of 5G will also continue to drive the data volume and thus the increase of server demands. The basic performance of a server is determined by the hardware, and the massive demands on the server are also demands on the server hardware. The hardware of the server is composed of a power supply, a CPU, a memory, a hard disk, a fan, a network card and the like. The hard disk can be divided into an SAS hard disk, an SATA hard disk, a solid state hard disk and the like, and the network card can be divided into an RJ-45 interface network card, an FDDI interface network card and the like according to interfaces, which are the differences of the servers in the classification of hardware equipment. And a server may have 2 or more CPUs, one or more tens of memories, ten or more hard disks, and so on in number. The hardware of the server is a very complex hardware system, however, the hardware consistency of the server not only comprises the hardware devices, but also comprises a plurality of firmware on the hardware and information such as actual states, links, bandwidths and the like in running. Therefore, a large number of servers are required to check hardware consistency before delivery or deployment, and the existing checking mode of hardware consistency of the servers is to manually check the consistency of each server, so that the checking work is repeated and complicated. Disclosure of Invention In view of this, the present invention provides a method, a system, a computer device and a computer readable storage medium for checking hardware consistency of a server, which automatically performs hardware consistency checking on different hardware configurations of a plurality of servers in the same network environment, so that repeated work can be significantly reduced, labor workload investment is reduced, and checking efficiency of hardware consistency of the server is improved. Based on the above object, an aspect of the embodiments of the present invention provides a method for checking hardware consistency of a server, which specifically includes the following steps: configuring a hardware configuration list of the server; acquiring a server to be checked, setting a network environment of the server to be checked, and generating a node list according to the server to be checked and a hardware configuration list corresponding to the server to be checked; and sequentially carrying out hardware consistency check on the servers on the node list according to a pre-configured check file, recording a check log and generating a check result. In some embodiments, sequentially performing hardware consistency check on the servers on the node list according to a pre-configured check file, recording a check log and generating a check result includes: reading the node list and logging in a first server on the node list; Creating a folder in the server, and uploading the pre-configured check file generation compression package to the folder; Decompressing the compressed package, and executing the pre-configured check file to perform hardware consistency check on the server; Responding to the end of the server inspection, acquiring an inspection log and an inspection result of the server, and generating a compressed packet by the inspection log and the inspection result and transmitting the compressed packet back to a remote server; And reading the node list, logging in the next server to perform consistency check, and returning to the step of creating a folder at the server until all servers of the node list are checked. In some embodiments, the node list includes a server IP, a user name, a login password, and a corresponding hardware configuration list. In some embodiments, logging on to a first server on the node list comprises: And linking the first server IP on the node list, and remotely logging in the server through the user name and the password. In some embodiments, the hardware configuration inventory includes checking expected results; After decompressing the compressed package, executing the pre-configured check file to perform a hardware consistency check on the server includes: reading a hardware configuration list of the server, and checking each hardware of the server according to the hardware configuration l