CN114116033A - Server configuration modification method and device - Google Patents

Server configuration modification method and device Download PDF

Info

Publication number
CN114116033A
CN114116033A CN202111430684.5A CN202111430684A CN114116033A CN 114116033 A CN114116033 A CN 114116033A CN 202111430684 A CN202111430684 A CN 202111430684A CN 114116033 A CN114116033 A CN 114116033A
Authority
CN
China
Prior art keywords
option
bios
configuration file
current
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.)
Granted
Application number
CN202111430684.5A
Other languages
Chinese (zh)
Other versions
CN114116033B (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.)
Zhongke Sugon Information Industry Chengdu Co ltd
Original Assignee
Zhongke Sugon Information Industry Chengdu Co ltd
Dawning Information Industry 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 Zhongke Sugon Information Industry Chengdu Co ltd, Dawning Information Industry Co Ltd filed Critical Zhongke Sugon Information Industry Chengdu Co ltd
Priority to CN202111430684.5A priority Critical patent/CN114116033B/en
Publication of CN114116033A publication Critical patent/CN114116033A/en
Application granted granted Critical
Publication of CN114116033B publication Critical patent/CN114116033B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a server configuration modification method and a server configuration modification device, wherein the server configuration modification method comprises the steps of obtaining a first configuration file and a second configuration file of a BIOS (basic input output System) of a server; acquiring each BIOS option in a first configuration file and a first current modification value corresponding to each BIOS option, wherein the first current modification value is determined in a plurality of candidate values; searching a corresponding BIOS option in the second configuration file according to each obtained BIOS option; and modifying the current option value of the corresponding BIOS option in the searched second configuration file by using an editor according to the first current modified value corresponding to each BIOS option, thereby automatically modifying the option value of the BIOS option and further improving the efficiency and the accuracy.

Description

