Background technology
Switching on and shutting down test is in 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.
Current mainboard for the method for testing of this project is:
First, utilize real-time timepiece chip (Real-Time Clock, be called for short RTC) automatic arousal function, this function needs Basic Input or Output System (BIOS) (Basic Input Output System, be called for short BIOS) support, first need to configure in the page at BIOS to carry out the setting of RTC arousal function; Then utilize upper layer software (applications) to adjust the time in CMOS (a piece on mainboard read-write RAM chip) and wake up in systems in which and control setting.
The second, WOL (Wake On LAN) (Wakeup on Line, referred to as WoL), carries out switching on and shutting down test by WOL (Wake On LAN).This function adopts host-client (Host-Client) pattern.For the main frame (Host) needing test, a client (Client) is needed to be connected with this main frame by netting twine, after main frame shutdown, host media access control (MediaAccess Control is called for short MAC Address) is passed through by host wake-up by client.
But, RTC is utilized automatically to wake following defect up: first to need to configure in the page at BIOS to carry out the setting of RTC arousal function, to single board configuration not what problem, but test for blade server, or in factory's batch testing, to need manpower, man-hour this function of configure, very loaded down with trivial details.Secondly utilize upper layer software (applications) to adjust the time in CMOS and wake up in systems in which and control setting, this upper layer software (applications) also has limitation, needs to develop for different system platforms.
Further, calling function of network also has following defect: need an independent client to carry out wake operation to tested main frame.Client needs to know host MAC address, to the host wake-up of this MAC Address, if to multiple blade server, or plant produced test, manual operation is comparatively strong, does not possess unmanned condition.When carrying out aging pressure test, do not possess the condition of automation mechanized operation.
Can not be applicable to for system testing in correlation technique the problem that multiple platform and test process are complicated, efficiency is low, manual operation load is large, not yet propose effective solution at present.
Summary of the invention
The problem that multiple platform and test process are complicated, efficiency is low, manual operation load is large can not be applicable to for system testing in correlation technique, the present invention proposes a kind of method of testing and device of Dynamic System, can to realize in different systems system simply, efficiently, automatic operation fast.
Technical scheme of the present invention is achieved in that
According to an aspect of the present invention, provide a kind of method of testing of Dynamic System, 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 for representing the operation information of the assigned operation that needs carry out and performing the temporal information of this assigned operation in command packet;
Baseboard management controller determines according to temporal information the time performing assigned operation, and performs assigned operation when at the appointed time reaching.
Wherein, order in the command packet that IPMI sends comprises enable mark further, and, after baseboard management controller receives command packet, first judge whether enable mark is configured to open, when judged result is for being, baseboard management controller determines the time performing assigned operation.
If enable mark is configured to close, then process termination.
Further, command packet comprises:
First operation information and very first time information, wherein, the first operation information is power-on command, and very first time information is the stand-by period performing power-on operation; And/or
Second operation information and the second temporal information, wherein, the second operation information is shutdown command, and the second temporal information is the stand-by period performing power-off operation.
In addition, if the system at baseboard management controller place is in off-mode, then baseboard management controller starts timing, and when timing time arrives the stand-by period performing power-on operation, carries out power-on operation according to the first operation information to the system at baseboard management controller place.
If the system at baseboard management controller place is in open state, then baseboard management controller starts timing, and when timing time arrives the stand-by period performing power-off operation, according to the second operation information, power-off operation is carried out to the system at baseboard management controller place.
Further, when command packet comprises the first operation information, very first time information, the second operation information and the second temporal information, baseboard management controller performs following process in a circulating manner:
If the system at baseboard management controller place is in off-mode, then baseboard management controller starts timing, and when timing time arrives the stand-by period performing power-on operation, according to the first operation information, power-on operation is carried out to the system at baseboard management controller place;
If the system at baseboard management controller place is in open state, then baseboard management controller starts timing, and when timing time arrives the stand-by period performing power-off operation, according to the second operation information, power-off operation is carried out to the system at baseboard management controller place.
And temporal information represents the moment performing assigned operation, and, if when baseboard management controller determines that the moment arrives according to system clock, then perform assigned operation at current time.
According to an aspect of the present invention, additionally provide a kind of proving installation of Dynamic System, this proving installation is based on baseboard management controller, and this proving installation comprises:
Receiver module, receives the command packet from IPMI for baseboard management controller, carries for representing the operation information of the assigned operation that needs carry out and performing the temporal information of this assigned operation in command packet;
Determination module, determines according to temporal information the time performing assigned operation for baseboard management controller, and performs assigned operation when at the appointed time reaching.
Wherein, this command packet comprises:
First operation information and very first time information, wherein, the first operation information is power-on command, and very first time information is the stand-by period performing power-on operation; And/or second operation information and the second temporal information, wherein, the second operation information is shutdown command, and the second temporal information is the stand-by period performing power-off operation;
Or temporal information represents the moment performing assigned operation, and, if determination module is when according to system clock, baseboard management controller determines that the moment arrives, then perform assigned operation at current time.
The present invention receives carrying the operation information for representing the assigned operation that needs carry out and performing the command packet of temporal information of this assigned operation from IPMI by baseboard management controller, determine according to temporal information the time performing assigned operation by baseboard management controller, and perform assigned operation when at the appointed time reaching, can to realize in different systems system simply, efficiently, automatic operation fast.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain, all belongs to the scope of protection of the invention.
According to embodiments of the invention, provide a kind of method of testing of Dynamic System, 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 Dynamic System of the embodiment of the present invention:
Step S101, baseboard management controller receives from IPMI (IntelligentPlatform Management Interface, be called for short IPMI) command packet, carry for representing the operation information of the assigned operation that needs carry out and performing the temporal information of this assigned operation in command packet;
Step S103, baseboard management controller determines according to temporal information the time performing assigned operation, and performs assigned operation when at the appointed time reaching.
Wherein, the order in the command packet that IPMI sends comprises enable mark further, and this enable mark being opened for controlling baseboard management controller, being closed automatic arousal function.Further, after baseboard management controller receives command packet, first judge whether enable mark is configured to open, when judged result is for being, baseboard management controller determines the time performing assigned operation.
If enable mark is configured to close, then process termination.
Further, command packet comprises:
First operation information and very first time information, wherein, the first operation information is power-on command, and very first time information is the stand-by period performing power-on operation, and this booting wait time waits for how long starting shooting after controlling shutdown again; And/or
Second operation information and the second temporal information, wherein, the second operation information is shutdown command, and the second temporal information is the stand-by period performing power-off operation, and this shutdown stand-by period waits for how long shutting down after controlling start again.
In addition, if the system at baseboard management controller place is in off-mode, then baseboard management controller starts timing, and when timing time arrives the stand-by period performing power-on operation, carries out power-on operation according to the first operation information to the system at baseboard management controller place.
If the system at baseboard management controller place is in open state, then baseboard management controller starts timing, and when timing time arrives the stand-by period performing power-off operation, according to the second operation information, power-off operation is carried out to the system at baseboard management controller place.
Further, when command packet comprises the first operation information, very first time information, the second operation information and the second temporal information, baseboard management controller performs following process in a circulating manner:
If the system at baseboard management controller place is in off-mode, then baseboard management controller starts timing, and when timing time arrives the stand-by period performing power-on operation, according to the first operation information, power-on operation is carried out to the system at baseboard management controller place;
If the system at baseboard management controller place is in open state, then baseboard management controller starts timing, and when timing time arrives the stand-by period performing power-off operation, according to the second operation information, power-off operation is carried out to the system at baseboard management controller place.
And temporal information represents the moment performing assigned operation, and, if when baseboard management controller determines that the moment arrives according to system clock, then perform assigned operation at current time.
The present invention is the IPMI management interface utilizing BMC on server master board to follow.
Such as, automatic on/off test of computer flow process of the present invention is as follows:
Step (1), under system boot state, the instrument utilizing standard to send IPMI order sends command packet, such as: enabler flags=open, booting wait time=10 seconds, shut down 30 seconds stand-by period;
Step (2), BMC checks that whether enabler flags is for opening after receiving the packet that step (1) sends, if open, checks the shutdown stand-by period, after the shutdown stand-by period, (30 seconds) send shutdown command, system closedown;
Step (3), after system closedown, BMC checks the booting wait time, then booting wait time (10 seconds) BMC startup later boot program, system boot;
Step (4), in robotization switching on and shutting down test process, circulation step (1) is to the process of step (3).
As shown in Figure 2, according to the idiographic flow of the method for testing of the Dynamic System of the embodiment of the present invention be:
First, under the state of system boot, send command packet by IPMI, this command packet comprises three conditions: enable mark, booting wait time and shutdown stand-by period.
Secondly, judge enable mark by BMC, be designated shutdown command if enable, then system shutdown switch machine test.When enable be designated open order time, BMC carries out judging and waiting for the unused time.When the unused time of command packet setting arrives, BMC calls shutdown command, system closedown.
Finally, after system closedown, BMC carries out judging and waiting for the on time.When the on time of command packet setting arrives, BMC calls power-on command, system boot.
When system is in open state again, again receives the command packet that sent by IPMI and judge, back and forth automatically performing above operation.
In addition, in the present invention, the stand-by period of shutting down in the definition of IPMI packet can remove, or realizes the process of wait by external software, and BMC shutdown process can be realized by external software, script.
According to embodiments of the invention, additionally provide a kind of proving installation of Dynamic System, this proving installation is based on baseboard management controller.
As shown in Figure 3, comprise according to the proving installation of the Dynamic System of the embodiment of the present invention:
Receiver module 31, receives the command packet from IPMI for baseboard management controller, carries for representing the operation information of the assigned operation that needs carry out and performing the temporal information of this assigned operation in command packet;
Determination module 32, determines according to temporal information the time performing assigned operation for baseboard management controller, and performs assigned operation when at the appointed time reaching.
Wherein, this command packet comprises:
First operation information and very first time information, wherein, the first operation information is power-on command, and very first time information is the stand-by period performing power-on operation; And/or second operation information and the second temporal information, wherein, the second operation information is shutdown command, and the second temporal information is the stand-by period performing power-off operation;
Or temporal information represents the moment performing assigned operation, and, if determination module 32 is when according to system clock, baseboard management controller determines that the moment arrives, then perform assigned operation at current time.
In sum, by means of technique scheme of the present invention, carrying the operation information for representing the assigned operation that needs carry out and performing the command packet of temporal information of this assigned operation from IPMI is received by baseboard management controller, determine according to temporal information the time performing assigned operation by baseboard management controller, and perform assigned operation when at the appointed time reaching.The IPMI IPMI that the present invention adopts industry to generally acknowledge, realizes platform of the present invention, only needs a line script command, can realize switching on and shutting down pressure test at different system (DOS, Windows, Linux), simple, efficient.In the present invention, the definition of IPMI order data packet format; The definition of IPMI command format; To the parsing of order after BMC just receives orders; The processes such as the realization of BMC wait start, shutdown process are the key points of the technical program.And, based on realizing, mainboard of the present invention carries out switching on and shutting down test, the existing standard I PMI order transmission instrument being applicable to each system platform (DOS, Windows, Linux) of industry can be utilized, without system constraint, without the need to the software that development and maintenance is again new, can be used for unmanned automatic test.For many mass tests of plant produced line mainboard quantity, can manpower, man-hour needed for optimal inspection.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.