CN115408408A - Device and method for updating mac guide in batch, storage medium and processor - Google Patents
Device and method for updating mac guide in batch, storage medium and processor Download PDFInfo
- Publication number
- CN115408408A CN115408408A CN202211049578.7A CN202211049578A CN115408408A CN 115408408 A CN115408408 A CN 115408408A CN 202211049578 A CN202211049578 A CN 202211049578A CN 115408408 A CN115408408 A CN 115408408A
- Authority
- CN
- China
- Prior art keywords
- mac
- machine
- test
- database table
- test machine
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000012360 testing method Methods 0.000 claims abstract description 219
- 238000009533 lab test Methods 0.000 claims description 16
- 238000012545 processing Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2379—Updates performed during online database operations; commit processing
- G06F16/2386—Bulk updating operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention belongs to the technical field of system guidance, and particularly relates to a device, a method, a storage medium and a processor for batch update of mac guidance, wherein the device comprises an information recording module for recording test data of a test machine and setting a test type according to the model of the test machine; the information automatic updating module is used for comparing whether the machine serial number PN is the same as the current test machine serial number PN, if so, reading the mac address, the IP address, the current system and the package model of the test machine, and then recording the mac address, the IP address, the current system and the package model into a corresponding row of the database table; if the PN values in the database table are not the same after the polling reading is finished, exiting; and the mac boot updates the module in batches according to the machine type, establishes a mac boot template, and updates the mac boot under the server/tftpboot and/tftpboot/pxelinux.
Description
Technical Field
The invention belongs to the technical field of system guidance, and particularly relates to a device and a method for updating mac guidance in batches, a storage medium and a processor.
Background
Servers often use diskless systems during the laboratory testing phase, and because different tests require different systems to be used, mac booting of each machine needs to be configured before the test is performed.
Under the condition that a plurality of test machines exist, a tester needs to manually arrange and record the mac values of all the machines, and then the mac guide of all the machines is configured one by one before testing, so that the time consumption is long, the testing efficiency is low, and mistakes are easily made. This is a disadvantage of the prior art.
In view of the above, it is desirable to provide an apparatus, a method, a storage medium, and a processor for updating mac boot in batch to solve the above technical drawbacks in the prior art.
Disclosure of Invention
The present invention is directed to a device, a method, a storage medium, and a processor for batch update of mac boot, so as to solve the above technical problems.
In order to achieve the purpose, the invention provides the following technical scheme:
in a first aspect, the present invention provides an apparatus for batch updating mac guidance, including:
the information recording module is used for recording the test data of the test machine and setting the test type according to the model of the test machine;
the information automatic updating module is used for comparing whether the machine serial number PN is the same as the current testing machine serial number PN, if so, reading the mac address, the IP address, the current system and the package model of the testing machine, and then recording the mac address, the IP address, the current system and the package model into a corresponding row of the database table; if the PN values in the database table are not the same after the polling reading is finished, exiting;
and the mac boot updates the module in batches according to the machine type, establishes a mac boot template, and updates the server/tftpboot and/tftpboot/pxelinux.cfg of the mac boot directory through a second tool.
Preferably, in the information recording module, a database table is established according to the condition of the laboratory test machine, and the serial number PN, the package model, the mac address, the IP address, the current system and the test machine type of the laboratory test machine are recorded;
secondly, inputting the serial number PN of the test machine into a database table;
thirdly, different types of the testing machine are marked with different numbers, such as 1,2,3, 8230, according to the type of the testing machine and the type of the testing machine set in a package.
Preferably, in the information automatic updating module,
firstly, storing a first tool for updating data in a PXE central server fixed position, configuring a starting self-starting program with a path of/etc/rc.local or/bash _ profile, and starting to automatically call the first tool;
secondly, acquiring a serial number PN of a testing machine by calling a first tool, reading a central server database table, comparing whether the serial number PN of the testing machine is the same as the serial number PN of the current testing machine one by one, if so, reading a mac address, an IP address, a current system and a package model of the testing machine, and then recording the serial numbers PN of the testing machine and the current system and the package model into corresponding rows of the database table; if the PN values in the database table are not the same after the polling reading is finished, exiting;
thirdly, recording the PN value of the machine which is expected to be included in the management into the database table, automatically running the first tool after the test machine is started each time, and updating the current information of the test machine into the database table, so that the test machine is convenient to query and use; and for other machines not of interest, no database table is recorded.
Preferably, in the mac-guided batch updating module according to the machine type, a mac-guided template is respectively established according to a system os and a kernel which are needed to be used in the test, wherein the template comprises a UEFI mode and a Legency mode; such as named mac _ template _ redhat79.Txt, mac _ template _ redhat83.Txt, mac _ template _ default. Txt, etc.;
secondly, inputting parameters through a second tool, wherein the parameters comprise the type of the test machine and the name of a mac guide template file; reading data in a database table according to the input parameter test machine type, acquiring a required mac value of a test machine type machine, and then updating mac guidance of a server/tftpboot and/tftpboot/pxelinux.cfg directory;
and thirdly, before each test task is executed, executing mac guidance of the test machine of the corresponding machine type by the second tool according to the test task, and accurately, quickly and accurately updating.
In a second aspect, the present invention further provides a method for updating mac guidance in batch, including the following steps:
step S1: recording information, wherein the step records the test data of the test machine and sets the test type according to the model of the test machine;
step S2: the step of automatic updating of information, which is to compare whether the machine serial number PN is the same as the current test machine serial number PN, if so, the mac address, the IP address, the current system and the package model of the test machine are read, and then the information is recorded into the corresponding row of the database table; if the PN values in the database table are not the same after the polling reading is finished, exiting;
step S2: and a step of batch update by machine type of mac boot, which is to establish a mac boot template and update the mac boot under the server/tftpboost and/tftpboost/pxelinux.
Preferably, in step S1, a database table is first established according to the condition of the laboratory test machine, and a serial number PN, a package model, a mac address, an IP address, a current system, and a test machine type of the laboratory test machine are recorded;
secondly, inputting the serial number PN of the test machine into a database table;
thirdly, different types of the testing machines are respectively marked with different numbers, such as 1,2,3, 8230, according to the types of the testing machines and the types of the testing machines set in a package.
Preferably, in the step S2,
firstly, storing a first tool for updating data in a fixed position of a PXE central server, configuring a starting self-starting program with a path of/etc/rc.local or/bash _ profile, and automatically calling the first tool when starting;
secondly, acquiring a serial number PN of a testing machine by calling a first tool, reading a central server database table, comparing whether the serial number PN of the testing machine is the same as the serial number PN of the current testing machine one by one, if so, reading a mac address, an IP address, a current system and a package model of the testing machine, and then recording the serial numbers PN of the testing machine and the current system and the package model into corresponding rows of the database table; if the PN values in the database table are not the same after the polling reading is finished, exiting;
thirdly, recording the machine PN value which is expected to be included in the management into a database table, automatically running the first tool after the test machine is started each time, and updating the current information of the test machine into the database table, so that the query and the use are facilitated; and no database table is recorded for other non-concerned machines.
Preferably, in the step S3, a mac-boot template is respectively established according to the system os and kernel required for testing, wherein the template includes two modes of UEFI and legend; such as named mac _ template _ redhat79.Txt, mac _ template _ redhat83.Txt, mac _ template _ default. Txt, etc.;
secondly, parameters are input through a second tool, and the parameters comprise the type of the test machine and the name of a mac guide template file; reading data in a database table according to the input parameter test machine type, acquiring a required mac value of a test machine type machine, and then updating mac guidance of a server/tftpboot and/tftpboot/pxelinux.cfg directory;
and thirdly, before each test task is executed, executing the mac guide of the test machine of the corresponding machine type by the second tool according to the test task accurately, quickly and accurately.
In a third aspect, the present invention also provides a computer storage medium having stored therein instructions that, when run on a computer, cause the computer to perform the method of the second aspect described above.
In a fourth aspect, the present invention further provides a processor, where a processing program runs in the processor, and when the processing program runs in the processor, the processor is caused to execute the method according to the second aspect.
The method has the advantages that through the two tools provided by the text, information such as the mac address of the machine can be automatically maintained when the test machine is started, and when the mac guide needs to be updated, the mac guide of a specific machine type can be accurately and quickly updated according to the machine type marked in advance. Can be to test machine mac information classification save, maintain the mac guide according to the type is accurate, it is high-efficient accurate, avoided the mistake that manual maintenance brought
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic block diagram of an apparatus for batch updating mac guidance according to the present invention.
Fig. 2 is a flowchart of a method for updating mac boot in batch according to the present invention.
The system comprises an information recording module, an information automatic updating module and a 3-mac guiding batch updating module according to machine types, wherein the 1-information recording module, the 2-information automatic updating module and the 3-mac guiding batch updating module are arranged in the system.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings by way of specific examples, which are illustrative of the present invention and are not limited to the following embodiments.
Example 1:
as shown in fig. 1, the apparatus for batch update of mac guidance according to this embodiment includes:
the information recording module 1 is used for recording the test data of the test machine and setting the test type according to the model of the test machine; in the information recording module 1, a database table is established according to the condition of the laboratory test machine, and the serial number PN, the package model, the mac address, the IP address, the current system and the type of the test machine of the laboratory test machine are recorded;
secondly, inputting the serial number PN of the testing machine into a database table;
thirdly, different types of the testing machine are marked with different numbers, such as 1,2,3, 8230, according to the type of the testing machine and the type of the testing machine set in a package.
The information automatic updating module 2 is used for comparing whether the machine serial number PN is the same as the current test machine serial number PN, if so, reading the mac address, the IP address, the current system and the package model of the test machine, and then recording the mac address, the IP address, the current system and the package model into a corresponding row of a database table; if the PN values in the database table are not the same after the polling reading is finished, exiting; in the automatic information updating module 2, the information is updated,
firstly, storing a first tool for updating data in a PXE central server fixed position, configuring a starting self-starting program with a path of/etc/rc.local or/bash _ profile, and starting to automatically call the first tool;
secondly, acquiring a serial number PN of a testing machine by calling a first tool, reading a central server database table, comparing whether the serial number PN of the testing machine is the same as the serial number PN of the current testing machine one by one, if so, reading a mac address, an IP address, a current system and a package model of the testing machine, and then recording the serial numbers PN of the testing machine and the current system and the package model into corresponding rows of the database table; if the PN values in the database table are not the same after the polling reading is finished, exiting;
thirdly, recording the machine PN value which is expected to be included in the management into a database table, automatically running the first tool after the test machine is started each time, and updating the current information of the test machine into the database table, so that the query and the use are facilitated; and no database table is recorded for other non-concerned machines.
And the mac boot updates the module 3 in batches according to the machine type, establishes a mac boot template, and updates the mac boot under the server/tftpboot and/tftpboot/pxelinux. In the module 3, the mac guide is updated in batches according to the machine type, firstly, a mac guide template is respectively established according to the system os and kernel required by the test, and the template comprises two modes of UEFI and Legency; such as named mac _ template _ redhat79.Txt, mac _ template _ redhat83.Txt, mac _ template _ default. Txt, etc.;
secondly, inputting parameters through a second tool, wherein the parameters comprise the type of the test machine and the name of a mac guide template file; reading data in a database table according to the type of the input parameter testing machine, acquiring a mac value of a required testing machine type machine, and then updating a server/tftpboost and/tftpboost/pxelinux.cfg of mac guidance under a directory;
and thirdly, before each test task is executed, executing the mac guide of the test machine of the corresponding machine type by the second tool according to the test task accurately, quickly and accurately.
Example 2:
as shown in fig. 2, the method for updating mac guidance in batch according to this embodiment includes the following steps:
step S1: recording information, wherein the step records the test data of the test machine and sets the test type according to the model of the test machine; in the step S1, firstly, a database table is established according to the condition of a laboratory test machine, and the serial number PN, the package model, the mac address, the IP address, the current system and the test machine type of the laboratory test machine are recorded;
secondly, inputting the serial number PN of the testing machine into a database table;
thirdly, different types of the testing machine are marked with different numbers, such as 1,2,3, 8230, according to the type of the testing machine and the type of the testing machine set in a package.
Step S2: the step of automatic updating of information, which is to compare whether the machine serial number PN is the same as the current test machine serial number PN, if so, the mac address, the IP address, the current system and the package model of the test machine are read, and then the information is recorded into the corresponding row of the database table; if the PN values in the database table are not the same after the polling reading is finished, exiting; in the step S2, the first step is performed,
firstly, storing a first tool for updating data in a fixed position of a PXE central server, configuring a starting self-starting program with a path of/etc/rc.local or/bash _ profile, and automatically calling the first tool when starting;
secondly, acquiring a serial number PN of a test machine by calling a first tool, reading a database table of a central server, comparing whether the serial number PN of the test machine is the same as the serial number PN of the current test machine one by one, if so, reading a mac address, an IP address, a current system and a package model of the test machine, and then recording the serial numbers PN of the test machine and the current system and the package model of the test machine into corresponding rows of the database table; if the PN values in the database table are not the same after the polling reading is finished, exiting;
thirdly, recording the PN value of the machine which is expected to be included in the management into the database table, automatically running the first tool after the test machine is started each time, and updating the current information of the test machine into the database table, so that the test machine is convenient to query and use; and for other machines not of interest, no database table is recorded.
And step S3: the method comprises the steps of updating mac boot in batches according to machine types, establishing a mac boot template, and updating the mac boot under a server/tftpboot and/tftpboot/pxelinux.cfg directory through a second tool;
in the step S3, firstly, a mac guide template is respectively established according to the system os and kernel required by the test, wherein the template comprises a UEFI mode and a Legency mode; such as named mac _ template _ redhat79.Txt, mac _ template _ redhat83.Txt, mac _ template _ default. Txt, etc.;
secondly, inputting parameters through a second tool, wherein the parameters comprise the type of the test machine and the name of a mac guide template file; reading data in a database table according to the input parameter test machine type, acquiring a required mac value of a test machine type machine, and then updating mac guidance of a server/tftpboot and/tftpboot/pxelinux.cfg directory;
and thirdly, before each test task is executed, executing the mac guide of the test machine of the corresponding machine type by the second tool according to the test task accurately, quickly and accurately.
Example 3:
the present embodiment provides a computer storage medium, which stores instructions that, when executed on a computer, cause the computer to perform the method of embodiment 2 above; namely: a method of batch update mac boot, comprising the steps of:
step S1: recording information, namely recording test data of a test machine and setting a test type according to the model of the test machine; in the step S1, firstly, a database table is established according to the condition of the laboratory test machine, and the serial number PN, the package type, the mac address, the IP address, the current system and the test machine type of the laboratory test machine are recorded;
secondly, inputting the serial number PN of the testing machine into a database table;
thirdly, different types of the testing machine are marked with different numbers, such as 1,2,3, 8230, according to the type of the testing machine and the type of the testing machine set in a package.
Step S2: the step of automatic updating of information, which is to compare whether the serial number PN of the machine is the same as the serial number PN of the current testing machine, if so, read the mac address, IP address, current system and package model of the testing machine, and then record the mac address, IP address, current system and package model into the corresponding row of the database table; if the PN values in the database table are not the same after the polling reading is finished, exiting; in the step S2, the first step is performed,
firstly, storing a first tool for updating data in a fixed position of a PXE central server, configuring a starting self-starting program with a path of/etc/rc.local or/bash _ profile, and automatically calling the first tool when starting;
secondly, acquiring a serial number PN of a test machine by calling a first tool, reading a database table of a central server, comparing whether the serial number PN of the test machine is the same as the serial number PN of the current test machine one by one, if so, reading a mac address, an IP address, a current system and a package model of the test machine, and then recording the serial numbers PN of the test machine and the current system and the package model of the test machine into corresponding rows of the database table; if the PN values in the database table are not the same after the polling reading is finished, exiting;
thirdly, recording the machine PN value which is expected to be included in the management into a database table, automatically running the first tool after the test machine is started each time, and updating the current information of the test machine into the database table, so that the query and the use are facilitated; and no database table is recorded for other non-concerned machines.
And step S3: the method comprises the steps of updating mac boot in batches according to machine types, establishing a mac boot template, and updating the mac boot under a server/tftpboot and/tftpboot/pxelinux.cfg directory through a second tool;
in the step S3, firstly, a mac guide template is respectively established according to the system os and kernel required by the test, wherein the template comprises a UEFI mode and a Legency mode; such as named mac _ template _ redhat79.Txt, mac _ template _ redhat83.Txt, mac _ template _ default. Txt, etc.;
secondly, inputting parameters through a second tool, wherein the parameters comprise the type of the test machine and the name of a mac guide template file; reading data in a database table according to the type of the input parameter testing machine, acquiring a mac value of a required testing machine type machine, and then updating a server/tftpboost and/tftpboost/pxelinux.cfg of mac guidance under a directory;
and thirdly, before each test task is executed, executing mac guidance of the test machine of the corresponding machine type by the second tool according to the test task, and accurately, quickly and accurately updating.
Example 4:
the present embodiment also provides a processor, where a processing program runs in the processor, and when the processing program runs in the processor, the processor is caused to execute the method described in embodiment 2 above. Namely: a method of batch update mac boot, comprising the steps of:
step S1: recording information, wherein the step records the test data of the test machine and sets the test type according to the model of the test machine; in the step S1, firstly, a database table is established according to the condition of the laboratory test machine, and the serial number PN, the package type, the mac address, the IP address, the current system and the test machine type of the laboratory test machine are recorded;
secondly, inputting the serial number PN of the testing machine into a database table;
thirdly, different types of the testing machine are marked with different numbers, such as 1,2,3, 8230, according to the type of the testing machine and the type of the testing machine set in a package.
Step S2: the step of automatic updating of information, which is to compare whether the serial number PN of the machine is the same as the serial number PN of the current testing machine, if so, read the mac address, IP address, current system and package model of the testing machine, and then record the mac address, IP address, current system and package model into the corresponding row of the database table; if the PN values in the database table are not the same after the polling reading is finished, exiting; in the step S2, the first step is performed,
firstly, storing a first tool for updating data in a fixed position of a PXE central server, configuring a starting self-starting program with a path of/etc/rc.local or/bash _ profile, and automatically calling the first tool when starting;
secondly, acquiring a serial number PN of a test machine by calling a first tool, reading a database table of a central server, comparing whether the serial number PN of the test machine is the same as the serial number PN of the current test machine one by one, if so, reading a mac address, an IP address, a current system and a package model of the test machine, and then recording the serial numbers PN of the test machine and the current system and the package model of the test machine into corresponding rows of the database table; if the PN values in the database table are not the same after the polling reading is finished, exiting;
thirdly, recording the PN value of the machine which is expected to be included in the management into the database table, automatically running the first tool after the test machine is started each time, and updating the current information of the test machine into the database table, so that the test machine is convenient to query and use; and for other machines not of interest, no database table is recorded.
And step S3: the method comprises the steps of conducting batch updating on mac guide according to machine types, establishing a mac guide template, and updating the mac guide under a server/tftpboost and/tftpboost/pxelinux.cfg directory through a second tool;
in the step S3, firstly, respectively establishing a mac guide template according to a system os and a kernel which are required to be used in the test, wherein the template comprises a UEFI mode and a Legency mode; such as named mac _ template _ redhat79.Txt, mac _ template _ redhat83.Txt, mac _ template _ default. Txt, etc.;
secondly, parameters are input through a second tool, and the parameters comprise the type of the test machine and the name of a mac guide template file; reading data in a database table according to the type of the input parameter testing machine, acquiring a mac value of a required testing machine type machine, and then updating a server/tftpboost and/tftpboost/pxelinux.cfg of mac guidance under a directory;
and thirdly, before each test task is executed, executing mac guidance of the test machine of the corresponding machine type by the second tool according to the test task, and accurately, quickly and accurately updating.
In the present specification, the embodiments are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same or similar parts between the embodiments are referred to each other. The method disclosed by the embodiment corresponds to the system disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided by the present invention, it should be understood that the disclosed system, system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some interfaces, indirect coupling or communication connection of systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit.
Similarly, each processing unit in the embodiments of the present invention may be integrated into one functional module, or each processing unit may exist physically, or two or more processing units are integrated into one functional module.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, in this document, relational terms such as first and second, and the like are 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The above disclosure is only for the preferred embodiments of the present invention, but the present invention is not limited thereto, and any non-inventive changes that can be made by those skilled in the art and several modifications and amendments made without departing from the principle of the present invention shall fall within the protection scope of the present invention.
Claims (10)
1. An apparatus for batch updating mac guidance, comprising:
the information recording module is used for recording the test data of the test machine and setting the test type according to the model of the test machine;
the information automatic updating module is used for comparing whether the machine serial number PN is the same as the current test machine serial number PN, if so, reading the mac address, the IP address, the current system and the package model of the test machine, and then recording the mac address, the IP address, the current system and the package model into a corresponding row of the database table; if the PN values in the database table are not the same after the polling reading is finished, exiting;
and the mac boot updates the module in batches according to the machine type, establishes a mac boot template, and updates the server/tftpboot and/tftpboot/pxelinux.cfg of the mac boot directory through a second tool.
2. The apparatus of claim 1, wherein the information recording module first creates a database table according to the condition of the laboratory test machines, records serial numbers PN, package types, mac addresses, IP addresses, current systems, and test machine types of the laboratory test machines;
secondly, inputting the serial number PN of the testing machine into a database table;
thirdly, setting the type of the testing machine according to the type of the testing machine and the package, and respectively marking different numbers on different types.
3. The apparatus for batch update of mac guidance of claim 2, wherein the automatic information update module,
firstly, storing a first tool for updating data in a fixed position of a PXE central server, configuring a starting self-starting program with a path of/etc/rc.local or/bash _ profile, and automatically calling the first tool when starting;
secondly, acquiring a serial number PN of a testing machine by calling a first tool, reading a central server database table, comparing whether the serial number PN of the testing machine is the same as the serial number PN of the current testing machine one by one, if so, reading a mac address, an IP address, a current system and a package model of the testing machine, and then recording the serial numbers PN of the testing machine and the current system and the package model into corresponding rows of the database table; if the PN values in the database table are not the same after the polling reading is finished, exiting;
thirdly, recording the machine PN value which is expected to be included in the management into a database table, automatically running the first tool after the test machine is started each time, and updating the current information of the test machine into the database table, so that the query and the use are facilitated; and for other machines not of interest, no database table is recorded.
4. The apparatus of claim 3, wherein in the mac boot batch update module according to machine type, a mac boot template is first established according to a system os and a kernel required for testing, the template including two modes of UEFI and Legency;
secondly, parameters are input through a second tool, and the parameters comprise the type of the test machine and the name of a mac guide template file; reading data in a database table according to the type of the input parameter testing machine, acquiring a mac value of a required testing machine type machine, and then updating a server/tftpboost and/tftpboost/pxelinux.cfg of mac guidance under a directory;
and thirdly, before each test task is executed, executing the mac guide of the test machine of the corresponding machine type by the second tool according to the test task accurately, quickly and accurately.
5. A method for batch updating mac guidance, comprising the steps of:
step S1: recording information, namely recording test data of a test machine and setting a test type according to the model of the test machine;
step S2: the step of automatic updating of information, which is to compare whether the machine serial number PN is the same as the current test machine serial number PN, if so, the mac address, the IP address, the current system and the package model of the test machine are read, and then the information is recorded into the corresponding row of the database table; if the PN values in the database table are not the same after the polling reading is finished, exiting;
step S2: and a step of batch updating the mac boot by machine type, wherein the step of batch updating the mac boot template establishes a mac boot template, and updates the mac boot under the server/tftpboot and/tftpboot/pxelinux.
6. The method for batch update of mac boot as claimed in claim 5, wherein in step S1, a database table is first established according to the condition of the laboratory test machine, and the serial number PN, package model, mac address, IP address, current system, and test machine type of the laboratory test machine are recorded;
secondly, inputting the serial number PN of the test machine into a database table;
thirdly, setting the type of the testing machine according to the type of the testing machine and the package, and respectively marking different numbers on different types.
7. The method for batch update of mac boot as claimed in claim 6, wherein in step S2,
firstly, storing a first tool for updating data in a fixed position of a PXE central server, configuring a starting self-starting program with a path of/etc/rc.local or/bash _ profile, and automatically calling the first tool when starting;
secondly, acquiring a serial number PN of a test machine by calling a first tool, reading a database table of a central server, comparing whether the serial number PN of the test machine is the same as the serial number PN of the current test machine one by one, if so, reading a mac address, an IP address, a current system and a package model of the test machine, and then recording the serial numbers PN of the test machine and the current system and the package model of the test machine into corresponding rows of the database table; if the PN values in the database table are not the same after the polling reading is finished, exiting;
thirdly, recording the machine PN value which is expected to be included in the management into a database table, automatically running the first tool after the test machine is started each time, and updating the current information of the test machine into the database table, so that the query and the use are facilitated; and no database table is recorded for other non-concerned machines.
8. The method according to claim 7, wherein in step S3, a mac boot template is first established according to the system os and kernel required for testing, the mac boot template including UEFI and legend modes;
secondly, parameters are input through a second tool, and the parameters comprise the type of the test machine and the name of a mac guide template file; reading data in a database table according to the type of the input parameter testing machine, acquiring a mac value of a required testing machine type machine, and then updating a server/tftpboost and/tftpboost/pxelinux.cfg of mac guidance under a directory;
and thirdly, before each test task is executed, executing mac guidance of the test machine of the corresponding machine type by the second tool according to the test task, and accurately, quickly and accurately updating.
9. A computer storage medium having stored therein instructions which, when run on a computer, cause the computer to perform the method of any one of claims 5-8.
10. A processor, wherein a handler runs in the processor, and when the handler runs in the processor, the handler causes the processor to perform the method of any one of claims 5 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211049578.7A CN115408408A (en) | 2022-08-30 | 2022-08-30 | Device and method for updating mac guide in batch, storage medium and processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211049578.7A CN115408408A (en) | 2022-08-30 | 2022-08-30 | Device and method for updating mac guide in batch, storage medium and processor |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115408408A true CN115408408A (en) | 2022-11-29 |
Family
ID=84163992
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211049578.7A Pending CN115408408A (en) | 2022-08-30 | 2022-08-30 | Device and method for updating mac guide in batch, storage medium and processor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115408408A (en) |
-
2022
- 2022-08-30 CN CN202211049578.7A patent/CN115408408A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110058998B (en) | Software testing method and device | |
CN114077525A (en) | Abnormal log processing method and device, terminal equipment, cloud server and system | |
US20040044693A1 (en) | Automated logging of system configurations | |
CN109408355B (en) | Test case obtaining method and device | |
CN112269697B (en) | Equipment storage performance testing method, system and related device | |
CN111143150A (en) | Method and system for testing PCBA (printed circuit board assembly), testing equipment and micro-control unit | |
CN107257303A (en) | A kind of method for carrying out automatic detection to network interface card in server system restarting process | |
CN115061885A (en) | Complete machine aging automatic test method and device, electronic equipment and storage medium | |
CN115827111A (en) | Method and device for adjusting server startup items, storage medium and electronic device | |
CN114860271A (en) | PXE starting method, system and device and readable storage medium | |
CN115408408A (en) | Device and method for updating mac guide in batch, storage medium and processor | |
CN113238901B (en) | Multi-device automatic testing method and device, storage medium and computer device | |
CN110503504B (en) | Information identification method, device and equipment of network product | |
CN111813617B (en) | Method and device for testing and scheduling functions of main board device | |
CN111428117A (en) | Data acquisition method and device for application program | |
CN114448788A (en) | Installation method, system, equipment and medium of switch system | |
CN110704301B (en) | TPC-E automatic test method and TPC-E test system | |
Cisco | Using the Y2K Compliance Assessment Tool Applications | |
CN113204485A (en) | Memory database pressure testing method, system, terminal and storage medium | |
CN113220353A (en) | Hard disk startup item ordering method, system, terminal and storage medium | |
CN112231218B (en) | Method, system, terminal and storage medium for automatically updating test diagnosis script | |
CN112214414A (en) | Coverage rate processing method, device, equipment and medium based on automatic test | |
CN112363944A (en) | Method and equipment for comparing return values of multiple environment interfaces | |
CN112256500A (en) | Storage system test server configuration method, system, terminal and storage medium | |
CN111858308A (en) | Method, system, terminal and storage medium for acquiring test data of diskless system |
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 |