Server configuration modification method and device
Technical Field
The present application relates to the technical field of server configuration, and in particular, to a method and an apparatus for modifying server configuration.
Background
In the actual production, test and use processes, a server often modifies option parameters of a Basic Input Output System (BIOS), a common method for modifying the BIOS is to restart the system manually, and enter a BIOS Setup for modification, which requires restarting the system and a long waiting time, and if the BIOS option needs to be adjusted frequently, the problem is more prominent.
In order to solve the above problems, most server manufacturers implement a way of modifying the BIOS through a Baseboard Management Controller (BMC), modify BIOS options through the BMC, and can modify the BIOS without restarting setup, and take effect when the system is restarted next time.
The currently common method for modifying the BIOS option is to manually log in a BMC WEB interface, download a configuration file, manually check a modifiable value of the BIOS in the configuration file, manually modify a value corresponding to the BIOS option, and upload the modified value to a BMC WEB restart machine. The BIOS has a plurality of options and the corresponding values of each option are different, so that the problem of low manual efficiency exists in manual modification, and the problem of low accuracy exists in the manual mode because the phenomenon of misoperation is difficult to avoid.
Disclosure of Invention
An object of the embodiments of the present application is to provide a server configuration modification method and apparatus, so as to solve the above problem.
In a first aspect, the present invention provides a server configuration modification method, including: acquiring a first configuration file and a second configuration file of BIOS options of a server, wherein the first configuration file comprises a plurality of BIOS options and a plurality of candidate values corresponding to each BIOS option, and the second configuration file comprises the plurality of BIOS options and current option values corresponding to each BIOS option; acquiring each BIOS option in the first configuration file and a first current modification value corresponding to each BIOS option, wherein the first current modification value is determined in a plurality of candidate values; searching a corresponding BIOS option in the second configuration file according to each obtained BIOS option; and modifying the current option value of the corresponding BIOS option in the searched second configuration file by utilizing an editor according to the first current modified value corresponding to each BIOS option.
In the server configuration modification method, the first configuration file and the second configuration file of the BIOS of the server are automatically acquired, then the first current modification value corresponding to each BIOS option and each BIOS option in the first configuration file are acquired, then the corresponding BIOS option is automatically searched in the second configuration file according to each acquired BIOS option, and the editor is used for automatically modifying or replacing the current option value of the corresponding BIOS option in the second configuration file according to the first current modification value of each BIOS option, so that the problem of low efficiency caused by manual modification of the BIOS options at present is solved, and the modification efficiency and accuracy of the option values of the BIOS configuration files of the server are improved.
In an optional implementation manner of the first aspect, the obtaining each BIOS option in the first configuration file and a first current modified value corresponding to each BIOS option includes: saving all BIOS options in the first configuration file as a first list; saving each BIOS option in the first configuration file and a plurality of corresponding option values as a second list; and traversing the first list to acquire each BIOS option in the first list, and acquiring a first current modification value from a plurality of option values of the corresponding BIOS option in the second list according to each acquired BIOS option.
In the embodiment designed above, the present solution saves all BIOS options in the first configuration file as the first list, and saves each BIOS option and the corresponding multiple option values in the first configuration file as the second list, so that fewer operations can be spent on querying and obtaining the BIOS options and the corresponding multiple option values.
In an optional implementation manner of the first aspect, after the modifying, by the editor, the current option value of the BIOS option corresponding to the found second configuration file according to the first current modified value corresponding to each BIOS option, the method further includes: judging whether the current option values of all BIOS options in the second configuration file are modified; if so, uploading the modified second configuration file to the substrate management controller, and restarting the server; after the server is restarted, the second configuration file is downloaded again, and whether the modification of each BIOS option in the downloaded second configuration file is effective or not is judged; and if the BIOS option modification is not effective, prompting to modify the BIOS option which is not effective.
In the embodiment designed above, after the current option value in the second configuration file is modified, the second configuration file is downloaded again to determine whether the modification is effective, so as to ensure that the modification of the second configuration file is successful.
In an optional implementation manner of the first aspect, after the determining whether the modification of each BIOS option in the re-downloaded second configuration file is effective, the method further includes: and if the modification of all the BIOS options is effective, determining that the modification of the second configuration file is completed.
In the embodiment designed above, the scheme automatically judges whether the modification of the BIOS option in the second configuration file is effective, so as to solve the problem of low efficiency and low accuracy rate existing in the manual judgment of whether the modification of the BIOS option is effective, thereby improving the efficiency and accuracy rate of the modification of the BIOS option.
In an optional implementation manner of the first aspect, after the determining whether the modification of each BIOS option in the re-downloaded second configuration file is effective, the method further includes: if all the BIOS options are modified effectively, acquiring each BIOS option in the first configuration file and a second current modified value corresponding to each BIOS option, wherein the second current modified value is determined in a plurality of candidate values, and the second current modified value is different from the first current modified value; searching a corresponding BIOS option in the re-downloaded second configuration file according to each obtained BIOS option; and modifying the current option value of the corresponding BIOS option in the searched second configuration file which is downloaded again by utilizing the editor according to the second current modified value corresponding to each BIOS option.
In an optional implementation manner of the first aspect, the determining whether the modification of each BIOS option in the re-downloaded second configuration file is effective includes: acquiring the current option value of each BIOS option in the second configuration file which is downloaded again; judging whether the current option value of each BIOS option in the second configuration file downloaded again is the same as the corresponding first current modification value; if the current option value of the BIOS option in the second downloaded configuration file is the same as the corresponding first current modification value, determining that the modification of the corresponding BIOS option is effective; and if the current option value of the BIOS option in the second downloaded configuration file is different from the corresponding first current modification value, determining that the modification of the corresponding BIOS option is not effective.
In the embodiment designed above, the scheme automatically judges whether the modification of the second configuration file is effective, and prompts the BIOS options which are not effective, so that a test engineer can conveniently check the test result; and after the active modification mode takes effect, the second configuration file can be modified again, so that the active modification of the second configuration file is tested for many times, and the accuracy of the active modification mode is ensured.
In an optional implementation manner of the first aspect, the first current modification value is a first sequence value of a corresponding BIOS option, and after the modifying, by using the editor, the current option value of the corresponding BIOS option in the found second configuration file according to the first current modification value corresponding to each BIOS option, the method further includes: judging whether the current option values of all BIOS options in the second configuration file are modified; if so, uploading the modified second configuration file to the substrate management controller, and restarting the server; after the server is restarted, the second configuration file is downloaded again, and whether the modification of each BIOS option in the downloaded second configuration file is effective or not is judged; and if all the BIOS options are effective, sequentially obtaining a second current modification value of each BIOS option according to the sequence of the plurality of candidate values of each BIOS option, and modifying the current option value of the BIOS option in the corresponding re-downloaded second configuration file by using the editor to obtain the second current modification value of the BIOS option each time until the plurality of option values of all the BIOS options are obtained.
In the embodiment designed above, the scheme uses the sequence of multiple candidate values of the BIOS option to sequentially obtain each candidate value and further modify the option value of the corresponding BIOS option in the second configuration file for multiple times, so that the modification process of the BIOS option can be automatically realized according to the sequence of the candidate values, and thus, when the server leaves the factory, full-automatic detection on the server can be realized by traversing and testing all candidate values in the BIOS option.
In a second aspect, the present invention provides a server configuration modification apparatus, including: the server comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a first configuration file and a second configuration file of server BIOS options, the first configuration file comprises a plurality of BIOS options and a plurality of candidate values corresponding to each BIOS option, and the second configuration file comprises the plurality of BIOS options and current option values corresponding to each BIOS option; and; acquiring each BIOS option in the first configuration file and a first current modification value corresponding to each BIOS option, wherein the first current modification value is determined in a plurality of candidate values; the searching module is used for searching the corresponding BIOS option in the second configuration file according to each obtained BIOS option; and the modification module is used for modifying the found current option value of the corresponding BIOS option in the second configuration file by utilizing the editor according to the first current modification value corresponding to each BIOS option.
In the server configuration modification device designed above, the scheme first automatically acquires a first configuration file and a second configuration file of the BIOS of the server, then acquires each BIOS option in the first configuration file and a first current modification value corresponding to each BIOS option, then automatically searches for the corresponding BIOS option in the second configuration file according to each acquired BIOS option, and automatically modifies or replaces the current option value of the corresponding BIOS option in the second configuration file according to the first current modification value of each BIOS option by using an editor, so that it can be seen that the scheme of the application realizes the automatic modification of the BIOS option value in the BIOS configuration file of the server, thereby solving the problem of low efficiency caused by the manual modification of the BIOS option at present, and improving the modification efficiency and accuracy of the option value of the BIOS configuration file of the server.
In an optional implementation manner of the second aspect, the obtaining module is specifically configured to store all BIOS options in the first configuration file as a first list; saving each BIOS option in the first configuration file and a plurality of corresponding option values as a second list; and traversing the first list to acquire each BIOS option in the first list, and acquiring a first current modification value from a plurality of option values of the corresponding BIOS option in the second list according to each acquired BIOS option.
In an optional implementation manner of the second aspect, the apparatus further includes a determining module, configured to determine whether current option values of all BIOS options in the second configuration file are modified; the uploading module is used for uploading the modified second configuration file to the substrate management controller and restarting the server after the modification is judged to be finished; the downloading module is used for downloading the second configuration file again after the server is restarted; the judging module is further configured to judge whether the modification of each BIOS option in the re-downloaded second configuration file is valid; and the prompting module is used for prompting that the BIOS option which is not in effect is modified under the condition that the BIOS option modification is judged not to be in effect.
In an optional implementation manner of the second aspect, the apparatus further includes a determining module, configured to determine that the modification of the second profile is completed, if it is determined that the modifications of all the BIOS options are in effect.
In an optional implementation manner of the second aspect, the obtaining module is further configured to, when it is determined that all modifications of the BIOS options are valid, obtain each BIOS option in the first configuration file and a second current modification value corresponding to each BIOS option, where the second current modification value is determined among a plurality of candidate values, and the second current modification value is different from the first current modification value; the searching module is further configured to search the corresponding BIOS option in the re-downloaded second configuration file according to each obtained BIOS option; and the modification module is also used for modifying the found current option value of the corresponding BIOS option in the re-downloaded second configuration file by utilizing the editor according to the second current modification value corresponding to each BIOS option.
In an optional implementation manner of the second aspect, the determining module is specifically configured to obtain a current option value of each BIOS option in the second configuration file that is downloaded again; judging whether the current option value of each BIOS option in the second configuration file downloaded again is the same as the corresponding first current modification value; if the current option value of the BIOS option in the second downloaded configuration file is the same as the corresponding first current modification value, determining that the modification of the corresponding BIOS option is effective; and if the current option value of the BIOS option in the second downloaded configuration file is different from the corresponding first current modification value, determining that the modification of the corresponding BIOS option is not effective.
In an optional implementation manner of the second aspect, the first current modification value is a first sequence value of the corresponding BIOS option, and the determining module is further configured to determine whether current option values of all BIOS options in the second configuration file are modified; the uploading module is also used for uploading the modified second configuration file to the substrate management controller after the modification is finished and restarting the server; the downloading module is also used for downloading the second configuration file again after the server is restarted; the judging module is further configured to judge whether the modification of each BIOS option in the re-downloaded second configuration file is valid; the obtaining module is further configured to sequentially obtain a second current modification value of each BIOS option according to the sequence of the plurality of candidate values of each BIOS option after determining that all BIOS options are valid; and the modification module is further used for modifying the current option value of the BIOS option in the second configuration file corresponding to the re-download by utilizing the second current modification value of the BIOS option obtained each time by utilizing the editor until the plurality of option values of all the BIOS options are obtained. In the embodiment designed above, the scheme uses the sequence of multiple candidate values of the BIOS option to sequentially obtain each candidate value and further modify the option value of the corresponding BIOS option in the second configuration file for multiple times, so that the modification process of the BIOS option can be automatically realized according to the sequence of the candidate values, and thus, when the server leaves the factory, full-automatic detection on the server can be realized by traversing and testing all candidate values in the BIOS option.
In a third aspect, the present application provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor executes the computer program to perform the method in the first aspect or any optional implementation manner of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the method of the first aspect, any optional implementation manner of the first aspect.
In a fifth aspect, the present application provides a computer program product, which when run on a computer, causes the computer to perform the method of the first aspect, any optional implementation manner of the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a first flowchart of a server configuration modification method according to an embodiment of the present application;
fig. 2 is a second flowchart of a server configuration modification method provided in an embodiment of the present application;
fig. 3 is a third flowchart of a server configuration modification method provided in an embodiment of the present application;
fig. 4 is a fourth flowchart of a server configuration modification method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a server configuration modification apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Icon: 500-an acquisition module; 510-a lookup module; 520-a modification module; 530-judging module; 540-upload module; 550-a download module; 560-prompt module; 570-a determination module; 6-an electronic device; 601-a processor; 602-a memory; 603-communication bus.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
The embodiment of the present application provides a server configuration modification method, which can automatically modify values of each option of a Basic Input Output System (BIOS) of a server, as shown in fig. 1, and the server configuration modification method may include the following steps:
step S100: a first configuration file and a second configuration file of a BIOS of a server are obtained.
Step S110: and acquiring each BIOS option in the first configuration file and a first current modified value corresponding to each BIOS option.
Step S120: and searching the corresponding BIOS option in the second configuration file according to each obtained BIOS option.
Step S130: and modifying the current option value of the corresponding BIOS option in the searched second configuration file by utilizing an editor according to the first current modified value corresponding to each BIOS option.
In step S100, the first configuration file includes a plurality of BIOS options and a plurality of candidate values corresponding to each BIOS option, where the plurality of BIOS options refer to a plurality of BIOS option names, for example, BIOS option A, BIOS option B, etc.; the candidate values corresponding to each BIOS option refer to a plurality of option values that can be changed corresponding to each BIOS option, for example, the BIOS option a has three options, the values of the three options are 3, 4, and 5, respectively, and then the three option values of 3, 4, and 5 are candidate values of the BIOS option a.
The second configuration file also includes the aforementioned multiple BIOS options, but the second configuration file includes a current option value of each BIOS option, where the current option value represents a value at which the BIOS option in the server is currently located, for example, the current option value selected by the aforementioned BIOS option a among the three options is 3.
It should be noted that, in a preferred embodiment, the present solution may log in the BMC web through an API interface to download the first configuration file and the second configuration file, where the first configuration file is a downloaded attribute registry json file in the actual application, and the second configuration file is a downloaded current setup base json file in the actual application.
In step S110, the present solution obtains each BIOS option in the first configuration file and a first current modification value corresponding to each BIOS option, where each obtained BIOS option refers to obtaining a name of each BIOS option, for example, the aforementioned example BIOS option a and BIOS option B.
The first current modification value corresponding to each BIOS option is determined among a plurality of candidate values, wherein the manner of determining the first current modification value may be various, and as a possible implementation manner, one candidate value among the plurality of candidate values may be randomly selected as the first current modification value corresponding to the BIOS option; as another possible implementation, one candidate value of the plurality of candidate values of each BIOS option may be designated as the first current modified value of the corresponding BIOS option; as another possible implementation, the plurality of candidate values of the BIOS option have a certain order, for example, a descending order or a descending order, and the present solution may determine the largest or smallest candidate value as the first current modification value.
As a possible implementation, step S110 can also be implemented as follows: after the first configuration file is obtained, all BIOS options in the first configuration file can be saved as a first list, and then each BIOS option in the first configuration file and a plurality of corresponding candidate values are saved as a second list; then, each BIOS option in the first list can be obtained by traversing the first list, and then, under the condition of obtaining the BIOS options in the first list, a corresponding first current modification value can be determined in a plurality of candidate values corresponding to the second list according to the BIOS options.
After obtaining each BIOS option and the first current modification value corresponding to each BIOS option, the present solution performs step S120 to find the corresponding BIOS option in the second configuration file according to each BIOS option, as a possible implementation manner, according to the present application, the BIOS options with the same name may be retrieved and located in the second configuration file according to the name of each BIOS option, and then performs step S130 to modify the current option value of the found BIOS option to the corresponding first current modification value by using the editor, thereby automatically implementing modification of the current option value of the BIOS option in the second configuration file. The editor in step S130 may be a Stream Editor (SED).
In the server configuration modification method, the first configuration file and the second configuration file of the BIOS of the server are automatically acquired, then the first current modification value corresponding to each BIOS option and each BIOS option in the first configuration file are acquired, then the corresponding BIOS option is automatically searched in the second configuration file according to each acquired BIOS option, and the editor is used for automatically modifying or replacing the current option value of the corresponding BIOS option in the second configuration file according to the first current modification value of each BIOS option, so that the problem of low efficiency caused by manual modification of the BIOS options at present is solved, and the modification efficiency and accuracy of the option values of the BIOS configuration files of the server are improved.
In an optional implementation manner of this embodiment, after performing step S130 to modify the second configuration file, as shown in fig. 2, the scheme of this application may further perform the following steps:
step S200: and judging whether the current option values of all the BIOS options in the second configuration file are modified, if so, going to step S210.
Step S210: and uploading the modified second configuration file to the base plate management controller, and restarting the server.
Step S220: and after the server is restarted, the second configuration file is downloaded again.
Step S230: and judging whether the modification of each BIOS option in the re-downloaded second configuration file is effective, if not, going to the step S240.
Step S240: prompting to modify BIOS options that are not in effect.
In the above embodiment, in the present scheme, after modifying the current option values of all BIOS options in the second configuration file, the modified second configuration file may be uploaded to the BMC, and then the server is restarted, and after the server is restarted, the second configuration file is downloaded again, and then it is determined whether the modification of each BIOS option in the second configuration file is valid, and if there is a BIOS option that is not valid, it is prompted to modify the BIOS option that is not valid.
As a possible implementation manner, the determining whether the modification of each BIOS option in the re-downloaded second configuration file is valid in the foregoing step S230 may be implemented by the following manner, as shown in fig. 3, including:
step S300: and acquiring the current option value of each BIOS option in the second configuration file which is downloaded again.
Step S310: judging whether the current option value of each BIOS option in the second configuration file downloaded again is the same as the corresponding first current modification value, if not, turning to the step S320; if yes, go to step S330.
Step S320: and if the current option value of the BIOS option in the second downloaded configuration file is different from the corresponding first current modification value, determining that the modification of the corresponding BIOS option is not effective.
Step S330: and if the current option value of the BIOS option in the second downloaded configuration file is the same as the corresponding first current modification value, determining that the modification of the corresponding BIOS option is effective.
In the above embodiment, in the present scheme, the current option value of each BIOS option in the re-downloaded second configuration file is compared with the first current modification value of the corresponding BIOS option, if the current option value of the BIOS option in the re-downloaded second configuration file is the same as the first current modification value of the corresponding BIOS option, it is determined that the modification of the corresponding BIOS option is valid, and if the current option value of the BIOS option in the re-downloaded second configuration file is not the same as the first current modification value of the corresponding BIOS option, it is determined that the modification of the corresponding BIOS option is not valid, thereby determining whether the modification of the BIOS option is valid.
As a possible implementation manner, in the case that the foregoing step S230 determines that all the modifications of the BIOS options in the newly downloaded configuration file are valid, the present solution may determine that the modification of the second configuration file is completed, that is, that no error occurs in the modification of all the BIOS options in the second configuration file.
As another possible implementation manner, in the case that it is determined in the foregoing step S230 that all the modifications of the BIOS options in the newly downloaded configuration file are valid, the present solution may further continue to change the BIOS options of the server by the following steps, as shown in fig. 4, including:
step S400: and acquiring each BIOS option in the first configuration file and a second current modified value corresponding to each BIOS option.
Step S410: and searching the corresponding BIOS option in the second configuration file which is downloaded again according to each obtained BIOS option.
Step S420: and modifying the current option value of the corresponding BIOS option in the searched second configuration file which is downloaded again by utilizing the editor according to the second current modified value corresponding to each BIOS option.
In the above step, the second current modification value corresponding to each BIOS option is different from the corresponding first current modification value, that is, when the option value of the BIOS option is modified for the second time, the selected current modification value is different from the current modification value selected at the time of the first modification.
Under the condition of obtaining the second current modification value corresponding to each BIOS option, the present solution is similar to the execution solution of the foregoing steps S120 to S130, that is, the BIOS options in the second configuration file are retrieved and positioned based on each BIOS option, and then the editor is used to modify or replace the current option value of the BIOS option found in the second configuration file downloaded again according to the second current value corresponding to each BIOS option, so that the second modification of the second configuration file is completed after all the BIOS options are modified.
In the embodiment designed above, the scheme automatically judges whether the modification of the second configuration file is effective, and prompts the BIOS options which are not effective, so that a test engineer can conveniently check the test result; and after the active modification mode takes effect, the second configuration file can be modified again, so that the active modification of the second configuration file is tested for many times, and the accuracy of the active modification mode is ensured.
As a possible implementation manner, the aforementioned plurality of candidate values describing the BIOS option may have a certain order, and the first current modification value is a first sequential value of the corresponding BIOS option, that is, a maximum or minimum candidate value, on this basis, the aforementioned second current modification value in the present application may be a next sequential value of the first current modification value, and after the second modification is performed on the second configuration file, the second configuration file may be modified for multiple times until the plurality of candidate values of the BIOS option are obtained. For example, the plurality of candidate values of the BIOS option a are 3, 4, and 5, respectively, and assuming that the minimum candidate value is used as the first current modification value, in this embodiment, the present solution first modifies the BIOS option a in the second configuration file based on the candidate value 3, after the first modification is completed and takes effect, modifies the BIOS option a in the second configuration file newly downloaded based on the candidate value 4 for the second time, and after the second modification is completed and takes effect, modifies the BIOS option a in the second configuration file newly downloaded again based on the candidate value 5 for the third time, thereby completing the whole modification process.
In the embodiment designed above, the scheme uses the sequence of multiple candidate values of the BIOS option to sequentially obtain each candidate value and further modify the option value of the corresponding BIOS option in the second configuration file for multiple times, so that the modification process of the BIOS option can be automatically realized according to the sequence of the candidate values, and thus, when the server leaves the factory, full-automatic detection on the server can be realized by traversing and testing all candidate values in the BIOS option.
Fig. 5 shows a schematic structural block diagram of an image continuous acquisition device provided by the present application, and it should be understood that the device corresponds to the method embodiment executed in fig. 1 to 4, and can execute the steps related to the foregoing method, and the specific functions of the device can be referred to the description above, and a detailed description is appropriately omitted here to avoid repetition. The device includes at least one software function that can be stored in memory in the form of software or firmware (firmware) or solidified in the Operating System (OS) of the device. Specifically, the apparatus includes: an obtaining module 500, configured to obtain a first configuration file and a second configuration file of BIOS options of a server, where the first configuration file includes a plurality of BIOS options and a plurality of candidate values corresponding to each BIOS option, and the second configuration file includes a plurality of BIOS options and a current option value corresponding to each BIOS option; and; acquiring each BIOS option in a first configuration file and a first current modification value corresponding to each BIOS option, wherein the first current modification value is determined in a plurality of candidate values; a searching module 510, configured to search, according to each obtained BIOS option, a corresponding BIOS option in the second configuration file; and a modifying module 520, configured to modify, by using an editor, the current option value of the BIOS option corresponding to the searched second configuration file according to the first current modified value corresponding to each BIOS option.
In the server configuration modification device designed above, the scheme first automatically acquires a first configuration file and a second configuration file of the BIOS of the server, then acquires each BIOS option in the first configuration file and a first current modification value corresponding to each BIOS option, then automatically searches for the corresponding BIOS option in the second configuration file according to each acquired BIOS option, and automatically modifies or replaces the current option value of the corresponding BIOS option in the second configuration file according to the first current modification value of each BIOS option by using an editor, so that it can be seen that the scheme of the application realizes the automatic modification of the BIOS option value in the BIOS configuration file of the server, thereby solving the problem of low efficiency caused by the manual modification of the BIOS option at present, and improving the modification efficiency and accuracy of the option value of the BIOS configuration file of the server.
In an optional implementation manner of this embodiment, the obtaining module 500 is specifically configured to store all BIOS options in the first configuration file as a first list; saving each BIOS option in the first configuration file and a plurality of corresponding option values as a second list; and traversing the first list to acquire each BIOS option in the first list, and acquiring a first current modification value from a plurality of option values of the corresponding BIOS option in the second list according to each acquired BIOS option.
In an optional implementation manner of this embodiment, the apparatus further includes a determining module 530, configured to determine whether current option values of all BIOS options in the second configuration file are modified; the uploading module 540 is configured to, after the modification is determined to be completed, upload the modified second configuration file to the substrate management controller, and restart the server; a downloading module 550, configured to re-download the second configuration file after the server is restarted; the determining module 530 is further configured to determine whether the modification of each BIOS option in the re-downloaded second configuration file is valid; and a prompting module 560, configured to prompt, when it is determined that there is a BIOS option whose modification is not in effect, a BIOS option whose modification is not in effect.
In an optional implementation manner of this embodiment, the apparatus further includes a determining module 570, configured to determine that the modification of the second configuration file is completed, in a case that it is determined that the modifications of all the BIOS options are in effect.
In an optional implementation manner of this embodiment, the obtaining module 500 is further configured to, under a condition that it is determined that all modifications of the BIOS options are valid, obtain each BIOS option in the first configuration file and a second current modification value corresponding to each BIOS option, where the second current modification value is determined in the plurality of candidate values, and the second current modification value is different from the first current modification value; the searching module 510 is further configured to search, according to each obtained BIOS option, a corresponding BIOS option in the second configuration file downloaded again; the modifying module 520 is further configured to modify, by using the editor, the current option value of the BIOS option corresponding to the found re-downloaded second configuration file according to the second current modified value corresponding to each BIOS option.
In an optional implementation manner of this embodiment, the determining module 530 is specifically configured to obtain a current option value of each BIOS option in the second configuration file downloaded again; judging whether the current option value of each BIOS option in the second configuration file downloaded again is the same as the corresponding first current modification value; if the current option value of the BIOS option in the second downloaded configuration file is the same as the corresponding first current modification value, determining that the modification of the corresponding BIOS option is effective; and if the current option value of the BIOS option in the second downloaded configuration file is different from the corresponding first current modification value, determining that the modification of the corresponding BIOS option is not effective.
In an optional implementation manner of this embodiment, the first current modified value is a first sequence value of the corresponding BIOS option, and the determining module 530 is further configured to determine whether the current option values of all BIOS options in the second configuration file are modified; the uploading module 540 is further configured to, after the modification is completed, upload the modified second configuration file to the substrate management controller, and restart the server; the downloading module 550 is further configured to re-download the second configuration file after the server is restarted; the determining module 530 is further configured to determine whether the modification of each BIOS option in the re-downloaded second configuration file is valid; the obtaining module 500 is further configured to, after determining that all the BIOS options are valid, sequentially obtain a second current modification value of each BIOS option according to an order of the plurality of candidate values of each BIOS option; the modifying module 520 is further configured to modify, by using the editor, the current option value of the BIOS option in the second configuration file corresponding to the re-download by using the second current modified value of the BIOS option obtained each time until the multiple option values of all BIOS options are obtained.
As shown in fig. 6, the present application provides an electronic device 6 including: processor 601 and memory 602, processor 601 and memory 602 being interconnected and in communication with each other via communication bus 603 and/or other form of connection mechanism (not shown), memory 602 storing a computer program executable by processor 601, which computer program is executed by processor 601 when the computing device is running to perform the method of any of the alternative implementations, such as steps S100 to S130: acquiring a first configuration file and a second configuration file of a BIOS of a server; acquiring each BIOS option in a first configuration file and a first current modification value corresponding to each BIOS option; searching a corresponding BIOS option in a second configuration file according to each obtained BIOS option; and modifying the current option value of the corresponding BIOS option in the searched second configuration file by utilizing an editor according to the first current modified value corresponding to each BIOS option.
The present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method of any of the preceding alternative implementations.
The storage medium may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.
The present application provides a computer program product which, when run on a computer, causes the computer to perform the method of any of the alternative implementations.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A server configuration modification method, comprising:
acquiring a first configuration file and a second configuration file of a BIOS (basic input/output System) of a server, wherein the first configuration file comprises a plurality of BIOS options and a plurality of candidate values corresponding to each BIOS option, and the second configuration file comprises the plurality of BIOS options and a current option value corresponding to each BIOS option;
acquiring each BIOS option in the first configuration file and a first current modification value corresponding to each BIOS option, wherein the first current modification value is determined in a plurality of candidate values;
searching a corresponding BIOS option in the second configuration file according to each obtained BIOS option; and;
and modifying the current option value of the corresponding BIOS option in the searched second configuration file by utilizing an editor according to the first current modified value corresponding to each BIOS option.
2. The method of claim 1, wherein obtaining each BIOS option and the first current modified value corresponding to each BIOS option in the first configuration file comprises:
saving all BIOS options in the first configuration file as a first list;
saving each BIOS option in the first configuration file and a plurality of corresponding candidate values as a second list; and;
and traversing the first list to acquire each BIOS option in the first list, and acquiring a first current modification value from a plurality of option values of the corresponding BIOS option in the second list according to each acquired BIOS option.
3. The method of claim 1, wherein after the modifying, by the editor, the current option value of the BIOS option corresponding to the located second configuration file according to the first current modified value corresponding to each BIOS option, the method further comprises:
judging whether the current option values of all BIOS options in the second configuration file are modified;
if so, uploading the modified second configuration file to the substrate management controller, and restarting the server;
after the server is restarted, the second configuration file is downloaded again, and whether the modification of each BIOS option in the downloaded second configuration file is effective or not is judged;
and if the BIOS option modification is not effective, prompting to modify the BIOS option which is not effective.
4. The method of claim 3, wherein after determining whether the modification of each BIOS option in the re-downloaded second configuration file is in effect, the method further comprises:
and if the modification of all the BIOS options is effective, determining that the modification of the second configuration file is completed.
5. The method of claim 3, wherein after determining whether the modification of each BIOS option in the re-downloaded second configuration file is in effect, the method further comprises:
if all the BIOS options are modified effectively, acquiring each BIOS option in the first configuration file and a second current modified value corresponding to each BIOS option, wherein the second current modified value is determined in a plurality of candidate values, and the second current modified value is different from the first current modified value;
searching a corresponding BIOS option in the re-downloaded second configuration file according to each obtained BIOS option; and;
and modifying the current option value of the corresponding BIOS option in the searched second configuration file which is downloaded again by utilizing the editor according to the second current modified value corresponding to each BIOS option.
6. The method of claim 3, wherein determining whether the modification of each BIOS option in the re-downloaded second configuration file is in effect comprises:
acquiring the current option value of each BIOS option in the second configuration file which is downloaded again; and;
judging whether the current option value of each BIOS option in the second configuration file downloaded again is the same as the corresponding first current modification value;
if the current option value of the BIOS option in the second downloaded configuration file is the same as the corresponding first current modification value, determining that the modification of the corresponding BIOS option is effective;
and if the current option value of the BIOS option in the second downloaded configuration file is different from the corresponding first current modification value, determining that the modification of the corresponding BIOS option is not effective.
7. The method of claim 1, wherein the first current modification value is a first sequential value of the corresponding BIOS option, and after the modifying, by the editor, the current option value of the corresponding BIOS option in the found second configuration file according to the first current modification value corresponding to each BIOS option, the method further comprises:
judging whether the current option values of all BIOS options in the second configuration file are modified;
if so, uploading the modified second configuration file to the substrate management controller, and restarting the server;
after the server is restarted, the second configuration file is downloaded again, and whether the modification of each BIOS option in the downloaded second configuration file is effective or not is judged;
and if all the BIOS options are effective, sequentially obtaining a second current modification value of each BIOS option according to the sequence of the plurality of candidate values of each BIOS option, and modifying the current option value of the BIOS option in the second configuration file which is correspondingly downloaded again by using the editor according to the obtained second current modification value of the BIOS option each time until the plurality of option values of all the BIOS options are obtained.
8. A server configuration modification apparatus, comprising:
the server comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a first configuration file and a second configuration file of server BIOS options, the first configuration file comprises a plurality of BIOS options and a plurality of candidate values corresponding to each BIOS option, and the second configuration file comprises the plurality of BIOS options and current option values corresponding to each BIOS option; the system comprises a first configuration file, a second configuration file and a third configuration file, wherein the first configuration file is used for acquiring each BIOS option in the first configuration file and a first current modification value corresponding to each BIOS option, and the first current modification value is determined in a plurality of candidate values;
the searching module is used for searching the corresponding BIOS option in the second configuration file according to each obtained BIOS option; and;
and the modification module is used for modifying the found current option value of the corresponding BIOS option in the second configuration file by utilizing the editor according to the first current modification value corresponding to each BIOS option.
9. An electronic device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 7.
CN202111430684.5A 2021-11-29 2021-11-29 Method and device for modifying server configuration Active CN114116033B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111430684.5A CN114116033B (en) 2021-11-29 2021-11-29 Method and device for modifying server configuration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111430684.5A CN114116033B (en) 2021-11-29 2021-11-29 Method and device for modifying server configuration

