CN109240850A - Server DC Reboot test method under a kind of linux system - Google Patents
Server DC Reboot test method under a kind of linux system Download PDFInfo
- Publication number
- CN109240850A CN109240850A CN201810954930.9A CN201810954930A CN109240850A CN 109240850 A CN109240850 A CN 109240850A CN 201810954930 A CN201810954930 A CN 201810954930A CN 109240850 A CN109240850 A CN 109240850A
- Authority
- CN
- China
- Prior art keywords
- log
- reboot
- test
- server
- method under
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1438—Restarting or rejuvenating
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
Server DC Reboot test method under a kind of linux system proposed by the present invention, pass through perform script, can reboot operation repeatedly be carried out according to test specification and customer requirement automatically, whether monitoring system has the various fail information that report an error such as system hardware, starting self-test in restarting process each time in entire DC Reboot test process, and preserve, it is checked as in attachment insertion report convenient for subsequent analysis.The present invention realizes the DC Reboot test for exempting from AC/DC power source equipment;Various external equipments and space are saved, for example does not need socket and more outlet;It is on duty to be not required to very important person, whole scripts realize automation switching on and shutting down reboot operation and automatically save, remove test macro log.
Description
Technical field
The present invention relates to field of computer technology, server DC under more particularly to a kind of linux system
Reboot test method.
Background technique
With the arrival of big data era, as the server of computing platform core, reliability, stability just receive
Various tests.Due to the huge number of server, different properties, how to select reliable, stable server also becomes puzzlement use
One problem at family.
Currently, startup stage is easiest to transmission problem in the operational process of server.After server power-up,
The all devices of flyback retrace connection in systems, while can all devices be carried out with resource allocation and attempt to carry out all devices
Initialization action and self-checking behavior.The problems in very big product design can be exposed in this stage, open in server
It moves after completing and entering stable operation stage, the problems in many designs are not easy to reappear instead.Therefore, as long as frequent progress weight
Test is opened, allows system to be constantly scanned to all devices, resource allocation, initialization and self-checking behavior, so that it may compare appearance
It changes places the quality problems exposed in product design.
So server can be stable under repeated switching starting up, into system and successfully start up all systems
Unite software and hardware resources, finally can normal shutdown be the critically important index for measuring its stability and reliability.With
Toward we always need to arrange in pairs or groups DC/AC source carry out switching on and shutting down test.Carrying these tools may require that more space and electricity
Supply socket, and when test prototype quantity is on the high side or DC/AC source quantity is in short supply, we just can only passively wait, therefore
Research and development testing progress can be seriously affected.
Summary of the invention
In view of the above problems, the purpose of the present invention is to provide the test sides server DC Reboot under a kind of linux system
Method can carry out reboot operation repeatedly according to test specification and customer requirement, supervise in entire DC Reboot test process
Whether control system has the various fail information that report an error such as system hardware, starting self-test in restarting process each time, and preserves,
It is checked as in attachment insertion report convenient for subsequent analysis.
The present invention to achieve the above object, is achieved through the following technical solutions: server DC under a kind of linux system
Reboot test method, includes the following steps:
Step 1: logging in linux operating system with administrator root user;
Step 2: saving the test log in each restarting process;
Step 3: clearing up the test log in each restarting process;
Step 4: being restarted automatically primary system;
Step 5: opening task schedule, repeat dc reboot operation.
Further, the step 2 includes:
Step 21: generating file dc reboot at path/root/, and generate in dc reboot for saving test
The empty file of log;
Step 22: automatically grabbing test log, and will be in the test log write-in empty file.
Further, the test log includes: dmesg log, messages log and bmc log.
Further, the empty file includes: dmesg.txt, messages.txt and bmc.txt.
Further, the step 22 includes: to automatically grab dmesg log, and dmesg log is written in dmesg.txt;
Messages log is automatically grabbed, and messages log is written in messages.txt;Bmc log is automatically grabbed, and will
Bmc log is written in bmc.txt.
Further, the step 5 includes: to create task schedule by task dispatcher crontab.
Further, the step 5 further include: setting repeats the interval time of dc reboot operation.
Further, the interval time be greater than server from power on booting, into system until normal shutdown it is total when
It is long.
The prior art is compared, the beneficial effects of the invention are that: server DC under a kind of linux system proposed by the present invention
Reboot test method, by perform script, can automatically according to test specification and customer requirement carry out repeatedly restart behaviour
Make, whether monitoring system has system hardware, starting self-test in restarting process each time in entire DC Reboot test process
It etc. the various fail information that report an error, and preserves, is checked as in attachment insertion report convenient for subsequent analysis.
The present invention realizes the DC Reboot test for exempting from AC/DC power source equipment;Save various external set
Standby and space, for example do not need socket and more outlet;It is on duty to be not required to very important person, whole scripts realize automatic Switching
It machine reboot operation and automatically saves, remove test macro log.
It can be seen that compared with prior art, the present invention implementing with substantive distinguishing features outstanding and significant progress
Beneficial effect be also obvious.
Detailed description of the invention
Attached drawing 1 is flow chart of the method for the present invention.
Specific embodiment
It explains with reference to the accompanying drawing to a specific embodiment of the invention.
Server DC Reboot test method under a kind of linux system, which is characterized in that include the following steps.
Step 1: logging in linux operating system with administrator root user.
Step 2: saving the test log in each restarting process.
In step 2, specifically comprise the following steps:
Step 21: generating file dc reboot at path/root/, and generate in dc reboot for saving test
The empty file of log;
Step 22: automatically grabbing test log, and will be in the test log write-in empty file.
Step 3: clearing up the test log in each restarting process.
In above-mentioned steps, the test log includes: dmesg log, messages log and bmc log.It is described
Empty file includes: dmesg.txt, messages.txt and bmc.txt.Therefore, the step 22 specifically: automatically grab
Dmesg log, and dmesg log is written in dmesg.txt;Automatically grab messages log, and by messages log
It is written in messages.txt;Bmc log is automatically grabbed, and bmc log is written in bmc.txt.
Step 4: being restarted automatically primary system.
Step 5: opening task schedule, repeat dc reboot operation.
Task schedule is opened, specifically includes and task schedule is created by task dispatcher crontab.Repeated
Before dc reboot operation, need to set the interval time for repeating dc reboot operation.Moreover, the interval time is big
In server from power on booting, into system until normal shutdown total duration.
Server DC Reboot test method can by perform script under a kind of linux system proposed by the present invention
Automatically reboot operation repeatedly is carried out according to test specification and customer requirement, is monitored in entire DC Reboot test process
Whether system has the various fail information that report an error such as system hardware, starting self-test in restarting process each time, and preserves, and makees
To be checked in attachment insertion report convenient for subsequent analysis.
On the basis of the above, specific Program Realizing Method is as follows.
The preservation and cleaning of test log in 1 each restarting process:
DC Reboot test needs to carry out reboot operation repeatedly, especially reliability according to test specification and customer requirement
Test needs to be tested in high-low temperature incubator equipment.Need monitoring system every in entire DC Reboot test process
Whether there are the various fail information that report an error such as system hardware, starting self-test in restarting process, please preserve, be inserted as attachment
Enter and is checked in report convenient for subsequent analysis.Script logging and clear.sh then realizes this effect.
Script logging and clear.sh particular content is as follows:
#!/bin/bash
cat /var/log/dmesg >> /root/dc reboot/dmesg.txt
cat /var/log/messages >> /root/dc reboot/messages.txt
ipmitool sel elist>>/root/dc reboot/bmc.txt
>/var/log/dmesg
>/var/log/messages
ipmitool sel clear
/sbin/reboot
Above-mentioned script logging and clear.sh's is described as follows:
1.1 generate file dc reboot first at path/root/, then open this document folder, generate empty file
Dmesg.txt, messages.txt, bmc.txt are convenient for our test log of preservation.
System log dmesg and messages can be automatically grabbed out and replicated by 1.2 following front two row instructions is appended to text
It is last in part dmesg.txt, messages.txt.The bmc log of system can be automatically grabbed out and replicated and chased after by the third line
It is added to last in file bmc.txt
cat /var/log/dmesg >> /root/dc reboot/dmesg.txt
cat /var/log/messages> > /root/dc reboot/messages.txt
ipmitool sel elist>>/root/de reboot/bmc.txt
1.3 following three rows instructions realize dmesg, messages and the bmc log under clearing systems.
>/var/log/dmesg
>/var/log/messages
ipmitool sel clear
The effect of this instruction of 1.4/sbin/reboot is to be restarted automatically primary system after completing aforesaid operations.
2 open task schedule, and realization repeats dc reboot operation:
But script logging and clear.sh can only realize primary preservation, removes log and restart primary system;Nothing
Method realization repeatedly restarts repeatedly and saves each log.It can be realized at this time by task dispatcher crontab.
Therefore, crontab-e carriage return is inputted under system, is created task schedule, is inputted following code:
*/8 * * * * sh /root/logging and clear.sh
Preservation is exited.Wherein/8 represent the script logging and clear.sh of execution in every 8 minutes.Number 8 has to be larger than
Server from power on booting, into system until overall length normal shutdown this period, can modify according to the actual situation.
From above-described embodiment it is found that the present invention realizes the DC Reboot test for exempting from AC/DC power source equipment;
Various external equipments and space are saved, for example does not need socket and more outlet;It is on duty to be not required to very important person, whole feet
This realization automates switching on and shutting down reboot operation and automatically saves, removes test macro log.
With reference to the drawings and specific embodiments, the invention will be further described.It should be understood that these embodiments are merely to illustrate
The present invention rather than limit the scope of the invention.In addition, it should also be understood that, after reading the content taught by the present invention, this field
Technical staff can make various changes or modifications the present invention, and such equivalent forms equally fall within range defined herein.
Claims (8)
1. server DC Reboot test method under a kind of linux system, which comprises the steps of:
Step 1: logging in linux operating system with administrator root user;
Step 2: saving the test log in each restarting process;
Step 3: clearing up the test log in each restarting process;
Step 4: being restarted automatically primary system;
Step 5: opening task schedule, repeat dc reboot operation.
2. server DC Reboot test method under linux system according to claim 1, which is characterized in that the step
Rapid 2 include:
Step 21: generating file dc reboot at path/root/, and generate in dc reboot for saving test
The empty file of log;
Step 22: automatically grabbing test log, and will be in the test log write-in empty file.
3. server DC Reboot test method under linux system according to claim 1, which is characterized in that the survey
Trying log includes: dmesg log, messages log and bmc log.
4. server DC Reboot test method under linux system according to claim 2, which is characterized in that the sky
File includes: dmesg.txt, messages.txt and bmc.txt.
5. server DC Reboot test method under linux system according to claim 4, which is characterized in that the step
Rapid 22 include: to automatically grab dmesg log, and dmesg log is written in dmesg.txt;Messages log is automatically grabbed,
And messages log is written in messages.txt;Bmc log is automatically grabbed, and bmc log is written in bmc.txt.
6. server DC Reboot test method under linux system according to claim 1, which is characterized in that the step
Rapid 5 include: to create task schedule by task dispatcher crontab.
7. server DC Reboot test method under linux system according to claim 1, which is characterized in that the step
Rapid 5 further include: setting repeats the interval time of dc reboot operation.
8. server DC Reboot test method under linux system according to claim 1, it is characterised in that: between described
Every the time be greater than server from power on booting, into system until normal shutdown total duration.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810954930.9A CN109240850A (en) | 2018-08-21 | 2018-08-21 | Server DC Reboot test method under a kind of linux system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810954930.9A CN109240850A (en) | 2018-08-21 | 2018-08-21 | Server DC Reboot test method under a kind of linux system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109240850A true CN109240850A (en) | 2019-01-18 |
Family
ID=65070886
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810954930.9A Pending CN109240850A (en) | 2018-08-21 | 2018-08-21 | Server DC Reboot test method under a kind of linux system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109240850A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110581786A (en) * | 2019-09-10 | 2019-12-17 | 浪潮商用机器有限公司 | Method, device, system and medium for testing communication stability of NCSI (network communication service) network |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080201610A1 (en) * | 2007-02-20 | 2008-08-21 | Inventec Corporation | Integrated test method on multi-operating system platform |
CN103019920A (en) * | 2012-12-14 | 2013-04-03 | 浪潮电子信息产业股份有限公司 | Complete machine non-power-off startup and shutdown method based on Linux system |
CN103731663A (en) * | 2013-11-29 | 2014-04-16 | 乐视致新电子科技(天津)有限公司 | Method and device for testing smart television |
CN103970660A (en) * | 2014-05-19 | 2014-08-06 | 浪潮电子信息产业股份有限公司 | Total system stability automatic test method based on crontab |
CN104536860A (en) * | 2015-01-16 | 2015-04-22 | 浪潮电子信息产业股份有限公司 | Hard disk sequence marshalling method based on real-time JBOD monitoring mode |
CN104572422A (en) * | 2015-02-03 | 2015-04-29 | 浪潮电子信息产业股份有限公司 | Memory monitoring achievement method based on startup and shutdown of Linux system |
CN105608002A (en) * | 2015-12-17 | 2016-05-25 | 浪潮电子信息产业股份有限公司 | Method for simultaneously capturing all node information of Rack whole cabinet |
CN105718340A (en) * | 2016-01-13 | 2016-06-29 | 浪潮电子信息产业股份有限公司 | Crontab based CPU stability testing method |
CN106095680A (en) * | 2016-06-12 | 2016-11-09 | 浪潮电子信息产业股份有限公司 | A kind of out of order automated testing method of checking disk being applied to Linux |
CN107133147A (en) * | 2017-05-09 | 2017-09-05 | 郑州云海信息技术有限公司 | A kind of method that self-inspection is logged under the platform redhat systems based on OPenPower |
CN107168838A (en) * | 2017-05-16 | 2017-09-15 | 郑州云海信息技术有限公司 | A kind of RAID card Auto-Test System |
CN107220178A (en) * | 2017-05-26 | 2017-09-29 | 郑州云海信息技术有限公司 | A kind of method that server diagnostic test results quasi real time show |
CN107612775A (en) * | 2017-09-19 | 2018-01-19 | 郑州云海信息技术有限公司 | A kind of node two level connects the DC method of testings and system of server |
CN107766189A (en) * | 2017-10-13 | 2018-03-06 | 郑州云海信息技术有限公司 | Server restarts the method for testing of stability automatically under a kind of Windows systems |
-
2018
- 2018-08-21 CN CN201810954930.9A patent/CN109240850A/en active Pending
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080201610A1 (en) * | 2007-02-20 | 2008-08-21 | Inventec Corporation | Integrated test method on multi-operating system platform |
CN103019920A (en) * | 2012-12-14 | 2013-04-03 | 浪潮电子信息产业股份有限公司 | Complete machine non-power-off startup and shutdown method based on Linux system |
CN103731663A (en) * | 2013-11-29 | 2014-04-16 | 乐视致新电子科技(天津)有限公司 | Method and device for testing smart television |
CN103970660A (en) * | 2014-05-19 | 2014-08-06 | 浪潮电子信息产业股份有限公司 | Total system stability automatic test method based on crontab |
CN104536860A (en) * | 2015-01-16 | 2015-04-22 | 浪潮电子信息产业股份有限公司 | Hard disk sequence marshalling method based on real-time JBOD monitoring mode |
CN104572422A (en) * | 2015-02-03 | 2015-04-29 | 浪潮电子信息产业股份有限公司 | Memory monitoring achievement method based on startup and shutdown of Linux system |
CN105608002A (en) * | 2015-12-17 | 2016-05-25 | 浪潮电子信息产业股份有限公司 | Method for simultaneously capturing all node information of Rack whole cabinet |
CN105718340A (en) * | 2016-01-13 | 2016-06-29 | 浪潮电子信息产业股份有限公司 | Crontab based CPU stability testing method |
CN106095680A (en) * | 2016-06-12 | 2016-11-09 | 浪潮电子信息产业股份有限公司 | A kind of out of order automated testing method of checking disk being applied to Linux |
CN107133147A (en) * | 2017-05-09 | 2017-09-05 | 郑州云海信息技术有限公司 | A kind of method that self-inspection is logged under the platform redhat systems based on OPenPower |
CN107168838A (en) * | 2017-05-16 | 2017-09-15 | 郑州云海信息技术有限公司 | A kind of RAID card Auto-Test System |
CN107220178A (en) * | 2017-05-26 | 2017-09-29 | 郑州云海信息技术有限公司 | A kind of method that server diagnostic test results quasi real time show |
CN107612775A (en) * | 2017-09-19 | 2018-01-19 | 郑州云海信息技术有限公司 | A kind of node two level connects the DC method of testings and system of server |
CN107766189A (en) * | 2017-10-13 | 2018-03-06 | 郑州云海信息技术有限公司 | Server restarts the method for testing of stability automatically under a kind of Windows systems |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110581786A (en) * | 2019-09-10 | 2019-12-17 | 浪潮商用机器有限公司 | Method, device, system and medium for testing communication stability of NCSI (network communication service) network |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102314388B (en) | Method for testing server supporting intelligent platform management interface | |
Maji et al. | Mitigating interference in cloud services by middleware reconfiguration | |
US20130311827A1 (en) | METHOD and APPARATUS for automatic testing of automation software | |
CN107612775A (en) | A kind of node two level connects the DC method of testings and system of server | |
CN103106128A (en) | Cold startup switch machine test method and cold starting switch machine test system | |
CN104391780A (en) | Method for automatically testing stability of redundancy function of power supply of server | |
CN111382055B (en) | Automatic unit testing method and device based on unified description language | |
CN103257922A (en) | Method for quickly testing reliability of BIOS (basic input output system) and OS (operating system) interface codes | |
Gupta et al. | Mining energy traces to aid in software development: An empirical case study | |
Mooney | Issues in the specification and measurement of software portability | |
CN108519951A (en) | Three node BIOS continuous integratings platforms of one kind and method | |
CN108121842B (en) | Method and device for verifying low-power-consumption working mode of multiprocessor system chip | |
CN106445787B (en) | Method and device for monitoring server core dump file and electronic equipment | |
CN109240850A (en) | Server DC Reboot test method under a kind of linux system | |
CN110750445A (en) | Method, system and equipment for testing high-availability function of YARN component | |
CN105183598A (en) | Reliability test method of server complete machine in cloud computing ecosystem | |
CN111290942A (en) | Pressure testing method, device and computer readable medium | |
US20110087922A1 (en) | Test method and tool for master-slave systems on multicore processors | |
CN102053888A (en) | Self-checking method and system for arithmetic device | |
CN105912431A (en) | Reboot testing method of server, server, control device and system | |
Garousi | Traffic-aware stress testing of distributed real-time systems based on UML models in the presence of time uncertainty | |
CN103559134A (en) | Configuration method and device for benchmark test component | |
CN107870840A (en) | The multiple test instruction automatic execution methods of server based on IPMI | |
CN112003727A (en) | Multi-node server power supply testing method, system, terminal and storage medium | |
CN111930502A (en) | Server management method, device, equipment and storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190118 |