CN117234781A - Method, device, equipment and medium for correcting option value of setting option - Google Patents

Method, device, equipment and medium for correcting option value of setting option Download PDF

Info

Publication number
CN117234781A
CN117234781A CN202311271606.4A CN202311271606A CN117234781A CN 117234781 A CN117234781 A CN 117234781A CN 202311271606 A CN202311271606 A CN 202311271606A CN 117234781 A CN117234781 A CN 117234781A
Authority
CN
China
Prior art keywords
option value
file
option
corrected
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311271606.4A
Other languages
Chinese (zh)
Inventor
王建
陈鹏
金立江
芦飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain 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 Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202311271606.4A priority Critical patent/CN117234781A/en
Publication of CN117234781A publication Critical patent/CN117234781A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of servers, and discloses an option value correction method, an apparatus, a device and a medium for setting options, wherein the method comprises the following steps: acquiring reference option values of all setting options in a reference server, and storing the reference option values into a reference file; acquiring a script execution file for correcting the option value, and copying the script execution file and a reference file to a server to be corrected; obtaining current option values of all setting options in the server to be corrected according to the script execution file, and storing the current option values into a current option value file; comparing the reference file with the current option value file based on the script execution file to obtain an option value to be corrected; and correcting the option value to be corrected according to the script execution file and the reference file. The method solves the problems that the setting options with inconsistent option values and corresponding current values cannot be determined, a maintenance engineer is required to manually compare, the fault self-checking efficiency is low, and the option values cannot be automatically corrected to standard required values.

Description

