CN110555090A - method, system, terminal and storage medium for automatically acquiring CPUBUSNumber - Google Patents

method, system, terminal and storage medium for automatically acquiring CPUBUSNumber Download PDF

Info

Publication number
CN110555090A
CN110555090A CN201910656721.0A CN201910656721A CN110555090A CN 110555090 A CN110555090 A CN 110555090A CN 201910656721 A CN201910656721 A CN 201910656721A CN 110555090 A CN110555090 A CN 110555090A
Authority
CN
China
Prior art keywords
log
sol
cpubusnumber
configuration file
setting
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
CN201910656721.0A
Other languages
Chinese (zh)
Other versions
CN110555090B (en
Inventor
李彦华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Priority to CN201910656721.0A priority Critical patent/CN110555090B/en
Publication of CN110555090A publication Critical patent/CN110555090A/en
Application granted granted Critical
Publication of CN110555090B publication Critical patent/CN110555090B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/3332Query translation
    • G06F16/3334Selection or weighting of terms from queries, including natural language queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method, a system, a terminal and a storage medium for automatically acquiring a CPUBUSNumber, comprising the following steps: presetting a value for a server and setting a log to obtain a configuration file; calling an IPMITOOL sending command according to the configuration file to derive a sol log; and setting a CPUBUSNumber retrieval keyword, and retrieving a specific CPUBUSNumber parameter value from the sol log according to the keyword. The invention changes the conventional method of inquiring BUS Number by EDS, derives full log sol information by remote operation, and retrieves the CPU BUS Number information from the full log sol information. The problem of information reading errors caused by EDS document inquiry and reading values is solved, and the use of an lspci command is avoided, so that the OS is not needed. The invention can be used for DOS environment of the server or PC of the control terminal, and has no limitation to the SUT platform. The device is simple to operate, easy to realize, time-saving, labor-saving and cost-saving.

Description

Method, system, terminal and storage medium for automatically acquiring CPUBUSNumber
Technical Field
The invention belongs to the technical field of server testing, and particularly relates to a method, a system, a terminal and a storage medium for automatically acquiring a CPUBUSnumber.
Background
During the development and testing process, the Processor External Design Specifications corresponding to different platforms, namely EDS documents which we say at ordinary times, are often touched. Many options related to the BIOS are queried in the form of a Bus device function register. Device, Function are all directly readable in EDS document, but Bus number is different for different platforms, different cases are different, and specific values are not given in the document. It is therefore very important for a developer or tester to look up the CPU BUS Number to know the actual situation of the option.
Typically we look for the CPU BUS Number, all manually in one step, the simplest is to find the BUS (0) -BUS (3) of CPU0 under linux OS by lspci command plus B (0): device (x). The method needs to install an OS, and needs to browse EDS documents to find the values of the Device and the function and manually search after finishing inputting the command. It is rather cumbersome and especially too labor intensive for those who just want to know the CPU Bus Number. For a multi-CPU server device, the difficulty is greater.
disclosure of Invention
In view of the above-mentioned deficiencies of the prior art, the present invention provides a method, a system, a terminal and a storage medium for automatically acquiring a CPUBUSNumber, so as to solve the above-mentioned technical problems.
in a first aspect, the present invention provides a method for automatically acquiring a CPUBUSNumber, including:
presetting a value for a server and setting a log to obtain a configuration file;
calling an IPMITOOL sending command according to the configuration file to derive a sol log;
And setting a CPUBUSNumber retrieval keyword, and retrieving a specific CPUBUSNumber parameter value from the sol log according to the keyword.
Further, the presetting a server and setting a log to obtain a configuration file includes:
setting the system debug level in the setup as debug mode, reporting errors and restarting;
Inputting BMCIP, BMC USER NAME and BMC USER PASSWORD as configuration files.
Further, the calling the IPMITOOL according to the configuration file to send a command to derive the sol log includes:
positioning a target BMC according to the configuration file;
Calling IPMITOOL to send a command to access the sol log of the target BMC;
and storing the sol log to a specified path.
in a second aspect, the present invention provides a system for automatically acquiring CPUBUSNumber, including:
The system comprises a presetting unit, a processing unit and a processing unit, wherein the presetting unit is configured for presetting a server and setting a log to obtain a configuration file;
The log export unit is configured for calling an IPMITOOL sending command according to the configuration file to export the sol log;
and the log retrieval unit is configured and used for setting a CPUBUSNumber retrieval keyword and retrieving a specific CPUBUSNumber parameter value from the sol log according to the keyword.
Further, the preset unit includes:
The default value module is configured to set the system debug level in the setup to be debug mode, and to report an error and restart the device;
and the pre-configuration module is configured to input BMCIP, BMC USER NAME and BMC USER PASSWORD as configuration files.
further, the log deriving unit includes:
The target positioning module is configured for positioning a target BMC according to the configuration file;
the log access module is configured to call the IPMITOOL to send a command to access the sol log of the target BMC;
and the log storage module is configured for storing the sol log to a specified path.
In a third aspect, a terminal is provided, including:
A processor, a memory, wherein,
the memory is used for storing a computer program which,
the processor is used for calling and running the computer program from the memory so as to make the terminal execute the method of the terminal.
In a fourth aspect, a computer storage medium is provided having stored therein instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.
The beneficial effect of the invention is that,
the method, the system, the terminal and the storage medium for automatically acquiring the CPUBUSNumber send commands to derive the sol log through an IPMITOOL tool at a control end, and then retrieve the CPUBUS Number from the log in a keyword retrieval mode. The invention changes the conventional method of inquiring BUS Number by EDS, derives full log sol information by remote operation, and retrieves the CPU BUS Number information from the full log sol information. The problem of information reading errors caused by EDS document inquiry and reading values is solved, and the use of an lspci command is avoided, so that the OS is not needed. The invention can be used for DOS environment of the server or PC of the control terminal, and has no limitation to the SUT platform. The device is simple to operate, easy to realize, time-saving, labor-saving and cost-saving.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
in order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
FIG. 2 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following explains key terms appearing in the present invention.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention. Wherein, the execution subject in fig. 1 may be a system for automatically acquiring CPUBUSNumber.
as shown in fig. 1, the method 100 includes:
Step 110, presetting a value for a server and setting a log to obtain a configuration file;
Step 120, calling IPMITOOL to send a command according to the configuration file to derive a sol log;
step 130, setting a CPUBUSNumber search keyword, and searching a specific CPUBUSNumber parameter value from the sol log according to the keyword.
optionally, as an embodiment of the present invention, the presetting a server and setting a log to obtain a configuration file includes:
Setting the system debug level in the setup as debug mode, reporting errors and restarting;
inputting BMCIP, BMC USER NAME and BMC USER PASSWORD as configuration files.
Optionally, as an embodiment of the present invention, the invoking an IPMITOOL send command according to a configuration file to derive a sol log includes:
Positioning a target BMC according to the configuration file;
calling IPMITOOL to send a command to access the sol log of the target BMC;
And storing the sol log to a specified path.
In order to facilitate understanding of the present invention, the following further describes the method for automatically acquiring CPUBUSNumber provided by the present invention by using the principle of the method for automatically acquiring CPUBUSNumber of the present invention and combining the process of acquiring CPUBUSNumber in the embodiment.
specifically, the method for automatically acquiring the CPUBUSNumber includes:
And S1, presetting the server and setting a log to obtain a configuration file.
The IPMI port of the test end is ensured to be connected with a network cable, and the control end pc is also connected with the same network segment. And starting the SUT, pressing a hot key to enter setup, setting system debug level as debug mode, reporting errors and restarting. Therefore, the printed information can be guaranteed to be full log.
BMCIP, bmuser NAME, bmuser PASSWORD are stored in a configuration file, for example 100.2.2.2admin admin, respectively.
and S2, calling the IPMITOOL to send a command according to the configuration file to derive the sol log.
bat, this step is performed by a script sol, the method being performed as follows:
Reading BMCIP, BMC USER NAME and BMC USER PASSWORD in the configuration file, and then logging in the target BMC to execute the following operations.
And after the SUT finishes POST, finishing the process at the PC end according to Ctrl + C to obtain a complete log and storing the log into a sol.
S3, setting a CPUBUSNumber search keyword, and searching a specific CPUBUSNumber parameter value from the sol log according to the keyword.
Log, which is obtained in step S2, contains a lot of information, which is not easy to find. Bat, retrieve the information of the row where currentbusumbers belongs to and the five rows below it by executing the script cpubussnumber. And setting the CPUBUSNumber item as a keyword, and retrieving a specific value of the CPUBUSNumber item.
bat sol log currentbusumbers are run, sol log is the document where the content is located, currentbusumbers is the content to be searched. Bat details are as follows:
Bat file keyword has a plurality of CPUs after the CPU is run, and the number of lines printed in the script can be updated according to actual conditions. Log document, open the document at any time and can check the information of CPU BUS Number.
as shown in fig. 2, the system 200 includes:
a presetting unit 210 configured to preset a server and set a log to obtain a configuration file;
the log export unit 220 is configured to invoke an IPMITOOL sending command according to the configuration file to export the sol log;
and the log retrieval unit 230 is configured to set a CPUBUSNumber retrieval keyword, and retrieve a CPUBUSNumber specific parameter value from the sol log according to the keyword.
Optionally, as an embodiment of the present invention, the preset unit includes:
the default value module is configured to set the system debug level in the setup to be debug mode, and to report an error and restart the device;
and the pre-configuration module is configured to input BMCIP, BMC USER NAME and BMC USER PASSWORD as configuration files.
Optionally, as an embodiment of the present invention, the log deriving unit includes:
the target positioning module is configured for positioning a target BMC according to the configuration file;
The log access module is configured to call the IPMITOOL to send a command to access the sol log of the target BMC;
And the log storage module is configured for storing the sol log to a specified path.
fig. 3 is a schematic structural diagram of a terminal system 300 according to an embodiment of the present invention, where the terminal system 300 may be used to execute the method for automatically acquiring a CPUBUSNumber according to the embodiment of the present invention.
The terminal system 300 may include: a processor 310, a memory 320, and a communication unit 330. The components communicate via one or more buses, and those skilled in the art will appreciate that the architecture of the servers shown in the figures is not intended to be limiting, and may be a bus architecture, a star architecture, a combination of more or less components than those shown, or a different arrangement of components.
the memory 320 may be used for storing instructions executed by the processor 310, and the memory 320 may be implemented by any type of volatile or non-volatile storage terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The executable instructions in memory 320, when executed by processor 310, enable terminal 300 to perform some or all of the steps in the method embodiments described below.
the processor 310 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by operating or executing software programs and/or modules stored in the memory 320 and calling data stored in the memory. The processor may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same or different functions. For example, the processor 310 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
A communication unit 330, configured to establish a communication channel so that the storage terminal can communicate with other terminals. And receiving user data sent by other terminals or sending the user data to other terminals.
the present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
Therefore, the invention sends a command to derive sol log through an IPMITOOL tool at a control end, and then retrieves the CPU BUS Number from the log in a key word retrieval mode. The invention changes the conventional method of inquiring BUS Number by EDS, derives full log sol information by remote operation, and retrieves the CPU BUS Number information from the full log sol information. The problem of information reading errors caused by EDS document inquiry and reading values is solved, and the use of an lspci command is avoided, so that the OS is not needed. The invention can be used for DOS environment of the server or PC of the control terminal, and has no limitation to the SUT platform. The device of the invention has the advantages of simple operation, easy realization, time and labor saving and cost saving, and the technical effects achieved by the embodiment can be seen in the description above, which is not repeated herein.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of a software product, where the computer software product is stored in a storage medium, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like, and the storage medium can store program codes, and includes instructions for enabling a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, and the like) to perform all or part of the steps of the method in the embodiments of the present invention.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
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 mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, 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 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.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A method for automatically acquiring a CPUBUSNumber is characterized by comprising the following steps:
Presetting a value for a server and setting a log to obtain a configuration file;
Calling an IPMITOOL sending command according to the configuration file to derive a sol log;
and setting a CPUBUSNumber retrieval keyword, and retrieving a specific CPUBUSNumber parameter value from the sol log according to the keyword.
2. The method of claim 1, wherein presetting the server and setting the log acquisition configuration file comprises:
Setting the system debug level in the setup as debug mode, reporting errors and restarting;
inputting BMCIP, BMC USER NAME and BMC USER PASSWORD as configuration files.
3. The method of claim 1, wherein invoking IPMITOOL send command according to a configuration file to derive sol log comprises:
positioning a target BMC according to the configuration file;
calling IPMITOOL to send a command to access the sol log of the target BMC;
And storing the sol log to a specified path.
4. A system for automatically acquiring a CPUBUSNumber, comprising:
The system comprises a presetting unit, a processing unit and a processing unit, wherein the presetting unit is configured for presetting a server and setting a log to obtain a configuration file;
The log export unit is configured for calling an IPMITOOL sending command according to the configuration file to export the sol log;
and the log retrieval unit is configured and used for setting a CPUBUSNumber retrieval keyword and retrieving a specific CPUBUSNumber parameter value from the sol log according to the keyword.
5. the system according to claim 4, wherein the presetting unit comprises:
the default value module is configured to set the system debug level in the setup to be debug mode, and to report an error and restart the device;
and the pre-configuration module is configured to input BMCIP, BMC USER NAME and BMC USER PASSWORD as configuration files.
6. The system of claim 4, wherein the log derivation unit comprises:
the target positioning module is configured for positioning a target BMC according to the configuration file;
The log access module is configured to call the IPMITOOL to send a command to access the sol log of the target BMC;
And the log storage module is configured for storing the sol log to a specified path.
7. A terminal, comprising:
a processor;
a memory for storing instructions for execution by the processor;
wherein the processor is configured to perform the method of any one of claims 1-3.
8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-3.
CN201910656721.0A 2019-07-19 2019-07-19 Method, system, terminal and storage medium for automatically acquiring CPU BUS Number Active CN110555090B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910656721.0A CN110555090B (en) 2019-07-19 2019-07-19 Method, system, terminal and storage medium for automatically acquiring CPU BUS Number

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910656721.0A CN110555090B (en) 2019-07-19 2019-07-19 Method, system, terminal and storage medium for automatically acquiring CPU BUS Number

