CN104375910A - Automatic power-on and power-off test method - Google Patents
Automatic power-on and power-off test method Download PDFInfo
- Publication number
- CN104375910A CN104375910A CN201410679397.1A CN201410679397A CN104375910A CN 104375910 A CN104375910 A CN 104375910A CN 201410679397 A CN201410679397 A CN 201410679397A CN 104375910 A CN104375910 A CN 104375910A
- Authority
- CN
- China
- Prior art keywords
- server
- bmc
- script
- test
- operating system
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000010998 test method Methods 0.000 title abstract description 4
- 238000012360 testing method Methods 0.000 claims abstract description 70
- 238000013515 script Methods 0.000 claims abstract description 49
- 238000000034 method Methods 0.000 claims abstract description 26
- 230000008569 process Effects 0.000 claims abstract description 8
- 230000009471 action Effects 0.000 claims description 3
- 230000006870 function Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000013112 stability test Methods 0.000 description 1
- 230000009885 systemic effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention discloses an automatic power-on and power-off test method, which comprises the following concrete implementation processes: uploading an automatic startup and shutdown script under the BMC, and uploading a test script under an operating system; the automatic startup and shutdown script runs, and the server is started; the test script of the operating system runs, when no error occurs, the server is shut down, when an error occurs, the test is stopped, the test environment is reserved, and a corresponding log is generated; and the automatic power-on and power-off script automatically powers off the server, stops testing when an error exists, reserves a testing environment, generates a corresponding log and completes the testing. Compared with the prior art, the automatic power-on and power-off test method can reduce the input of manpower, can better ensure the accuracy of test results, and simultaneously adds a log collection function, so that the analysis and the positioning of problems become more convenient.
Description
Technical field
The present invention relates to computer server technical field, specifically a kind of practical, robotization method for testing open/close machine.
Background technology
Along with the fast development of server industries, increasing client starts to be partial to buy the core application of large batch of server as oneself.So it is also proposed higher requirement except the stability to server, reliability.And can server keep normal running, can become Client application the prerequisite of stable operation.
Current industry is in system stability test, and server switching on and shutting down test is one of most important standard considered of system stability.Switching on and shutting down test majority of current server is the automatic test of mode based on manual or systemic hierarchial, and manual mode test can be increased in the input of manpower aspect, while due to manual operation, the accuracy of test cannot ensure.And although system-level automatic test can reduce the input of manpower, because test procedure runs in system level, bottom state cannot be detected in test process, problem and the hidden danger of some bottoms can be omitted unavoidably.
Based on this, now provide a kind of practical, robotization method for testing open/close machine, the method increases running and the detecting of firmware layer, and is cooperatively interacted by firmware layer and system layer and realize robotization.Namely this design can reduce the input of manpower, more can guarantee the accuracy of test result, add log collection function simultaneously, make the analysis of problem and location become more convenient.
Summary of the invention
Technical assignment of the present invention is for above weak point, provides a kind of practical, robotization method for testing open/close machine.
A kind of robotization method for testing open/close machine, its specific implementation process is:
At the firmware layer write automatic switching script of server, this script is written in BMC; At the operating system layer write test script of server;
Test is carried out, and BMC detects server state: when server is in off-mode, server is started shooting by BMC; When server is in off-mode, BMC does not do any action;
After server is started shooting by BMC, server enters operating system;
Test script runs, the resource status of record current system is in journal file, its recording frequency is that each start record is collected once, and verify, when the information of collecting after twice continuously start is different, then stop test, retain current environment, generation system bug check daily record, the resource status of said system comprises CPU, internal memory, hard disk, network card lamp state;
Automatic switching script under BMC continues to run, the potential state of sensor information, register information and each sensor being all arranged on server internal is collected after system enters operating system, and these information are saved in journal file, and when each start, information is verified, when twice information difference of collecting of starting shooting continuously, then generation error daily record, and automatically stop test;
The command triggers shutdown command of operating system, automatic switching script, by server automatic shutdown, moves in circles, and then checks the journal file of generation.
The described server realizing the method is all embedded BMC administration modules, and BMC has the linux server of ipmi instruction or the unix server of class linux.
The process of the write BMC of described automatic switching script is: automatic switching script uploads in BMC by SSH, started shooting by this BMC Control Server, the content in instruction crontab is performed again by linux periodical, the content performing shutdown is write in crontab by the mode of script, shuts down with Control Server.
Described test script is uploaded onto the server in operating system by USB flash disk or SSH.
Be provided with switching on and shutting down number of times or test duration in described test script, this switching on and shutting down number of times or test duration are starting to test pre-editing.
A kind of robotization method for testing open/close machine of the present invention, has the following advantages:
A kind of robotization method for testing open/close machine of this invention is a kind of full-automatic testing method, without the need to artificial guard, automatic record switching on and shutting down number of times and time, self recording apparatus state also verifies, namely the input of manpower can be reduced, more can guarantee the accuracy of test result, add log collection function simultaneously, make the analysis of problem and location become more convenient and accurate, and limitation is little, powerful, the demand of most of server switching on and shutting down test can be met, practicality is comparatively strong, applied widely, is easy to promote.
Accompanying drawing explanation
Accompanying drawing 1 is realization flow figure of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments, the invention will be further described.
The invention provides a kind of robotization method for testing open/close machine, as shown in Figure 1, its specific implementation process is:
At the firmware layer write automatic switching script sys_off_bmc_on.sh of server, this script is written in BMC, the content in instruction crontab is performed again by linux periodical, the content Linuxpoweroff.sh performing shutdown is write in crontab by the mode of script, shuts down with Control Server; At the operating system layer write test script of server;
Test is carried out, and BMC detects server state: when server is in off-mode, server is started shooting by BMC; When server is in off-mode, BMC does not do any action;
After server is started shooting by BMC, server enters operating system;
Test script runs, the resource status of record current system is in PoweroffLog.txt journal file, its recording frequency is that each start record is collected once, and verify, when the information of collecting after twice continuously start is different, then stop test, retain current environment, generation system bug check OScheckfail.log daily record, the resource status of said system comprises CPU, internal memory, hard disk, network card lamp state;
Automatic switching script under BMC continues to run, the potential state of sensor information, register information and each sensor being all arranged on server internal is collected after system enters operating system, and these information are saved in journal file poweron.log, and when each start, information is verified, when twice information difference of collecting of starting shooting continuously, then generation error daily record checkfail.log, and automatically stop test;
Triggered the shutdown command of automatic switching script under operating system by crontab, server is shut down, moves in circles, then check the journal file of generation.
The described server realizing the method is all embedded BMC administration modules, and BMC has the linux server of ipmi instruction or the unix server of class linux.
The process of the write BMC of described automatic switching script is: automatic switching script uploads in BMC by SSH, started shooting by this BMC Control Server, the content in instruction crontab is performed again by linux periodical, the content performing shutdown is write in crontab by the mode of script, shuts down with Control Server.
Described test script is uploaded onto the server in operating system by USB flash disk or SSH.
Be provided with switching on and shutting down number of times or test duration in described test script, this switching on and shutting down number of times or test duration are starting to test pre-editing.
Embodiment:
Run Script sys_off_bmc_on.sh under BMC is uploaded in BMC by SSH.
Increasing under script runs authority: BMC finds script to place path, performs chmod+x sys_off_bmc_on.sh.
Script Linuxpoweroff.sh under OS to be uploaded in OS/root/Desktop path under.
Write script under OS, setting Test Switchboard machine number of times or test duration vi Linuxpoweroff.sh.
Script under operation OS, namely performs ./Linuxpoweroff.sh, and start to test after system prompt " Do you want to start testing now [yes/no]: " input yes, equipment shuts down.
Script under operation BMC, namely performs ./sys_off_bmc_on.sh, and after equipment shutdown, BMC by device power-up, and exports " power on 1 ".
After end to be tested, under checking OS, whether there is OScheckfail.log file generated.
After end to be tested, under checking BMC, whether there is checkfail.log file generated.
If all generate without checkfail log under OS He under BMC, then test is passed through, if there is generation, then tests and does not pass through, relevant log(poweron.log, checkfail.log, PoweroffLog.txt, OScheckfail.log) need collect, be used for Debug.
Above-mentioned two scripts, namely the script under BMC and the script under operating system are in firmware aspect and system level running respectively, cooperatively interact the object reaching automatic test.Further, due to the high-availability mechanism of server itself, the fault on some hardware can not cause equipment downtime, verifies respectively in firmware aspect and system level, has both been conducive to case study and location, problem also can be avoided to omit simultaneously.In Linux environment, consider the stability that machine system runs, machine system reliability in use can be assessed more scientifically and more effectively, promote the total quality of the server product of company's development.
Above-mentioned embodiment is only concrete case of the present invention; scope of patent protection of the present invention includes but not limited to above-mentioned embodiment; claims of any a kind of robotization method for testing open/close machine according to the invention and the those of ordinary skill of any described technical field to its suitable change done or replacement, all should fall into scope of patent protection of the present invention.
Claims (5)
1. a robotization method for testing open/close machine, is characterized in that, its specific implementation process is:
At the firmware layer write automatic switching script of server, this script is written in BMC; At the operating system layer write test script of server;
Test is carried out, and BMC detects server state: when server is in off-mode, server is started shooting by BMC; When server is in off-mode, BMC does not do any action;
After server is started shooting by BMC, server enters operating system;
Test script runs, the resource status of record current system is in journal file, its recording frequency is that each start record is collected once, and verify, when the information of collecting after twice continuously start is different, then stop test, retain current environment, generation system bug check daily record, the resource status of said system comprises CPU, internal memory, hard disk, network card lamp state;
Automatic switching script under BMC continues to run, the potential state of sensor information, register information and each sensor being all arranged on server internal is collected after system enters operating system, and these information are saved in journal file, and when each start, information is verified, when twice information difference of collecting of starting shooting continuously, then generation error daily record, and automatically stop test;
The command triggers shutdown command of operating system, automatic switching script, by server automatic shutdown, moves in circles, and then checks the journal file of generation.
2. a kind of robotization method for testing open/close machine according to claim 1, is characterized in that, the described server realizing the method is all embedded BMC administration modules, and BMC has the linux server of ipmi instruction or the unix server of class linux.
3. a kind of robotization method for testing open/close machine according to claim 2, it is characterized in that, the process of the write BMC of described automatic switching script is: automatic switching script uploads in BMC by SSH, started shooting by this BMC Control Server, the content in instruction crontab is performed again by linux periodical, the content performing shutdown is write in crontab by the mode of script, shuts down with Control Server.
4. a kind of robotization method for testing open/close machine according to claim 2, it is characterized in that, described test script is uploaded onto the server in operating system by USB flash disk or SSH.
5. a kind of robotization method for testing open/close machine according to claim 4, is characterized in that, be provided with switching on and shutting down number of times or test duration in described test script, and this switching on and shutting down number of times or test duration are starting to test pre-editing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410679397.1A CN104375910A (en) | 2014-11-24 | 2014-11-24 | Automatic power-on and power-off test method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410679397.1A CN104375910A (en) | 2014-11-24 | 2014-11-24 | Automatic power-on and power-off test method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104375910A true CN104375910A (en) | 2015-02-25 |
Family
ID=52554846
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410679397.1A Pending CN104375910A (en) | 2014-11-24 | 2014-11-24 | Automatic power-on and power-off test method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104375910A (en) |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104850473A (en) * | 2015-05-11 | 2015-08-19 | 深圳国鑫恒宇技术有限公司 | Starting up test method of server in low temperature environment |
CN105260275A (en) * | 2015-10-27 | 2016-01-20 | 浪潮电子信息产业股份有限公司 | Startup and shutdown testing method suitable for automatic configuration partition of high-end host |
CN105335265A (en) * | 2015-12-10 | 2016-02-17 | 浪潮电子信息产业股份有限公司 | LINUX platform-based BMC upgrading and downgrading automatic testing method |
CN105335263A (en) * | 2015-11-10 | 2016-02-17 | 浪潮电子信息产业股份有限公司 | RMC out-of-band upgrading and downgrading automatic test method based on LINUX platform |
CN105912431A (en) * | 2016-04-01 | 2016-08-31 | 浪潮电子信息产业股份有限公司 | Reboot testing method of server, server, control device and system |
CN106055440A (en) * | 2016-05-31 | 2016-10-26 | 深圳市国鑫恒宇科技有限公司 | Testing method and system for realizing abnormal power failure of server through BMC |
CN107070747A (en) * | 2017-04-10 | 2017-08-18 | 广东浪潮大数据研究有限公司 | A kind of method of the automatic test network interface card network connection stability under network card binding pattern |
CN107229567A (en) * | 2017-06-09 | 2017-10-03 | 山东超越数控电子有限公司 | A kind of IPMI firmwares automatization test system |
CN107229545A (en) * | 2017-06-26 | 2017-10-03 | 郑州云海信息技术有限公司 | A kind of method of testing and system of linux system hardware detection |
CN107526663A (en) * | 2017-08-31 | 2017-12-29 | 郑州云海信息技术有限公司 | A kind of method for testing open/close machine cooperateed with based on outband management with operating system and system |
CN107844395A (en) * | 2017-11-16 | 2018-03-27 | 郑州云海信息技术有限公司 | A kind of reboot test control methods and system |
CN107943643A (en) * | 2017-11-28 | 2018-04-20 | 郑州云海信息技术有限公司 | One kind is based on MOC boards hardware DC test methods and system |
CN108051728A (en) * | 2017-11-28 | 2018-05-18 | 郑州云海信息技术有限公司 | One kind is based on MOC boards hardware AC test methods and system |
CN108089961A (en) * | 2017-11-28 | 2018-05-29 | 郑州云海信息技术有限公司 | One kind is based on MOC boards hardware reboot test methods and system |
CN108804269A (en) * | 2018-06-11 | 2018-11-13 | 郑州云海信息技术有限公司 | A kind of system and method controlling test RAID board stability based on domain |
CN109933466A (en) * | 2019-03-12 | 2019-06-25 | 深圳忆联信息***有限公司 | Solid-state hard disk controller test method and device based on Python |
CN110162434A (en) * | 2019-04-11 | 2019-08-23 | 深圳市同泰怡信息技术有限公司 | A kind of test fixture and its test method of server A C on-off |
CN112115011A (en) * | 2020-08-28 | 2020-12-22 | 浪潮电子信息产业股份有限公司 | Method, device and system for testing automatic sleep function in Linux system |
CN113900875A (en) * | 2021-11-23 | 2022-01-07 | 深圳市康冠商用科技有限公司 | Startup test method and device, computer equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101727368A (en) * | 2008-10-23 | 2010-06-09 | 英业达股份有限公司 | On/off test method and on/off test system |
US20110087452A1 (en) * | 2009-10-12 | 2011-04-14 | Quanta Computer Inc. | Test device |
CN102819474A (en) * | 2012-07-27 | 2012-12-12 | 曙光信息产业(北京)有限公司 | Test method and device for system operation |
CN103970660A (en) * | 2014-05-19 | 2014-08-06 | 浪潮电子信息产业股份有限公司 | Total system stability automatic test method based on crontab |
-
2014
- 2014-11-24 CN CN201410679397.1A patent/CN104375910A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101727368A (en) * | 2008-10-23 | 2010-06-09 | 英业达股份有限公司 | On/off test method and on/off test system |
US20110087452A1 (en) * | 2009-10-12 | 2011-04-14 | Quanta Computer Inc. | Test device |
CN102819474A (en) * | 2012-07-27 | 2012-12-12 | 曙光信息产业(北京)有限公司 | Test method and device for system operation |
CN103970660A (en) * | 2014-05-19 | 2014-08-06 | 浪潮电子信息产业股份有限公司 | Total system stability automatic test method based on crontab |
Cited By (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104850473A (en) * | 2015-05-11 | 2015-08-19 | 深圳国鑫恒宇技术有限公司 | Starting up test method of server in low temperature environment |
CN104850473B (en) * | 2015-05-11 | 2018-10-12 | 深圳市同泰怡信息技术有限公司 | A kind of startup test method of server at low ambient temperatures |
CN105260275A (en) * | 2015-10-27 | 2016-01-20 | 浪潮电子信息产业股份有限公司 | Startup and shutdown testing method suitable for automatic configuration partition of high-end host |
CN105335263A (en) * | 2015-11-10 | 2016-02-17 | 浪潮电子信息产业股份有限公司 | RMC out-of-band upgrading and downgrading automatic test method based on LINUX platform |
CN105335265A (en) * | 2015-12-10 | 2016-02-17 | 浪潮电子信息产业股份有限公司 | LINUX platform-based BMC upgrading and downgrading automatic testing method |
CN105912431A (en) * | 2016-04-01 | 2016-08-31 | 浪潮电子信息产业股份有限公司 | Reboot testing method of server, server, control device and system |
CN106055440A (en) * | 2016-05-31 | 2016-10-26 | 深圳市国鑫恒宇科技有限公司 | Testing method and system for realizing abnormal power failure of server through BMC |
CN106055440B (en) * | 2016-05-31 | 2019-08-20 | 深圳市同泰怡信息技术有限公司 | A kind of test method and system for realizing server exception power-off by BMC |
CN107070747A (en) * | 2017-04-10 | 2017-08-18 | 广东浪潮大数据研究有限公司 | A kind of method of the automatic test network interface card network connection stability under network card binding pattern |
CN107070747B (en) * | 2017-04-10 | 2020-05-19 | 苏州浪潮智能科技有限公司 | Device, system and method for automatically testing network card network connection stability in network card binding mode |
CN107229567A (en) * | 2017-06-09 | 2017-10-03 | 山东超越数控电子有限公司 | A kind of IPMI firmwares automatization test system |
CN107229545A (en) * | 2017-06-26 | 2017-10-03 | 郑州云海信息技术有限公司 | A kind of method of testing and system of linux system hardware detection |
CN107526663A (en) * | 2017-08-31 | 2017-12-29 | 郑州云海信息技术有限公司 | A kind of method for testing open/close machine cooperateed with based on outband management with operating system and system |
CN107844395A (en) * | 2017-11-16 | 2018-03-27 | 郑州云海信息技术有限公司 | A kind of reboot test control methods and system |
CN107844395B (en) * | 2017-11-16 | 2021-04-02 | 郑州云海信息技术有限公司 | Reboot test control method and system |
CN108051728A (en) * | 2017-11-28 | 2018-05-18 | 郑州云海信息技术有限公司 | One kind is based on MOC boards hardware AC test methods and system |
CN108089961A (en) * | 2017-11-28 | 2018-05-29 | 郑州云海信息技术有限公司 | One kind is based on MOC boards hardware reboot test methods and system |
CN107943643A (en) * | 2017-11-28 | 2018-04-20 | 郑州云海信息技术有限公司 | One kind is based on MOC boards hardware DC test methods and system |
CN108804269A (en) * | 2018-06-11 | 2018-11-13 | 郑州云海信息技术有限公司 | A kind of system and method controlling test RAID board stability based on domain |
CN109933466A (en) * | 2019-03-12 | 2019-06-25 | 深圳忆联信息***有限公司 | Solid-state hard disk controller test method and device based on Python |
CN109933466B (en) * | 2019-03-12 | 2021-06-08 | 深圳忆联信息***有限公司 | Python-based solid state hard disk controller test method and device |
CN110162434A (en) * | 2019-04-11 | 2019-08-23 | 深圳市同泰怡信息技术有限公司 | A kind of test fixture and its test method of server A C on-off |
CN112115011A (en) * | 2020-08-28 | 2020-12-22 | 浪潮电子信息产业股份有限公司 | Method, device and system for testing automatic sleep function in Linux system |
CN113900875A (en) * | 2021-11-23 | 2022-01-07 | 深圳市康冠商用科技有限公司 | Startup test method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104375910A (en) | Automatic power-on and power-off test method | |
CN110750396B (en) | Server operating system compatibility testing method and device and storage medium | |
US9158662B1 (en) | Automated operating system installation on multiple drives | |
CN104536875A (en) | IPMI-based method for carrying out automatic restart test on server | |
CN103973515A (en) | Network card stability testing method | |
CN105068900A (en) | Testing method for remote control server cold reboot | |
CN104572422A (en) | Memory monitoring achievement method based on startup and shutdown of Linux system | |
CN107076797B (en) | Testing semiconductor memory power consumption based on executed access commands | |
CN103744764A (en) | Crontab based whole computer memory stability test method | |
CN104615519A (en) | Method for detecting whether memory capacity of server is lost or not under LINUX system | |
US9542304B1 (en) | Automated operating system installation | |
RU2653336C1 (en) | Method of diagnostics of power supply failure in a wireless communication device | |
CN104391780A (en) | Method for automatically checking stability of power supply redundancy function of server | |
US20130191678A1 (en) | In situ processor re-characterization | |
CN105718340A (en) | Crontab-based CPU stability test method | |
CN104714863A (en) | Method for completely storing Raid card logs on basis of Linux operation system after system crashes | |
CN105354122A (en) | Function test optimization method for dual-purpose hard disk backboard of server | |
CN105743707A (en) | Method for testing BMC log analysis function based on Redhat system | |
CN103984613A (en) | Method for automatically testing floating point calculation performance of CPU (Central Processing Unit) | |
CN108572895B (en) | Stability test method for automatically checking software and hardware configuration under Linux | |
CN103984634A (en) | Memory unsteady state pressure test method of LINUX server | |
CN105760262A (en) | Method for cross-verifying hard disk stability based on dc and rebot under linux | |
WO2021056913A1 (en) | Fault locating method, apparatus and system based on i2c communication | |
TWI761653B (en) | Device and method for testing computer system | |
CN111858201A (en) | BMC (baseboard management controller) comprehensive test method, system, terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20150225 |
|
WD01 | Invention patent application deemed withdrawn after publication |