Method, device, equipment and medium for correcting option value of setting option
Technical Field
The invention relates to the technical field of servers, in particular to an option value correction method, an apparatus, a device and a medium for setting options.
Background
The BIOS (Basic Input Output System ) firmware in the server has more and more Setup options, and the setp options are more and more complex and variable. In the BIOS firmware of the general server, there are 5000-6000 Setup options, each option is different according to the client requirement and the type of the server product, and the current value and the default value which can be configured are different. When the same server model is shipped, the option value of the Setup option of the BIOS firmware in the required server is kept completely consistent, and the option value of the Setup option of each server is kept consistent with the standard required value.
Currently, when the server production line is used for production, a fault self-checking program is adopted to check the option value of the Setup option of the BIOS firmware in the server. The existing fault self-checking program only can find the condition that the Setup option value of the problem server is inconsistent with the standard requirement value, and alarms the information to the fault self-checking system, however, the prior art cannot determine the setting option with inconsistent option values and the corresponding current value, a maintenance engineer is required to manually go to the production line to export the option value of the Setup option of the problem server, the option value is compared with the standard requirement value, and the inconsistent Setup option and option value are analyzed and positioned, so that the efficiency is low, production is blocked, and the difficulty of the server production line in fault detection is increased.
Therefore, the prior art has the problems that the setting options with inconsistent option values and corresponding current values cannot be determined, a maintenance engineer is required to manually compare, the fault self-checking efficiency is low, and the option values of Setup options in the BIOS firmware cannot be automatically corrected to standard required values.
Disclosure of Invention
In view of this, the present invention provides a method, apparatus, device and medium for correcting the option value of the setting option, so as to solve the problems that the setting option with inconsistent option values and the corresponding current value cannot be determined, the maintenance engineer is required to manually compare, the failure self-checking efficiency is low, and the option value of the Setup option in the BIOS firmware cannot be automatically corrected to the standard requirement value.
In a first aspect, the present invention provides an option value correction method for setting an option, the method including:
in the reference server, initiating a read command, wherein the read command is used for executing a setting control tool;
according to the setting control tool, deriving reference option values of all setting options in the reference server;
generating a reference file according to the reference option value;
acquiring a script execution file for correcting the option value, and copying the script execution file and a reference file to a server to be corrected;
Running a script execution file, obtaining current option values of all setting options in the server to be corrected according to the script execution file, and storing the current option values into a current option value file;
comparing the reference file with the current option value file based on the script execution file to obtain an option value to be corrected in the current option value file;
and correcting the option value to be corrected according to the script execution file and the reference file.
In the method for correcting the option value of the setting option provided by the embodiment, in the self-checking stage of the production line fault, the script execution file is used for automatically detecting the current option value, the reference file is compared with the current option value file, and if the to-be-corrected option value inconsistent with the reference option value in the reference file exists in the current option value file, the to-be-corrected option value is automatically corrected according to the reference file, so that the option value of the Setup option of each server is consistent with the standard requirement value. The invention optimizes the production line flow, saves labor input, improves the production efficiency of the production line, and avoids the problems of blocking the production line and the like. The method solves the problems that the setting options with inconsistent option values and corresponding current values cannot be determined, a maintenance engineer is required to manually compare, the fault self-checking efficiency is low, and the option values of Setup options in BIOS firmware cannot be automatically corrected to standard required values.
In an alternative embodiment, based on the script execution file, comparing the reference file with the current option value file to obtain the option value to be corrected in the current option value file, including:
in a server to be corrected, calling a preset tool by utilizing a script execution file, wherein the preset tool is used for comparing a reference file with a current option value file;
judging whether inconsistent option values exist in the current option value file and the reference file according to a preset tool, the reference file and the current option value file;
if the inconsistent option value exists, taking the inconsistent option value as the option value to be corrected;
if there is no inconsistent option value, no correction information is output.
In this embodiment, the script execution file is used to call a preset tool, compare the reference file with the current option value file, and if there is an inconsistent option value, take the inconsistent option value as the option value to be corrected. The script execution file is used for automatically detecting the current option value, so that the production line flow is optimized, the labor investment is saved, the production efficiency of the production line is improved, and the problems of blocking the production line and the like are avoided.
In an alternative embodiment, correcting the option value to be corrected according to the script execution file and the reference file includes:
Judging whether an option value to be corrected exists in the current option value file;
if the option value to be corrected exists, the option value to be corrected is stored, and early warning information is output;
obtaining a reference option value corresponding to the option value to be corrected according to the reference file;
modifying the option value to be modified into a reference option value to obtain a modified current option value file;
and adjusting all setting options in the server to be corrected by using the corrected current option value file.
In this embodiment, whether the option value to be corrected exists is determined by using the script execution file, if so, a reference option value corresponding to the option value to be corrected is obtained according to the reference file, the option value to be corrected is modified to be the reference option value, and finally, all the setting options in the server to be corrected are adjusted by using the corrected current option value file. The script execution file is used for automatically correcting the option value to be corrected according to the reference file, so that the production line flow is optimized, the labor investment is saved, the production efficiency of the production line is improved, and the problems of blocking the production line and the like are avoided.
In an alternative embodiment, running the script execution file comprises:
acquiring the folder read-write authority of a server to be corrected;
and running the script execution file based on the folder read-write permission.
In this embodiment, the folder read-write permission of the server to be corrected is obtained, and the script execution file is executed based on the folder read-write permission. The script execution file can modify the current option value file, and then the option value to be corrected is corrected according to the reference file.
In an alternative embodiment, obtaining, according to the reference file, a reference option value corresponding to the option value to be corrected includes:
acquiring a character string corresponding to the option value to be corrected;
searching a target setting option corresponding to the character string in the reference file;
and taking the reference option value of the target setting option as the reference option value corresponding to the option value to be corrected.
In this embodiment, the script execution file searches the reference option value corresponding to the option value to be corrected in the reference file according to the character string corresponding to the option value to be corrected, so as to facilitate the subsequent correction of the option value to be corrected.
In an alternative embodiment, adjusting all setting options in the server to be modified by using the modified current option value file includes:
importing the corrected current option value file into a server to be corrected;
initiating an adjustment command at a server to be corrected, wherein the adjustment command is used for executing a setting control tool;
And importing all the option values in the corrected current option value file into a server to be corrected by using a setting control tool.
In this embodiment, the corrected current option value file is imported into the server to be corrected, and then all option values in the corrected current option value file are imported into the server to be corrected through the setting control tool. And finishing correction of all the option values inconsistent with the standard requirement values in the server to be corrected.
In an alternative embodiment, after adjusting all the setting options in the server to be corrected using the corrected current option value file, the method further includes:
verifying the corrected current option value file by using a preset verification script to obtain a verification result, wherein the verification result is used for determining whether an option value to be corrected exists in the corrected current option value file;
under the condition that the verification result is successful in correction, testing each set option in the server to be corrected by using a preset test script to obtain a test result, wherein the test result is used for determining whether the option function of each set option is normal or not;
under the condition that the test result is normal, storing the option value to be corrected and the corresponding reference option value into an analysis database;
Obtaining a target setting option according to data in an analysis database, wherein the probability that the current option value of the target setting option is an option value to be corrected is larger than a preset threshold value;
information containing the target setting option is output.
In this embodiment, the corrected current option value file is verified to obtain a verification result, so that it can be ensured that all option values to be corrected are corrected successfully. And testing each setting option in the server to be corrected, so that the normal function of the options of each setting option can be ensured. Under the condition that the test result is normal, the option value to be corrected and the corresponding reference option value are stored in an analysis database to obtain a target setting option, so that a server producer can update the production flow and standard requirements conveniently, and the condition that the current option value is inconsistent with the reference option value is avoided.
In an alternative embodiment, correcting the option value to be corrected according to the script execution file and the reference file includes:
determining a preset correction mode, wherein the preset correction mode comprises the following steps: non-full-quantity correction and full-quantity correction;
under the condition that a preset correction mode is full correction, determining a target option value partition of an option value to be corrected in a current option value file, wherein the current option value file comprises a first number of option value partitions, and the option value partition comprises a second number of current option values;
Generating an image file according to the reference file and the target option value partition;
in the current option value file, erasing all current option values in the target option value partition, and writing data in the mirror image file into the target option value partition;
under the condition that a preset correction mode is non-full correction, determining a reference option value corresponding to an option value to be corrected according to a reference file;
and modifying the option value to be corrected into a reference option value to finish the correction of the option value to be corrected.
In this embodiment, the preset correction method includes: non-full-scale correction and full-scale correction. The non-total correction is only carried out on inconsistent option values, so that the speed is high and the efficiency is high. The full quantity correction can correct inconsistent option values and inconsistent option values related to the inconsistent option values, so that omission is avoided when inconsistent option values are searched.
In a second aspect, the present invention provides an option value correction device for setting options, the device comprising:
the system comprises an initiation module, a reference server and a control module, wherein the initiation module is used for initiating a read command in the reference server, and the read command is used for executing a setting control tool;
the export module is used for exporting the reference option values of all the setting options in the reference server according to the setting control tool;
The generation module is used for generating a reference file according to the reference option value;
the acquisition module is used for acquiring a script execution file for correcting the option value and copying the script execution file and the reference file to the server to be corrected;
the storage module is used for running a script execution file, obtaining current option values of all setting options in the server to be corrected according to the script execution file, and storing the current option values into a current option value file;
the obtaining module is used for comparing the reference file with the current option value file based on the script execution file to obtain an option value to be corrected in the current option value file;
and the correction module is used for correcting the option value to be corrected according to the script execution file and the reference file.
In a third aspect, the present invention provides a computer device comprising: the memory and the processor are in communication connection with each other, the memory stores computer instructions, and the processor executes the computer instructions, so as to execute the option value correction method of the setting option of the first aspect or any implementation manner corresponding to the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the option value correction method of the setting option of the first aspect or any one of the embodiments corresponding thereto.
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 needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an option value modification method of a setting option according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a method for automatically detecting whether an option value in a server to be corrected is consistent with a standard requirement value by a script execution file according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a script execution file execution flow in accordance with an embodiment of the present invention;
FIG. 4 is a block diagram showing the configuration of an option value correcting means for setting options according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Along with the rapid development of the server industry, setup options in the BIOS are more and more, and are more and more complex and changeable, so that the consistency of the current value and the default value of the BIOS Setup option of the firmware in the same server model is maintained, and the method is a mandatory requirement that BIOS test work and server product shipment must be detected and passed. Each set option in the BIOS may be configured with different current values and default values according to the client requirements and the server product types, for example: setup System Debug Configuration (system debug configuration) -System Debug Level [ Value ] (system debug level [ Value ]), wherein the Value has 4 alternatives, 0 respectively: disabled 1: minumum 2: normal 3: the Maximum, here the Value setting will configure different values according to different customer and server model products. The requirement that the Setup option remain completely consistent when the same model is shipped requires that each server check whether the option value of the Setup option in the BIOS is consistent with the standard requirement value when the shipment is produced. Currently, for a machine with a problem, a maintenance engineer needs to intervene in maintenance, the maintenance engineer can manually modify the option value of the setting option, after the problem is analyzed and positioned, the maintenance engineer may neglect to change the original value and directly flow the line, and when the fault self-checking is carried out next, the server continues to alarm the condition that the setting option is inconsistent.
Based on the above, the embodiment of the present invention provides an option value correction method for setting options, before a production line fault self-checking flow, an OS (Operating System) System automatically detects whether the Setup of Setup options meets the required consistency by using a script, if an inconsistent option is found, a piece of early warning (Waring) information is reported, and at the same time, the script can automatically locate the inconsistent Setup options, and automatically repair the inconsistent options according to the standard required value, and after repair is completed, a piece of successful correction (Success) information is reported. The automatic production line fault self-checking system has the advantages that the efficiency of the production line fault self-checking is improved, the through yield of the server production line is optimized, the automation level of the production line is provided, the production efficiency of the production line is improved, the blockage of the production line is avoided, and the investment of manpower and material resources is saved.
According to an embodiment of the present invention, there is provided an option value correction method embodiment of setting options, it being noted that the steps shown in the flowcharts of the drawings may be performed in, for example, a set of computer devices having data processing capability, and that although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in an order different from that shown or described herein.
In this embodiment, an option value correction method for setting options is provided, which may be used in the above-mentioned computer device, and fig. 1 is a flowchart of an option value correction method for setting options according to an embodiment of the present invention, as shown in fig. 1, where the flowchart includes the following steps:
in step S101, in the reference server, a read command is initiated, wherein the read command is used to execute the setting control tool.
Step S102, according to the setting control tool, the reference option values of all setting options in the reference server are derived.
Step S103, generating a reference file according to the reference option value.
Step S104, a script execution file for correcting the option value is obtained, and the script execution file and the reference file are copied to the server to be corrected.
Step S105, running a script execution file, obtaining current option values of all setting options in the server to be corrected according to the script execution file, and storing the current option values into a current option value file.
And step S106, comparing the reference file with the current option value file based on the script execution file to obtain the option value to be corrected in the current option value file.
Step S107, according to the script execution file and the reference file, the option value to be corrected is corrected.
Specifically, a standard approved server is used as a reference server, a read command is initiated under an OS system of the reference server on the reference server, and a setting control tool is executed by using the read command, for example: AMI sets up the control tool, and the read command is: SCELnx/o/s bios.log/land. And according to the setting control tool, deriving reference option values of all setting options in the reference server, wherein the reference option values of the reference server of different models are different in number, and about 5000-6000 reference option values exist. The reference option values are saved and a reference file bios.log is generated.
The invention automatically detects whether the option value of the setting option meets the consistency with the standard requirement value by using a script executing file (the same script file) under the OS system of the server to be corrected, if the inconsistent option value is found, the script executing file can report a piece of Waring information, meanwhile, the script executing file can automatically locate the inconsistent Setup option, automatically corrects the inconsistent option according to the standard requirement value, and reports a piece of Success information after correction, wherein the script is an OS lower processing command.
And using the standard server approved by the client as a reference server, utilizing an OS system of the reference server to derive reference option values of all setting options in the reference server, and storing the reference option values as reference files bios.log, wherein the bios.log is stored with standard requirement values of the client for the setting options, namely the reference option values. And acquiring a script execution file test.sh for correcting the option value, and copying the script execution file test.sh and a reference file bios.log to a corresponding directory of an OS system in the server to be corrected. The OS system of the server to be revised runs a script execution file test. Using the command: test.sh to run test.sh. The script execution file generates the current option values of all setup options in the server to be corrected, and stores the current option values as a current option value file biostset log. After the test.sh generates the current option value file bioset.log, the option value data in the bioset.log and the option value data in the bioset.log are compared, the option value of the inconsistent setup option is found out to be used as the option value to be corrected in the bioset.log, and the option value to be corrected in the bioset.log is repaired according to the reference option value in the reference file bioset.log.
In the method for correcting the option value of the setting option provided by the embodiment, in the self-checking stage of the production line fault, the script execution file is used for automatically detecting the current option value, the reference file is compared with the current option value file, and if the to-be-corrected option value inconsistent with the reference option value in the reference file exists in the current option value file, the to-be-corrected option value is automatically corrected according to the reference file, so that the option value of the Setup option of each server is consistent with the standard requirement value. The invention optimizes the production line flow, saves labor input, improves the production efficiency of the production line, and avoids the problems of blocking the production line and the like. The method solves the problems that the setting options with inconsistent option values and corresponding current values cannot be determined, a maintenance engineer is required to manually compare, the fault self-checking efficiency is low, and the option values of Setup options in BIOS firmware cannot be automatically corrected to standard required values.
In some optional embodiments, based on the script execution file, comparing the reference file with the current option value file to obtain the option value to be corrected in the current option value file, including:
in a server to be corrected, calling a preset tool by utilizing a script execution file, wherein the preset tool is used for comparing a reference file with a current option value file;
Judging whether inconsistent option values exist in the current option value file and the reference file according to a preset tool, the reference file and the current option value file;
if the inconsistent option value exists, taking the inconsistent option value as the option value to be corrected;
if there is no inconsistent option value, no correction information is output.
Specifically, in the server to be corrected, the script execution file test.sh is executed by using the OS system of the server to be corrected, and the test.sh invokes a preset tool, for example: the Vim tool is a text editing tool under a Linux operating system.
Taking a preset tool as a Vim tool as an example, the Vim tool compares a reference file bios.log with a current option value file bios.log, judges whether inconsistent option values exist between the bios.log and the bios.log, takes the inconsistent option values as option values to be corrected if the inconsistent option values exist, and stores the inconsistent option values in a diff.log file. If there is no inconsistent option value, no correction information (Pass information) is output.
The above process is as shown in fig. 3, and the script execution flow includes: on the server to be detected, a bios log and script execution file are imported. The OS executes all option values of the SCE export Setup with commands: SCElnx/o/s biosest.log/land. On the server to be detected, the OS down-calls the Vim tool. Compare the bios log and biostest log files and save the option inconsistencies in diff log files.
In this embodiment, the script execution file is used to call a preset tool, compare the reference file with the current option value file, and if there is an inconsistent option value, take the inconsistent option value as the option value to be corrected. The script execution file is used for automatically detecting the current option value, so that the production line flow is optimized, the labor investment is saved, the production efficiency of the production line is improved, and the problems of blocking the production line and the like are avoided.
In some alternative embodiments, correcting the option value to be corrected according to the script execution file and the reference file includes:
judging whether an option value to be corrected exists in the current option value file;
if the option value to be corrected exists, the option value to be corrected is stored, and early warning information is output;
obtaining a reference option value corresponding to the option value to be corrected according to the reference file;
modifying the option value to be modified into a reference option value to obtain a modified current option value file;
and adjusting all setting options in the server to be corrected by using the corrected current option value file.
Specifically, describing the present embodiment with reference to fig. 3, the script execution file test.sh stores the to-be-corrected option value of the current option value file in the diff.log file, and the test.sh determines whether the to-be-corrected option value exists in the current option value file by searching a Setup question=xxx field (XXX is an inconsistent option value) in the diff.log file, if so, stores a field string of the to-be-corrected option value "Setup question=xxx", and outputs a warning (warning) message.
Searching the saved options of the field of 'Setup question=xxx' in the reference file bios.log, and searching the reference option value corresponding to the field of 'Setup question=xxx' after the options are found. Searching the saved Setup option of Setup question=xxx in the current option value file biostest.log file, modifying the to-be-modified option value of the Setup option into a reference option value, and outputting a piece of Success (Success) information. And after all the option values to be corrected are corrected, obtaining a corrected current option value file. As shown in fig. 2, if the script execution file test.sh does not find an inconsistent option, outputting correction-free information (Pass information), if the inconsistent option exists, outputting Success information after the script execution is completed, and ending.
And adjusting all setting options in the server to be corrected by using the corrected current option value file.
It should be noted that, the present invention can understand the state of the server to be corrected by looking at the screen output. And if the Pass information is displayed on the screen, the setting options of the server to be corrected are consistent with the required standard values. If the screen displays Success information, the setting options of the server to be corrected are inconsistent with the required standard values, the server to be corrected is repaired, and the inconsistent Setup values can be seen by looking at the diff.log file.
In this embodiment, whether the option value to be corrected exists is determined by using the script execution file, if so, a reference option value corresponding to the option value to be corrected is obtained according to the reference file, the option value to be corrected is modified to be the reference option value, and finally, all the setting options in the server to be corrected are adjusted by using the corrected current option value file. The script execution file is used for automatically correcting the option value to be corrected according to the reference file, so that the production line flow is optimized, the labor investment is saved, the production efficiency of the production line is improved, and the problems of blocking the production line and the like are avoided.
In some alternative embodiments, running the script execution file includes:
acquiring the folder read-write authority of a server to be corrected;
and running the script execution file based on the folder read-write permission.
Specifically, the detailed steps of this embodiment will be described with reference to fig. 2, and after the script execution files test.sh and bios.log are copied to the corresponding directories of the OS, the OS system of the server to be modified obtains the folder read-write permission of the server to be modified by using the command: chmod 777. Then, the OS system executes a script execution file test.sh based on the folder read-write permission, and the running command is as follows: "/test.
In this embodiment, the folder read-write permission of the server to be corrected is obtained, and the script execution file is executed based on the folder read-write permission. The script execution file can modify the current option value file, and then the option value to be corrected is corrected according to the reference file.
In some optional embodiments, obtaining, according to the reference file, a reference option value corresponding to the option value to be corrected includes:
acquiring a character string corresponding to the option value to be corrected;
searching a target setting option corresponding to the character string in the reference file;
and taking the reference option value of the target setting option as the reference option value corresponding to the option value to be corrected.
Specifically, a character string corresponding to the option value to be corrected, for example, "Setup question=xxx", is acquired. The script execution file test.sh searches the target setting Options corresponding to the character string 'Setup question=xxx' in the reference file bios.log, finds the reference option value 'options=aaa' of the target setting Options searched later, takes AAA as the reference option value of the standard corresponding to Setup question=xxx, and records.
In this embodiment, the script execution file searches the reference option value corresponding to the option value to be corrected in the reference file according to the character string corresponding to the option value to be corrected, so as to facilitate the subsequent correction of the option value to be corrected.
In some alternative embodiments, adjusting all setting options in the server to be modified using the modified current option value file includes:
importing the corrected current option value file into a server to be corrected;
initiating an adjustment command at a server to be corrected, wherein the adjustment command is used for executing a setting control tool;
and importing all the option values in the corrected current option value file into a server to be corrected by using a setting control tool.
Specifically, if the corrected current option value file exists, the fact that the option value inconsistent with the standard required value exists in the server to be corrected is indicated, and the script execution file test. The OS system of the server to be corrected imports the corrected current option value file into the server to be corrected, and the OS system initiates an adjustment command, and executes a setting control tool by using the adjustment command, for example: AMI (Application Management Interface ) set control tool (Setup Control Environment, SCE), adjust commands are: SCELnx/i/sbiostest. And importing all the option values in the corrected current option value file into a server to be corrected by using a setting control tool.
In this embodiment, the corrected current option value file is imported into the server to be corrected, and then all option values in the corrected current option value file are imported into the server to be corrected through the setting control tool. And finishing correction of all the option values inconsistent with the standard requirement values in the server to be corrected.
In some alternative embodiments, after adjusting all the setting options in the server to be modified using the modified current option value file, the method further includes:
verifying the corrected current option value file by using a preset verification script to obtain a verification result, wherein the verification result is used for determining whether an option value to be corrected exists in the corrected current option value file;
under the condition that the verification result is successful in correction, testing each set option in the server to be corrected by using a preset test script to obtain a test result, wherein the test result is used for determining whether the option function of each set option is normal or not;
under the condition that the test result is normal, storing the option value to be corrected and the corresponding reference option value into an analysis database;
obtaining a target setting option according to data in an analysis database, wherein the probability that the current option value of the target setting option is an option value to be corrected is larger than a preset threshold value;
Information containing the target setting option is output.
Specifically, the corrected current option value file is verified by using a preset verification script, and whether all option values to be corrected are corrected successfully is judged. If the corrected current option value file still contains the option value to be corrected, the verification result is that correction fails; if the corrected current option value file does not have the option value to be corrected, the verification result is that the correction is successful. The process of verifying by presetting a verification script comprises the following steps: and correspondingly acquiring the latest option value of the target Setup option through the SCE tool, and verifying whether the Setup option of the server to be corrected is successfully modified based on the latest option value.
Under the condition that the verification result is successful in correction, calling a preset test script edited in advance to test each set option in the server to be corrected, judging whether the option function of each set option in the server to be corrected is normal or not, obtaining a test result, and if the option functions of all the set options are normal, judging that the test result is normal; if the setting options with abnormal option functions exist, the test result is abnormal. The preset test script is an executable JAVA script, and the script running process is a conventional test means, which is not repeated here.
A remote management tool and a database logging system are deployed on a server production line. After each server is produced, automatically collecting and recording, by a remote management tool, option values of Setup options of the BIOS firmware, including: the option value to be corrected and the corresponding reference option value are stored in an analysis database.
The data in the analysis database are analyzed and counted regularly, and the situation that the probability that a certain specific setting option is inconsistent with the reference option value in a certain type of server is found to be larger than a preset threshold value, namely the probability that the current option value of the target setting option is the option value to be corrected is larger than the preset threshold value, and the preset threshold value is set according to actual requirements. And outputting the information containing the target setting options to server production personnel. Based on the information containing the target setting options, the server producer can update the production flow and provide more detailed standard requirements to avoid such consistency problems. Meanwhile, the remote management tool and the automatic correction script check and correct the option value of the Setup option of the BIOS firmware of each server in real time in the configuration process of the server, thereby ensuring the consistency with the standard required value and improving the production efficiency and the quality control capability.
In this embodiment, the corrected current option value file is verified to obtain a verification result, so that it can be ensured that all option values to be corrected are corrected successfully. And testing each setting option in the server to be corrected, so that the normal function of the options of each setting option can be ensured. Under the condition that the test result is normal, the option value to be corrected and the corresponding reference option value are stored in an analysis database to obtain a target setting option, so that a server producer can update the production flow and standard requirements conveniently, and the condition that the current option value is inconsistent with the reference option value is avoided.
In some alternative embodiments, correcting the option value to be corrected according to the script execution file and the reference file includes:
determining a preset correction mode, wherein the preset correction mode comprises the following steps: non-full-quantity correction and full-quantity correction;
under the condition that a preset correction mode is full correction, determining a target option value partition of an option value to be corrected in a current option value file, wherein the current option value file comprises a first number of option value partitions, and the option value partition comprises a second number of current option values;
generating an image file according to the reference file and the target option value partition;
In the current option value file, erasing all current option values in the target option value partition, and writing data in the mirror image file into the target option value partition;
under the condition that a preset correction mode is non-full correction, determining a reference option value corresponding to an option value to be corrected according to a reference file;
and modifying the option value to be corrected into a reference option value to finish the correction of the option value to be corrected.
Specifically, a preset correction mode for correcting the option value to be corrected is set in advance, including: non-full-scale correction and full-scale correction. If the preset correction mode is full correction, the option value to be corrected and the option value related to the option value to be corrected are required to be corrected, and the condition of omission is avoided when inconsistent option values are found out by comparing the reference file and the current option value file. The current option value file contains a first number of option value partitions containing a second number of current option values, for example: the option values of the options set in the same BIOS page can be put into the same option value partition, and the first quantity and the second quantity are respectively represented as a plurality of quantities; and determining a target option value partition of the option value to be corrected in the current option value file, wherein the target option value partition is in the same option value partition with the option value to be corrected, and the target option value partition is related to the option value to be corrected.
And generating an image file according to the reference file and the target option value partition, wherein the image file contains reference option values corresponding to all current option values in the target option value partition. And in the current option value file, erasing all the current option values in the target option value partition, writing the data in the mirror image file into the target option value partition, and finishing correcting the option value to be corrected and the option value related to the option value to be corrected.
If the preset correction mode is non-full correction, the method only needs to correct the option value to be corrected, only needs to determine the reference option value corresponding to the option value to be corrected according to the reference file, and corrects the option value to be corrected into the reference option value to finish the correction of the option value to be corrected.
In this embodiment, the preset correction method includes: non-full-scale correction and full-scale correction. The non-total correction is only carried out on inconsistent option values, so that the speed is high and the efficiency is high. The full quantity correction can correct inconsistent option values and inconsistent option values related to the inconsistent option values, so that omission is avoided when inconsistent option values are searched.
On the basis of the above embodiment, the method for correcting the option value of the setting option provided by the embodiment of the application further provides a method for reducing the option value required to be compared and corrected.
Specifically, the Setup option in the server, which requires frequent adjustment of the option value, or the Setup option according to the client's requirements, is marked with a unique identifier, for example: mapping the character String Map String. And carrying out adaptive modification on the script execution file, calling an SCE tool through the script execution file, and exporting the option values of the BIOS options marked with Map String and the Map String of the server to be modified in a BIOS. Based on Map String in the derived bios.txt, modifying, by the SCE tool, a target Setup option according to the reference file in a command line manner, where the target Setup option is a setting option whose option value is inconsistent with the reference option value. After the inconsistent option values are modified, restarting the server to be modified, correspondingly acquiring the latest option value of the target Setup option through the SCE tool, and verifying whether the Setup option of the server to be modified is successfully modified or not based on the latest option value. And then, when the verification result of the server to be corrected is that the correction is successful, automatically testing whether the option function of the modified target Setup option is normal or not.
It should be noted that, the script execution file may be an executable JAVA script, and may be implemented by selecting other languages according to actual situations, for example, c++ language or c# language to implement the same function.
In addition, when modifying the target Setup option according to the reference file in a command line manner through the SCE tool, the command line may employ: SCELNX_64/i/ms < Map String >/qv "value". The "Map String" in the command line is the Map String of the target SETUP option, and the "value" is the current option value of the corresponding target SETUP option.
Further, the method for automatically testing whether the option function of the modified target Setup option is normal is as follows: and calling a corresponding test case script which is edited in advance, and automatically testing the option function of the modified target Setup option, wherein the test case script is an executable JAVA script.
In this embodiment, the unique identifier is used to mark the Setup option in the server that needs to frequently adjust the option value or the Setup option according to the client requirement, so as to reduce the number of Setup options that need to compare and correct the option value, improve the correction efficiency, and shorten the correction time. The Setup option with the unique identifier Map String is automatically corrected through the script execution file, so that the problems that in the prior art, a maintenance engineer is required to manually compare, the fault self-checking efficiency is low, and the option value of the Setup option in the BIOS firmware cannot be automatically corrected to a standard required value are solved.
The present embodiment provides an option value correction device for setting options, as shown in fig. 4, including:
an initiating module 401, configured to initiate a read command in the reference server, where the read command is used to execute a setting control tool;
a deriving module 402, configured to derive reference option values of all setting options in the reference server according to the setting control tool;
a generating module 403, configured to generate a reference file according to the reference option value;
an obtaining module 404, configured to obtain a script execution file for correcting the option value, and copy the script execution file and the reference file to the server to be corrected;
the storage module 405 is configured to run a script execution file, obtain current option values of all setting options in the server to be corrected according to the script execution file, and store the current option values to a current option value file;
the obtaining module 406 is configured to compare the reference file with the current option value file based on the script execution file, to obtain an option value to be corrected in the current option value file;
the correction module 407 is configured to correct the value of the option to be corrected according to the script execution file and the reference file.
In some alternative embodiments, the deriving module 406 includes:
The calling unit is used for calling a preset tool by utilizing a script execution file in the server to be corrected, wherein the preset tool is used for comparing the reference file with the current option value file;
the first judging unit is used for judging whether inconsistent option values exist in the current option value file and the reference file according to the preset tool, the reference file and the current option value file;
as a unit for taking the inconsistent option value as the option value to be corrected if the inconsistent option value exists;
and the first output unit is used for outputting the correction-free information if the inconsistent option value does not exist.
In some alternative embodiments, the correction module 407 includes:
the second judging unit is used for judging whether the option value to be corrected exists in the current option value file;
the second output unit is used for storing the option value to be corrected and outputting early warning information if the option value to be corrected exists;
the first obtaining unit is used for obtaining a reference option value corresponding to the option value to be corrected according to the reference file;
the second obtaining unit is used for modifying the option value to be modified into a reference option value to obtain a modified current option value file;
and the correction unit is used for adjusting all setting options in the server to be corrected by using the corrected current option value file.
In some alternative embodiments, the storage module 405 includes:
the acquisition unit is used for acquiring the folder read-write permission of the server to be corrected;
and the running unit is used for running the script execution file based on the folder read-write permission.
In some alternative embodiments, the first deriving unit comprises:
the acquisition sub-module is used for acquiring the character strings corresponding to the option values to be corrected;
the searching sub-module is used for searching target setting options corresponding to the character strings in the reference file;
and the sub-module is used for taking the reference option value of the target setting option as the reference option value corresponding to the option value to be corrected.
In some alternative embodiments, the correction unit includes:
the first importing sub-module is used for importing the corrected current option value file into the server to be corrected;
the launch driver module is used for launching an adjustment command on the server to be corrected, wherein the adjustment command is used for executing a setting control tool;
and the second importing sub-module is used for importing all the option values in the corrected current option value file into the server to be corrected by using the setting control tool.
In some alternative embodiments, the correction module 407 includes:
The verification unit is used for verifying the corrected current option value file by using a preset verification script to obtain a verification result, wherein the verification result is used for determining whether the corrected current option value file has an option value to be corrected or not;
the test unit is used for testing each set option in the server to be corrected by using a preset test script under the condition that the verification result is successful in correction, so as to obtain a test result, wherein the test result is used for determining whether the option function of each set option is normal or not;
the storage unit is used for storing the option value to be corrected and the corresponding reference option value into the analysis database under the condition that the test result is normal;
the third obtaining unit is used for obtaining a target setting option according to the data in the analysis database, wherein the probability that the current option value of the target setting option is the option value to be corrected is larger than a preset threshold value;
and a third output unit for outputting information containing the target setting option.
In some alternative embodiments, the correction module 407 includes:
the first determining unit is configured to determine a preset correction mode, where the preset correction mode includes: non-full-quantity correction and full-quantity correction;
The second determining unit is used for determining a target option value partition of the option value to be corrected in the current option value file under the condition that the preset correction mode is full correction, wherein the current option value file comprises a first number of option value partitions, and the option value partition comprises a second number of current option values;
the generating unit is used for generating an image file according to the reference file and the target option value partition;
the writing unit is used for erasing all the current option values in the target option value partition in the current option value file and writing the data in the image file into the target option value partition;
the third determining unit is used for determining a reference option value corresponding to the option value to be corrected according to the reference file under the condition that the preset correction mode is non-full correction;
and the modification unit is used for modifying the option value to be modified into the reference option value to finish the modification of the option value to be modified.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The option value correction means of the setting options in this embodiment are presented in the form of functional units, here referred to as ASIC (Application Specific Integrated Circuit ) circuits, processors and memories executing one or more software or fixed programs, and/or other devices that can provide the above described functions.
The embodiment of the invention also provides a computer device, which is provided with the option value correction device of the setting option shown in the figure 4.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 5, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 5.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform a method for implementing the embodiments described above.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (11)