Publications (2)

Publication Number Publication Date
CN110555090A true CN110555090A (en) 2019-12-10
CN110555090B CN110555090B (en) 2022-10-18

Family

ID=68735668

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910656721.0A Active CN110555090B (en) 2019-07-19 2019-07-19 Method, system, terminal and storage medium for automatically acquiring CPU BUS Number

Country Status (1)

Country Link
CN (1) CN110555090B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110320860A1 (en) * 2010-06-23 2011-12-29 International Business Machines Corporation Managing processing associated with hardware events
CN109901980A (en) * 2019-01-30 2019-06-18 努比亚技术有限公司 Serial ports log grabs circuit, method, terminal and computer readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110320860A1 (en) * 2010-06-23 2011-12-29 International Business Machines Corporation Managing processing associated with hardware events
CN109901980A (en) * 2019-01-30 2019-06-18 努比亚技术有限公司 Serial ports log grabs circuit, method, terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN110555090B (en) 2022-10-18

Similar Documents

Publication Publication Date Title
CN110554938B (en) BIOS (basic input output System) testing method, system, terminal and storage medium based on script set
CN110557299A (en) network transmission function batch test method, system, terminal and storage medium
CN109788052B (en) Server configuration remote query method, device, terminal and storage medium
CN103257922B (en) A kind of method of quick test BIOS and OS interface code reliability
CN110515795B (en) Big data component monitoring method and device and electronic equipment
CN115827111A (en) Method and device for adjusting server startup items, storage medium and electronic device
CN109918221B (en) Hard disk error reporting analysis method, system, terminal and storage medium
CN111966551A (en) Method, system, terminal and storage medium for verifying remote command execution result
CN109067605B (en) Storage subsystem fault diagnosis method and device, terminal and storage medium
CN110688305A (en) Test environment synchronization method, device, medium and electronic equipment
CN112699027A (en) Interface testing method, device, equipment and readable storage medium
CN110555090B (en) Method, system, terminal and storage medium for automatically acquiring CPU BUS Number
CN111258664A (en) Method, system, terminal and storage medium for completely acquiring memory serial number
CN110543394A (en) server sensor information consistency testing method, system, terminal and storage medium
CN114817010A (en) Python-based Redfish automatic testing method and device
CN112463504B (en) Double-control storage product testing method, system, terminal and storage medium
CN115202946A (en) Automated testing method, apparatus, device, storage medium, and program product
CN109920466B (en) Hard disk test data analysis method, device, terminal and storage medium
CN114253573A (en) PCIe device firmware batch upgrading method, system, terminal and storage medium
CN110543459A (en) Method, system, terminal and storage medium for acquiring file lock state under NFS
CN110865932A (en) Program internal interface testing method, system, terminal and storage medium
CN111966286A (en) Multi-data pool hierarchical migration method and system
CN111858198A (en) Multi-scheme memory plugging test method, system, terminal and storage medium
CN111143193A (en) Big data service testing method, system, terminal and storage medium based on RobotFramework
CN109508270B (en) BIOS register checking and testing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant