Background technology
Switching on and shutting down tests is in the mainboard pressure test modal one, is the simplest, directly perceived, effective a kind of means of test macro startup power on self detection (Power On Self Test is called for short POST) stability.
Mainboard to the method for testing of this project is at present:
First; Utilize real-time timepiece chip (Real-Time Clock is called for short RTC) arousal function automatically, this function needs Basic Input or Output System (BIOS) (Basic Input Output System; Abbreviation BIOS) support at first need be disposed at BIOS and carried out the setting of RTC arousal function in the page; In system, utilize the time among the upper layer software (applications) adjustment CMOS (a read-write RAM chip on the mainboard) then and wake the control setting up.
The second, WOL (Wakeup on Line abbreviates WoL as) carries out the switching on and shutting down test through WOL.This function adopts main frame-client (Host-Client) pattern.To the main frame (Host) of needs test, need a client (Client) to be connected with this main frame through netting twine, after the main frame shutdown, pass through host media access control (MediaAccess Control is called for short MAC Address) with host wake-up with client.
Yet; Utilize RTC to wake following defective automatically up: at first need dispose and carry out the setting of RTC arousal function in the page at BIOS; Single board configuration is not had any problem, but to the blade type server test, or in factory's batch testing; To need manpower, man-hour this function of configure, very loaded down with trivial details.Secondly in system, utilize the time among the upper layer software (applications) adjustment CMOS and wake the control setting up, this upper layer software (applications) also has limitation, needs develop to different system platforms.
And calling function of network also has following defective: need an independent client that main frame to be tested is carried out wake operation.Client need be known host MAC address, to the host wake-up of this MAC Address, if to a plurality of blade servers, or the plant produced test, manually-operated property is stronger, does not possess the unmanned condition.When wearing out pressure test, do not possess the condition of automation mechanized operation.
Can not be applicable to a plurality of platforms and the problem that test process is complicated, efficient is low, the manually-operated amount is big to system testing in the correlation technique, not propose effective solution at present as yet.
Summary of the invention
Can not be applicable to a plurality of platforms and the problem that test process is complicated, efficient is low, the manually-operated amount is big to system testing in the correlation technique; The present invention proposes a kind of method of testing and device of system operation, can in different systems, realize to system simply, efficiently, fast automatically the operation.
Technical scheme of the present invention is achieved in that
According to an aspect of the present invention, a kind of method of testing of system operation is provided, this method of testing is based on baseboard management controller, and this method of testing comprises:
Baseboard management controller receives the command packet from IPMI, carries operation information that is used to represent the assigned operation that need carry out and the temporal information of carrying out this assigned operation in the command packet;
Baseboard management controller confirms to carry out the time of assigned operation according to temporal information, and carries out assigned operation under the situation about at the appointed time reaching.
Wherein, Order in the command packet that IPMI sends further comprises and enables sign; And, after baseboard management controller receives command packet, judge at first whether enable sign is configured to open; In judged result is under the situation that is, baseboard management controller confirms to carry out the time of assigned operation.
Be configured to close if enable sign, then handle stopping.
And command packet comprises:
First operation information and very first time information, wherein, first operation information is a power-on command, very first time information is for carrying out the stand-by period of start operation; And/or
Second operation information and second temporal information, wherein, second operation information is a shutdown command, second temporal information is for carrying out the stand-by period of power-off operation.
In addition; If the system at baseboard management controller place is in off-mode; Then baseboard management controller picks up counting, and arrive to carry out at timing time under the situation of stand-by period of start operation, according to first operation information to the operation of starting shooting of the system at baseboard management controller place.
If the system at baseboard management controller place is in open state; Then baseboard management controller picks up counting; And arrive to carry out at timing time under the situation of stand-by period of power-off operation, according to second operation information system at baseboard management controller place is carried out power-off operation.
And, comprise that in command packet baseboard management controller is carried out following processing with the round-robin mode under the situation of first operation information, very first time information, second operation information and second temporal information:
If the system at baseboard management controller place is in off-mode; Then baseboard management controller picks up counting; And arrive to carry out at timing time under the situation of stand-by period of start operation, according to first operation information to the operation of starting shooting of the system at baseboard management controller place;
If the system at baseboard management controller place is in open state; Then baseboard management controller picks up counting; And arrive to carry out at timing time under the situation of stand-by period of power-off operation, according to second operation information system at baseboard management controller place is carried out power-off operation.
And temporal information representes to carry out the moment of assigned operation, and, if when baseboard management controller is confirmed constantly to arrive according to system clock, then carry out assigned operation at current time.
According to an aspect of the present invention, a kind of proving installation of system operation is provided also, this proving installation is based on baseboard management controller, and this proving installation comprises:
Receiver module is used for baseboard management controller and receives the command packet from IPMI, carries operation information that is used to represent the assigned operation that need carry out and the temporal information of carrying out this assigned operation in the command packet;
Determination module is used for baseboard management controller and confirms to carry out the time of assigned operation according to temporal information, and carries out assigned operation under the situation about at the appointed time reaching.
Wherein, this command packet comprises:
First operation information and very first time information, wherein, first operation information is a power-on command, very first time information is for carrying out the stand-by period of start operation; And/or second operation information and second temporal information, wherein, second operation information is a shutdown command, second temporal information is for carrying out the stand-by period of power-off operation;
Perhaps, temporal information representes to carry out the moment of assigned operation, and, if determination module is then carried out assigned operation at current time when baseboard management controller is confirmed constantly to arrive according to system clock.
The present invention receives from carrying of IPMI through baseboard management controller and is used to represent the operation information of the assigned operation that need carry out and the command packet of carrying out the temporal information of this assigned operation; Confirm to carry out the time of assigned operation according to temporal information by baseboard management controller; And carry out assigned operation under the situation about at the appointed time reaching, can in different systems, realize to system simply, efficiently, fast automatically the operation.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, the every other embodiment that those of ordinary skills obtained belongs to the scope that the present invention protects.
According to embodiments of the invention, a kind of method of testing of system operation is provided, this method of testing is based on baseboard management controller (Baseboard management Controller is called for short BMC).
As shown in Figure 1, comprise according to the method for testing of the system operation of the embodiment of the invention:
Step S101; Baseboard management controller receives from IPMI (Intelligent Platform Management Interface; Be called for short IPMI) command packet, carry operation information that is used to represent the assigned operation that need carry out and the temporal information of carrying out this assigned operation in the command packet;
Step S103, baseboard management controller confirms to carry out the time of assigned operation according to temporal information, and carries out assigned operation under the situation about at the appointed time reaching.
Wherein, the order in the command packet that IPMI sends further comprises and enables sign, and this enables sign and is used for the control basal plate Management Controller and opens, close automatic arousal function.And, after baseboard management controller receives command packet, judge at first whether be configured to open, be under the situation that is in judged result if enabling sign, baseboard management controller confirms to carry out the time of assigned operation.
Be configured to close if enable sign, then handle stopping.
And command packet comprises:
First operation information and very first time information, wherein, first operation information is a power-on command, and very first time information is for carrying out the stand-by period of start operation, and how long again this booting wait time be used for waiting for start after the control shutdown; And/or
Second operation information and second temporal information, wherein, second operation information is a shutdown command, and second temporal information is for carrying out the stand-by period of power-off operation, and how long again this shutdown stand-by period is used for waiting for shutdown after the control start.
In addition; If the system at baseboard management controller place is in off-mode; Then baseboard management controller picks up counting, and arrive to carry out at timing time under the situation of stand-by period of start operation, according to first operation information to the operation of starting shooting of the system at baseboard management controller place.
If the system at baseboard management controller place is in open state; Then baseboard management controller picks up counting; And arrive to carry out at timing time under the situation of stand-by period of power-off operation, according to second operation information system at baseboard management controller place is carried out power-off operation.
And, comprise that in command packet baseboard management controller is carried out following processing with the round-robin mode under the situation of first operation information, very first time information, second operation information and second temporal information:
If the system at baseboard management controller place is in off-mode; Then baseboard management controller picks up counting; And arrive to carry out at timing time under the situation of stand-by period of start operation, according to first operation information to the operation of starting shooting of the system at baseboard management controller place;
If the system at baseboard management controller place is in open state; Then baseboard management controller picks up counting; And arrive to carry out at timing time under the situation of stand-by period of power-off operation, according to second operation information system at baseboard management controller place is carried out power-off operation.
And temporal information representes to carry out the moment of assigned operation, and, if when baseboard management controller is confirmed constantly to arrive according to system clock, then carry out assigned operation at current time.
The present invention utilizes the IPMI management interface that BMC follows on the server master board.
For example, automatic on/off test of computer flow process of the present invention is following:
Step (1), under the system boot state, the instrument that utilizes standard to send the IPMI order sends command packet, such as enabler flags=open, booting wait time=10 second, 30 seconds stand-by period of shutdown;
Step (2), whether BMC checks enabler flags for opening after receiving the packet that step (1) sends, if open, the inspection shutdown stand-by period, shutdown command, system closedown are sent in (30 seconds) after the shutdown stand-by period;
Step (3), the BMC inspection booting wait time after system closedown, again the booting wait time (10 seconds) later BMC start boot program, system boot;
Step (4), circulation step (1) is to the process of step (3) in robotization switching on and shutting down test process.
As shown in Figure 2, according to the idiographic flow of the method for testing of the system operation of the embodiment of the invention be:
At first, under the state of system boot, send command packet by IPMI, this command packet comprises three conditions: enable sign, booting wait time and shutdown stand-by period.
Secondly, enable sign by the BMC judgement, if enable to be designated shutdown command, then system's shutdown switch machine test.When enabling to be designated when opening order, BMC judges and waits for the unused time.When the unused time that command packet is set arrived, BMC called shutdown command, system closedown.
At last, after the system closedown, BMC judges and waits for the on time.When the on time that command packet is set arrived, BMC called power-on command, system boot.
When system is in open state once more, receive the command packet of sending again and judge by IPMI, back and forth automatically perform above operation.
In addition, in the present invention, shutdown can remove the stand-by period in the definition of IPMI packet, or realizes the process waited for by external software, and the BMC shutdown process can be realized by external software, script.
According to embodiments of the invention, a kind of proving installation of system operation also is provided, this proving installation is based on baseboard management controller.
As shown in Figure 3, comprise according to the proving installation of the system operation of the embodiment of the invention:
Receiver module 31 is used for baseboard management controller and receives the command packet from IPMI, carries operation information that is used to represent the assigned operation that need carry out and the temporal information of carrying out this assigned operation in the command packet;
Determination module 32 is used for baseboard management controller and confirms to carry out the time of assigned operation according to temporal information, and carries out assigned operation under the situation about at the appointed time reaching.
Wherein, this command packet comprises:
First operation information and very first time information, wherein, first operation information is a power-on command, very first time information is for carrying out the stand-by period of start operation; And/or second operation information and second temporal information, wherein, second operation information is a shutdown command, second temporal information is for carrying out the stand-by period of power-off operation;
Perhaps, temporal information representes to carry out the moment of assigned operation, and, if determination module 32 is then carried out assigned operation at current time when baseboard management controller is confirmed constantly to arrive according to system clock.
In sum; By means of technique scheme of the present invention; Receive from carrying of IPMI through baseboard management controller and to be used to represent the operation information of the assigned operation that need carry out and the command packet of carrying out the temporal information of this assigned operation; Confirm to carry out the time of assigned operation by baseboard management controller according to temporal information, and carry out assigned operation under the situation about at the appointed time reaching.The IPMI IPMI that the present invention adopts industry to generally acknowledge is realized platform of the present invention, only needs delegation's script command, can realize the switching on and shutting down pressure test in different system (DOS, Windows, Linux), and is simple, efficient.In the present invention, the definition of IPMI order data packet format; The definition of IPMI command format; Parsing to ordering after BMC just receives orders; BMC waits for that the processes such as realization of start, shutdown process are the key points of present technique scheme.And; Carry out the switching on and shutting down test on the mainboard of the present invention based on realizing; Can utilize the existing standard I PMI order transmission instrument that is applicable to each system platform (DOS, Windows, Linux) of industry; No system constraint need not again the new software of development and maintenance, can be used for the unmanned automatic test.For many mass tests of plant produced line mainboard quantity, can optimize the required manpower of test, man-hour.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.