1. An option value correction method for setting options, the method comprising:
in a reference server, initiating a read command, wherein the read command is used for executing a setting control tool;
according to the setting control tool, deriving reference option values of all setting options in the reference server;
generating a reference file according to the reference option value;
acquiring a script execution file for correcting the option value, and copying the script execution file and the reference file to a server to be corrected;
running the script execution file, obtaining current option values of all the setting options in the server to be corrected according to the script execution file, and storing the current option values into a current option value file;
comparing the reference file with the current option value file based on the script execution file to obtain an option value to be corrected in the current option value file;
And correcting the option value to be corrected according to the script execution file and the reference file.
2. The method of claim 1, wherein comparing the reference file with the current option value file based on the script execution file to obtain the option value to be corrected in the current option value file, comprises:
calling a preset tool by using the script execution file in the server to be corrected, wherein the preset tool is used for comparing the reference file with the current option value file;
judging whether inconsistent option values exist in the current option value file and the reference file according to the preset tool, the reference file and the current option value file;
if the inconsistent option value exists, taking the inconsistent option value as the option value to be corrected;
and outputting correction-free information if the inconsistent option value does not exist.
3. The method of claim 2, wherein said modifying said option value to be modified based on said script execution file and said reference file comprises:
judging whether the option value to be corrected exists in the current option value file;
If the option value to be corrected exists, the option value to be corrected is stored, and early warning information is output;
obtaining the reference option value corresponding to the option value to be corrected according to the reference file;
modifying the option value to be modified into the reference option value to obtain a modified current option value file;
and adjusting all the setting options in the server to be corrected by using the corrected current option value file.
4. The method of claim 1, wherein the running the script execution file comprises:
acquiring the folder read-write permission of the server to be corrected;
and running the script execution file based on the folder read-write permission.
5. The method of claim 3, wherein the obtaining, according to the reference file, the reference option value corresponding to the option value to be corrected includes:
acquiring a character string corresponding to the option value to be corrected;
searching a target setting option corresponding to the character string in the reference file;
and taking the reference option value of the target setting option as the reference option value corresponding to the option value to be corrected.
6. The method of claim 3, wherein said adjusting all of said setting options in said server to be modified using said modified current option value file comprises:
importing the corrected current option value file into the server to be corrected;
initiating an adjustment command at the server to be corrected, wherein the adjustment command is used for executing a setting control tool;
and importing all the option values in the corrected current option value file into the server to be corrected by using the setting control tool.
7. The method of claim 3, wherein after said adjusting all of said setting options in said server to be modified using said modified current option value file, said method further comprises:
verifying the corrected current option value file by using a preset verification script to obtain a verification result, wherein the verification result is used for determining whether the option value to be corrected exists in the corrected current option value file;
under the condition that the verification result is successful in correction, testing each set option in the server to be corrected by using a preset test script to obtain a test result, wherein the test result is used for determining whether the option function of each set option is normal or not;
Storing the option value to be corrected and the corresponding reference option value into an analysis database under the condition that the test result is normal;
obtaining a target setting option according to the data in the analysis database, wherein the probability that the current option value of the target setting option is the option value to be corrected is larger than a preset threshold value;
and outputting information containing the target setting options.
8. The method of claim 2, wherein said modifying said option value to be modified based on said script execution file and said reference file comprises:
determining a preset correction mode, wherein the preset correction mode comprises the following steps: non-full-quantity correction and full-quantity correction;
determining a target option value partition of the option value to be corrected in the current option value file under the condition that the preset correction mode is the full correction mode, wherein the current option value file comprises a first number of option value partitions, and the option value partition comprises a second number of current option values;
generating an image file according to the reference file and the target option value partition;
in the current option value file, erasing all the current option values in the target option value partition, and writing the data in the mirror image file into the target option value partition;
Determining the reference option value corresponding to the option value to be corrected according to the reference file under the condition that the preset correction mode is the non-full correction mode;
and modifying the option value to be modified into the reference option value to finish modification of the option value to be modified.
9. An option value correction device for setting options, the device comprising:
the system comprises an initiation module, a reference server and a control module, wherein the initiation module is used for initiating a read command in the reference server, and the read command is used for executing a setting control tool;
the export module is used for exporting reference option values of all the setting options in the reference server according to the setting control tool;
the generation module is used for generating a reference file according to the reference option value;
the acquisition module is used for acquiring a script execution file for correcting the option value and copying the script execution file and the reference file to a server to be corrected;
the storage module is used for running the script execution file, obtaining current option values of all the setting options in the server to be corrected according to the script execution file, and storing the current option values into a current option value file;
The obtaining module is used for comparing the reference file with the current option value file based on the script execution file to obtain an option value to be corrected in the current option value file;
and the correction module is used for correcting the option value to be corrected according to the script execution file and the reference file.
10. A computer device, comprising:
a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the option value modification method of the setting option of any one of claims 1 to 8.
11. A computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the option value correction method of the setting option of any one of claims 1 to 8.
CN202311271606.4A 2023-09-28 2023-09-28 Method, device, equipment and medium for correcting option value of setting option Pending CN117234781A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311271606.4A CN117234781A (en) 2023-09-28 2023-09-28 Method, device, equipment and medium for correcting option value of setting option

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311271606.4A CN117234781A (en) 2023-09-28 2023-09-28 Method, device, equipment and medium for correcting option value of setting option