Publications (2)

Publication Number Publication Date
CN114116033A true CN114116033A (en) 2022-03-01
CN114116033B CN114116033B (en) 2024-02-23

Family

ID=80371065

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111430684.5A Active CN114116033B (en) 2021-11-29 2021-11-29 Method and device for modifying server configuration

Country Status (1)

Country Link
CN (1) CN114116033B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120239919A1 (en) * 2011-03-16 2012-09-20 Hon Hai Precision Industry Co., Ltd. Computer facilitating bios setting
WO2015176409A1 (en) * 2014-05-23 2015-11-26 中兴通讯股份有限公司 Terminal and method for managing application thereof, and storage medium
CN108446195A (en) * 2018-05-30 2018-08-24 郑州云海信息技术有限公司 A kind of server memory performance test methods and device
CN109240739A (en) * 2018-09-27 2019-01-18 郑州云海信息技术有限公司 A kind of method, apparatus and controlled terminal of rapid configuration BIOS option
CN109445865A (en) * 2018-11-09 2019-03-08 郑州云海信息技术有限公司 A kind of BIOS option remote batch setting method, device, terminal and storage medium
CN109582392A (en) * 2018-12-06 2019-04-05 浪潮电子信息产业股份有限公司 Configuration method, device, equipment and the storage medium of BIOS config option
CN112507267A (en) * 2020-12-03 2021-03-16 上海哔哩哔哩科技有限公司 User preference setting synchronization method, system, device and readable storage medium
US20210089325A1 (en) * 2019-09-24 2021-03-25 Dell Products L. P. Supervised learning based uefi pre-boot control
CN113064643A (en) * 2021-03-16 2021-07-02 山东英信计算机技术有限公司 Method, system and medium for instantly-effective modification of BIOS set value

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120239919A1 (en) * 2011-03-16 2012-09-20 Hon Hai Precision Industry Co., Ltd. Computer facilitating bios setting
WO2015176409A1 (en) * 2014-05-23 2015-11-26 中兴通讯股份有限公司 Terminal and method for managing application thereof, and storage medium
CN108446195A (en) * 2018-05-30 2018-08-24 郑州云海信息技术有限公司 A kind of server memory performance test methods and device
CN109240739A (en) * 2018-09-27 2019-01-18 郑州云海信息技术有限公司 A kind of method, apparatus and controlled terminal of rapid configuration BIOS option
CN109445865A (en) * 2018-11-09 2019-03-08 郑州云海信息技术有限公司 A kind of BIOS option remote batch setting method, device, terminal and storage medium
CN109582392A (en) * 2018-12-06 2019-04-05 浪潮电子信息产业股份有限公司 Configuration method, device, equipment and the storage medium of BIOS config option
US20210089325A1 (en) * 2019-09-24 2021-03-25 Dell Products L. P. Supervised learning based uefi pre-boot control
CN112507267A (en) * 2020-12-03 2021-03-16 上海哔哩哔哩科技有限公司 User preference setting synchronization method, system, device and readable storage medium
CN113064643A (en) * 2021-03-16 2021-07-02 山东英信计算机技术有限公司 Method, system and medium for instantly-effective modification of BIOS set value

