In the prior art, for the reading of server power supply information, there are mainly three types of schemes at present:
The first is before power supply is used in server, i.e., power supply is installed on server master board not yet, such case
It is lower to need dedicated jig pinboard and cd-rom recorder that power supply is connected with PC, power information is carried out by matched reading software
It reads.When using this scheme, more external equipment and cumbersome connection are needed, needs manual amendment and note in test process
Record, the degree of automation are low.
Second is carried out under server system, is needed to be switched at this time into DOS environment, at order line operation batch
Reason order needs mainboard configuration power supply, memory and CPU in this case;
The third is that server master board is needed to pass through BMC (Baseboard Management Controller, substrate pipe
Manage controller) dedicated network interface with a cable and a PC interconnection, enters DOS environment calls Intelligent Platform Management Interface by PC
IPMI tool sends processing batch instruction to carry out the reading of power information.
By second or the third scheme operation errorlevel to read information when, can as follows into
Row:
1) assume that two power supply titles are PSU1 and PSU2, corresponding BMC distribution address is followed successively by: 0xb0,0xb2;
2) enter DOS environment in Linux system (or in Widows system), by IPMI facility instruction by PSU1's
MFR_PAGE value is revised as FFh, reads the attribute information of the power supply using relevant IPMI facility instruction and current state is believed
Breath, what is read returns to the ASCLL or other forms that Value Data is hexadecimal format;
3) the MFR_PAGE value of PSU1 is respectively modified as by 00h, 01h, 02h, 03h, 04h by IPMI facility instruction, made
The process of the power supply black box historical record, data conversion and record is read with relevant 17 IPMI facility instructions;
4) the MFR_PAGE value of first power ps U1 is restored to FFh, and second power supply PSU2 is executed identical
Aforesaid operations.
From this, above-mentioned second requires to enter DOS environment with the third scheme, and user is needed to be manually entered life
Enable row carry out the reading of power information, there are the shortcomings that: first is that instruction is partially long, easy error is manually entered;Second is that due to IPMI
The characteristic of tool, an instruction can only obtain a return Value Data, and human interpretation is needed to return to Value Data, in server
In the case that power information is numerous, a rule instruction input, to manually bringing repetitive operation, waste of manpower, reading efficiency is low
Under.
For above-mentioned in the prior art the problems of in reading service device power information, how to replace artificial defeated
Enter, realize automation reading service device power information, reduce manpower, improve working efficiency, promotes user experience, current existing skill
There are no relevant solutions in art.
Summary of the invention
The main purpose of the application is to propose a kind of server power supply information processing method, be able to solve in the prior art
The problems of in reading service device power information, automation reading service device power information is realized, manpower is reduced,
It improves work efficiency, the user experience is improved.
To achieve the above object, the embodiment of the present application provides a kind of server power supply information processing method, comprising:
After receiving the key command that user is read out server power supply information, first identifier and the are obtained
Two marks, wherein the first identifier is the IP address of the baseboard management controller BMC of mainboard where server power supply, described
Second identifier is the type identification of the current server power supply information to be read, and the key command corresponds to Management Information Base row and refer to
It enables;
One or more server power supply information corresponding with the second identifier is obtained according to the first identifier;
The server power supply information is visualized.
Optionally, one or more server power supply corresponding with the second identifier is obtained according to the first identifier to believe
Breath, comprising:
Obtain the address information of the server power supply on mainboard;
It is corresponding by executing the key command according to the address information of the first identifier and the server power supply
Management Information Base row instructs to obtain one or more server power supply corresponding with the second identifier in the server power supply
Information.
Optionally, wherein the Management Information Base row instruction is for one group for obtaining one corresponding with the second identifier
Or the Intelligent Platform Management Interface IPMI facility instruction of a plurality of server power supply information.
Optionally, the type identification includes such as at least one of Types Below: power supply real time information, power failure letter
Breath.
The embodiment of the present application also provides a kind of server power supply information processing units, comprising:
Data obtaining module is inputted, is set as in the key for receiving user and being read out for server power supply information
After instruction, first identifier and second identifier are obtained, wherein the first identifier is the substrate management of mainboard where server power supply
Controller BMC IP address, the second identifier for the current server power supply information to be read type identification, it is described to press
Key instructs corresponding Management Information Base row instruction;
Power information obtain module, be set as according to the first identifier obtain it is corresponding with the second identifier one or
A plurality of server power supply information;
Power information display module is set as visualizing the server power supply information.
Optionally, power information obtains module and is obtaining one corresponding with the second identifier according to the first identifier
Or it when a plurality of server power supply information, is specifically configured to:
Obtain the address information of the server power supply on mainboard;
It is corresponding by executing the key command according to the address information of the first identifier and the server power supply
Management Information Base row instructs to obtain one or more server power supply corresponding with the second identifier in the server power supply
Information.
Optionally, wherein the Management Information Base row instruction is for one group for obtaining one corresponding with the second identifier
Or the Intelligent Platform Management Interface IPMI facility instruction of a plurality of server power supply information.
Optionally, the type identification includes such as at least one of Types Below: power supply real time information, power failure letter
Breath.
The embodiment of the present application also provides a kind of readable mediums, comprising: executes instruction, when the processor of storage control is held
When executing instruction described in row, the storage control executes method shown in above-described embodiment.
The embodiment of the present application also provides a kind of storage controls, comprising: processor, memory and bus;
The processor is connected with the memory by the bus;
The memory, when storage control operation, the processor executes the described of the memory storage
It executes instruction, so that the storage control executes method shown in above-described embodiment.
The embodiment of the present application also provides a kind of server power supply information processing systems, comprising: computer and server master
Plate, the server master board pass through cable and the computer interconnection;
Wherein, storage control shown in above-described embodiment is installed on the computer, is pacified on the server master board
Equipped with server power supply, the baseboard management controller of the internet protocol address of the computer and the server master board
BMC IP address is in same network segment.
The application propose technical solution include: receive user for server power supply information be read out one by
After key instruction, first identifier and second identifier are obtained, wherein the first identifier is the substrate pipe of mainboard where server power supply
Manage controller BMC IP address, the second identifier be currently the server power supply information to be read type identification, it is described
Key command corresponds to the instruction of Management Information Base row;Corresponding with the second identifier one or more is obtained according to the first identifier
Server power supply information;The server power supply information is visualized.
The application sends a key command by user in reading service device power information, and server power supply can be completed
The reading of information and visual presentation enter under DOS environment without user and sequentially input a plurality of command line instructions and right
The information of return is interpreted, to realize automation reading service device power information, reduces manpower, improves work effect
Rate, the user experience is improved.
Specific embodiment
The application is described in detail below with reference to attached drawing and in conjunction with the embodiments.It should be noted that not conflicting
In the case of, the features in the embodiments and the embodiments of the present application can be combined with each other.
Fig. 1 show the server power supply information processing method flow chart of the embodiment of the present application 1, comprising the following steps:
Step 101: after receiving the key command that user is read out server power supply information, obtaining first
Mark and second identifier;
Wherein, the first identifier is the baseboard management controller BMC IP address of mainboard where server power supply, described
Second identifier is the type identification of the current server power supply information to be read, and the key command corresponds to Management Information Base row and refer to
It enables;
BMC (baseboard management controller, baseboard management controller) is a kind of Server remote pipe
Device is managed, can monitor that plateform system management event (is invaded for example including temperature exceeding standard, voltage over standard, fan failure and cabinet automatically
Deng), the logout of generation in non-volatile System Event Log.BMC provides shared register interface, Ke Yitong
The interface is crossed on the server or machine remote management operational management software (such as ipmitool.exe), to the current number of platform
According to being stored and retrieved.
IP address (Internet Protocol Address, internet protocol address) is one kind in the internet Internet
On to host address mode.That is, the host of each connection on internet can distribute the address 32bit,
As IP address.
BMC IP address is the IP address to have configured the BMC that the server of BMC distributes, and staff is switched in server
When enter the set interface of BIOS (Basic Input Output System, basic input output system), at the interface BIOS
The BMC IP address of server is configured.
When obtaining the BMC IP address of mainboard where first identifier, that is, server power supply, can be, but not limited to by using
The following two kinds mode: one, user is before the key that triggering is read out server power supply information, by user in operation interface
It is upper to input the BMC IP address that has distributed, in this way, receive user for server power supply information be read out one by
After key instruction, the BMC IP address that the user that interface is passed to is inputted is directly acquired, if BMC IP address input error,
Returning to prompt information allows user to re-start input.Two, by calling with obtaining BMC IP provided by baseboard management controller
The related command row of location obtains.
As previously mentioned, the type identification includes but are not limited to: power supply real time information and power failure information.Wherein,
Power supply real time information includes the producer of power supply, model, sequence number, hardware version numbers, FW version, inputs power grid, operating mode, with
And the information such as power supply integrality, pass through and read power supply real time information, it will be appreciated that some attributes of the power supply itself and current
State in which;When power failure, relevant information can be saved in black box log, for power failure information
Read the reading as black box log.
User needs to read different types of server power supply information according to current, is realized by one key of triggering pair
In the reading of the type power information.The key can be the button being arranged on interface, and one can be then sent when button is pressed and is pressed
Key instruction.Wherein, the key command corresponds to the instruction of Management Information Base row, and here, the instruction of Management Information Base row is for one group for obtaining
The Intelligent Platform Management Interface IPMI facility instruction of one or more server power supply information corresponding with the second identifier, packet
Containing single or a plurality of IPMI facility instruction.Different keys can correspond to triggering and read different types of power information, such as: the
One when pressing key pressing, and power supply real time information is read in corresponding triggering;Second when pressing key pressing, and power failure letter is read in corresponding triggering
Breath.It is corresponding to trigger while reading power supply real time information and power failure information when third presses key pressing.In the embodiment of the present application
Second identifier can be obtained by analyzing the received corresponding key of key command, i.e., the current server to be read
The type identification of power information;
Step 102: one or more server power supply corresponding with the second identifier is obtained according to the first identifier
Information;
Specifically, the address information of the server power supply on mainboard is obtained;
It is corresponding by executing the key command according to the address information of the first identifier and the server power supply
Management Information Base row instructs to obtain one or more server power supply corresponding with the second identifier in the server power supply
Information;
Under normal circumstances, one or more power supplys can be installed, the address of power supply is usually to be consolidated by BMC on server master board
Surely it distributes, such as: 0xb0,0xb2 ... ....In the case where well known server mainboard BMC IP address, successively according to each
The address information of a power supply is exercised by related command and is obtained in the server power supply with IPMI facility instruction described in correspondence
The server power supply information of power information classification shown in second identifier, specifically: if the second identifier is that power supply is believed in real time
Breath then executes one group for obtaining the IPMI facility instruction of power supply real time information and carrys out reading service device power information;If described
Second identifier is power failure information, then executes one group for obtaining the IPMI facility instruction of power failure information and carry out reading service
Device power information;If the second identifier is power supply real time information and power failure information, one group is executed for obtaining electricity
The IPMI facility instruction of source real time information and power failure information carrys out reading service device power information.
Wherein, by order line using IPMI facility instruction to read power information when, especially by server master board
On BMC read power information, principle is as follows: the BMC chip on mainboard is asked by I2C bus to power supply device PSU sending
It asks, reads power supply address;After power supply device PSU receives BMC request, I2C bus addressing can be passed through;After establishing communication, pass through
The power information in each register is read in order;Then, read power information is fed back into BMC.
Step 103: the server power supply information is visualized;
It is hexadecimal since the power information obtained by order line using IPMI facility instruction returns to Value Data itself
The ASCII character of format or other be not easy to the form intuitively checked, therefore, before being visualized, need this form
Return Value Data be parsed into the form being directly viewable convenient for user.Such as: when obtaining power supply brand, Value Data 16 will be returned
" 44 45 4c 54 41 23 23 23 23 23 23 23 23 23 of 0e " of system is decomposed, by interpret character length 0e and
The ASCLL code for representing 14 characters of manufacturer, filters out unnecessary 23h (representing " # "), is parsed into " DELTA ".
When accessed server power supply information is visualized, can according to power information type with
And the reading frequency of information is needed to be shown in different ways.It, can be directly at interface for power supply real time information
On be shown, when displaying, can distinguish normal data or improper data by font color;For power failure
Each page black box daily record data read can be saved as the data file of text formatting by information, then by opening the number
Power failure information is checked according to file.It, can be with for needing to repeat the case where reading power information whithin a period of time
The data content read is saved as to the data of CVS format, to facilitate user to check.
Above steps is illustrated with concrete implementation example below:
Environment is built first: 1) CPU, memory and two server power supplies to be measured is installed on server master board, together
Sample assumes that two power supply titles are PSU1 and PSU2, and corresponding BMC distribution address is followed successively by: 0xb0,0xb2;2) clothes, are connected
Business device power supply, is switched on (can not also open);3), server master board is got up by the dedicated network interface of BMC and a PC interconnection with cable;
4), at the end PC, the BMC IP address that its IP address and server is arranged is in same network segment.
Inventor develops a power information reading platform (PowerRead) using the method for the embodiment of the present application 1,
In the interface screenshotss that are interacted with user as shown in Fig. 2, run PowerRead on PC, the interface is opened, comprising can be on interface
The input frame and triggerable button " beginning " key for being used to read power supply real time information for inputting BMC IP address, in BMC IP
In the input frame of address after the correct BMC IP address " 192.168.1.10 " of input, button " beginning " key is clicked, can be started
Current power real time information is read out, is being waited after a certain period of time, read information can be shown to right on visual interface
It answers in the display box of information, the interface screenshot after the completion of reading is as shown in figure 3, wherein comprising the brand of power supply, model and hard
The information such as part version number.
What needs to be explained here is that not needing user during the entire process of reading service device power information and entering
A plurality of command line instructions are sequentially input under DOS environment and the information of return is interpreted, but need to only be triggered a key and be started
Reading and the visual presentation of server power supply information can be completed in button, to realize automation reading service device power supply
Information reduces manpower, improves work efficiency, and the user experience is improved.
Fig. 4 is the server power supply information processing unit structure chart of the embodiment of the present application 2, as shown in figure 4, the server is electric
Source information processing unit includes:
Data obtaining module is inputted, is set as in the key for receiving user and being read out for server power supply information
After instruction, first identifier and second identifier are obtained, wherein the first identifier is the substrate management of mainboard where server power supply
Controller BMC IP address, the second identifier for the current server power supply information to be read type identification, it is described to press
Key instructs corresponding Management Information Base row instruction;
Power information obtain module, be set as according to the first identifier obtain it is corresponding with the second identifier one or
A plurality of server power supply information;
Power information display module is set as visualizing the server power supply information.
Wherein, power information obtain module according to the first identifier obtain it is corresponding with the second identifier one or
When a plurality of server power supply information, it is specifically configured to:
Obtain the address information of the server power supply on mainboard;
It is corresponding by executing the key command according to the address information of the first identifier and the server power supply
Management Information Base row instructs to obtain one or more server power supply corresponding with the second identifier in the server power supply
Information.
Wherein, the Management Information Base row instruction is for one group for obtaining one or more clothes corresponding with the second identifier
The Intelligent Platform Management Interface IPMI facility instruction of business device power information.
Wherein, the type identification includes such as at least one of Types Below: power supply real time information, power failure information.
The embodiment of the present application also provides a kind of readable mediums, comprising: executes instruction, when the processor of storage control is held
When executing instruction described in row, the storage control executes the server power supply information processing method of the offer of above-described embodiment 1.
The embodiment of the present application also provides a kind of storage controls, comprising: processor, memory and bus;
The processor is connected with the memory by the bus;
The memory, when storage control operation, the processor executes the described of the memory storage
It executes instruction, so that the storage control executes the server power supply information processing method of the offer of above-described embodiment 1.
Fig. 5 is the server power supply information processing system structure chart of the embodiment of the present application 3, as shown in figure 5, the server is electric
Source information processing system includes:
Computer and server master board, the server master board pass through cable and the computer interconnection;
Wherein, storage control provided by the above embodiment is installed on the computer, is pacified on the server master board
Equipped with server power supply, the baseboard management controller of the internet protocol address of the computer and the server master board
BMC IP address is in same network segment.
This point it is emphasized that described scheme, realized the day of different stage through the foregoing embodiment in the application
Will is deployed in a distributed manner on different log servers, to provide a kind of simple, reliable, efficient log distribution portion
Administration's system, generated Insufficient disk space, also solves when solving the problems, such as log progress single machine deployment in the prior art
The problem of entire log system is hung after Single Point of Faliure, improves the reliability of system, and then the user experience is improved.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or device.
Above-mentioned the embodiment of the present application serial number is for illustration only, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, the technical solution of the application substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service
Device, air conditioner or network equipment etc.) execute method described in each embodiment of the application.
The above is only preferred embodiment of the present application, are not intended to limit the scope of the patents of the application, all to utilize this Shen
Please equivalent structure or equivalent flow shift made by specification and accompanying drawing content, be applied directly or indirectly in other relevant skills
Art field similarly includes in the scope of patent protection of the application.