Publications (1)

Publication Number Publication Date
CN117234781A true CN117234781A (en) 2023-12-15

Family

ID=89089266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311271606.4A Pending CN117234781A (en) 2023-09-28 2023-09-28 Method, device, equipment and medium for correcting option value of setting option

Country Status (1)

Country Link
CN (1) CN117234781A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117789192A (en) * 2024-02-26 2024-03-29 浪潮计算机科技有限公司 Setting item management method, device, equipment and medium of basic input/output system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117789192A (en) * 2024-02-26 2024-03-29 浪潮计算机科技有限公司 Setting item management method, device, equipment and medium of basic input/output system
CN117789192B (en) * 2024-02-26 2024-06-11 浪潮计算机科技有限公司 Setting item management method, device, equipment and medium of basic input/output system

Similar Documents

Publication Publication Date Title
US10949225B2 (en) Automatic detection of user interface elements
CN109032611B (en) Script deployment method and device, computer equipment and storage medium
CN106991104B (en) Database script deployment device and database script deployment method
CN113127347B (en) Interface testing method, device, equipment and readable storage medium
CN117234781A (en) Method, device, equipment and medium for correcting option value of setting option
CN110008129B (en) Reliability test method, device and equipment for storage timing snapshot
WO2020000806A1 (en) Configuration file comparison method and configuration file comparison device
CN109032838B (en) Automatic verification method for consistency of backup and recovery data of virtual machine
CN109840194B (en) Method and system for detecting configuration file
CN113448862B (en) Software version testing method and device and computer equipment
CN111651358B (en) Method for generating test case, software test method, device and server
US20210406001A1 (en) Method and system for fast building and testing software
CN110063042A (en) A kind of response method and its terminal of database failure
CN116089260A (en) SQL sentence detection method and device
CN113824815B (en) Intelligent port mapping method for WSL2 system
CN111857752B (en) PostgreSQL database installation method, device and equipment
CN114937316B (en) Software fault detection method, device, equipment and medium
CN116049011A (en) Deployment method and device of test environment, electronic equipment and storage medium
CN110704318B (en) Map data automatic testing method, terminal device and storage medium
CN113918594A (en) Method and device for generating structured query statement and computer equipment
CN111124597B (en) Method, equipment and medium for positioning fault item in Vtermination test
CN113656318A (en) Software version testing method and device and computer equipment
CN108536599B (en) BIOS default configuration verification method, system, device and computer readable storage medium
US20210103512A1 (en) Troubleshooting test failures that occurred during a testing phase of a continuous integration pipeline
US20220036669A1 (en) Flight management system and method for reporting an intermitted error

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