Also Published As

Publication number Publication date
CN114116033B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
CN107844343B (en) Upgrading system and method for complex server application system
CN107766236B (en) Test task automatic management method, device, equipment and storage medium
CN110515795B (en) Big data component monitoring method and device and electronic equipment
RU2602378C1 (en) Rack with plurality of rack control modules and method of updating firmware used for rack
CN106843947B (en) Method and device for processing code defects
CN112015447B (en) System updating method and device of electronic equipment, electronic equipment and storage medium
CN110737449A (en) Method, apparatus, and machine-readable storage medium for processing device firmware
CN114116033B (en) Method and device for modifying server configuration
CN108595292B (en) System optimization method, mobile terminal and computer storage medium
US20150331772A1 (en) Methods for updating diagnostic tools on a hardware device and devices thereof
CN111949290B (en) Hot patch management method and device, electronic equipment and storage medium
CN111324373A (en) Method and device for uploading multiple project files to code warehouse and computing equipment
CN115543429A (en) Project environment building method, electronic equipment and computer readable storage medium
CN114721686A (en) Configuration data updating method and device, electronic equipment and storage medium
CN114448788A (en) Installation method, system, equipment and medium of switch system
CN110688171B (en) Plug-in configuration method, device and equipment of application program and storage medium
CN113703823A (en) BMC (baseboard management controller) firmware upgrading method and device, electronic equipment and storage medium
CN113656318A (en) Software version testing method and device and computer equipment
CN112148376A (en) Terminal starting method and device
CN112667463A (en) Application system baseline state monitoring method and device
CN105278993A (en) Linux system based drive module upgrading method and apparatus
CN110752950A (en) Update detection method and device for cloud resource pool and terminal equipment
CN116149707B (en) Method and device for detecting and avoiding upgrading risk of distributed system
CN112380188B (en) Construction method of working environment and code database, electronic equipment and storage medium
CN115372803B (en) Motherboard test system, method, device and storage medium

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
TA01 Transfer of patent application right

Effective date of registration: 20230308

Address after: 610000 846, southern section of Tianfu Avenue, Huayang street, Tianfu New District, Chengdu, Sichuan

Applicant after: ZHONGKE SUGON INFORMATION INDUSTRY CHENGDU Co.,Ltd.

Address before: 300450 floors 1-3, No. 15, Haitai Huake street, Huayuan Industrial Zone (outside the ring), Binhai high tech Zone, Binhai New Area, Tianjin

Applicant before: DAWNING INFORMATION INDUSTRY Co.,Ltd.

Applicant before: ZHONGKE SUGON INFORMATION INDUSTRY CHENGDU Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant