CN107451043A - A kind of detection method and device of server stability - Google Patents

A kind of detection method and device of server stability Download PDF

Info

Publication number
CN107451043A
CN107451043A CN201710706653.5A CN201710706653A CN107451043A CN 107451043 A CN107451043 A CN 107451043A CN 201710706653 A CN201710706653 A CN 201710706653A CN 107451043 A CN107451043 A CN 107451043A
Authority
CN
China
Prior art keywords
detected
server
unit
running parameter
project
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
Application number
CN201710706653.5A
Other languages
Chinese (zh)
Inventor
范鹏飞
李波
李光达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710706653.5A priority Critical patent/CN107451043A/en
Publication of CN107451043A publication Critical patent/CN107451043A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3433Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment for load management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a kind of detection method and device of server stability, this method includes:Load pressure-applying unit is set in server to be detected;According to the load pressure-applying unit, pressurized treatments are carried out to the server to be detected;The server to be detected after control pressurized treatments is restarted;Running parameter of the server to be detected in restarting process is monitored, the running parameter comprises at least:Attribute information corresponding at least one project to be detected restarted in duration and the server to be detected of the server to be detected;According to the running parameter monitored in the restarting process, the stability of the server to be detected is determined.This programme can improve the accuracy rate of Detection of Stability.

Description

A kind of detection method and device of server stability
Technical field
The present invention relates to field of computer technology, more particularly to a kind of detection method and device of server stability.
Background technology
With the development of computer, equipment of the server as can quickly handle mass data, increasingly by enterprise and Individual payes attention to.Before server dispatches from the factory, producer can be tested the stability of server, to determine the quality of server.
At present, when the stability to server is tested, carried out under server Light Condition.Specifically Ground, staff are restarted to server, not opened in the process after the operating system of server is started again immediately Any program of dynamic server.After repeatedly being restarted to server, according in restarting process server break down situation, Determine the stability of server.
Because server is loaded in actual use, therefore by above-mentioned method of testing to the steady of server Qualitative when being tested, accuracy rate is relatively low.
The content of the invention
The embodiments of the invention provide a kind of detection method and device of server stability, can improve and server is carried out The accuracy rate of stability test.
In a first aspect, the embodiments of the invention provide a kind of detection method of server stability, including:
Load pressure-applying unit is set in server to be detected;
According to the load pressure-applying unit, pressurized treatments are carried out to the server to be detected;
The server to be detected after control pressurized treatments is restarted;
Running parameter of the server to be detected in restarting process is monitored, the running parameter comprises at least:It is described Attribute information corresponding at least one project to be detected restarted in duration and the server to be detected of server to be detected;
According to the running parameter monitored in the restarting process, the stability of the server to be detected is determined.
Preferably,
This method further comprises:
The number of starts of the server to be detected is set;
Record the server to be detected restarts number;
It is described that the stability of the server to be detected is determined according to the running parameter detected in the restarting process, Including:
When it is described restart number and be less than the number of starts when, according to the load pressure-applying unit, to the clothes to be detected Business device carries out pressurized treatments;And the server to be detected after control pressurized treatments is restarted;
When it is described restart number it is equal with the number of starts when, joined according to the work that is monitored in each restarting process Number, determine the stability of the server to be detected.
Preferably,
It is described according to the load pressure-applying unit, pressurized treatments, and the control are carried out to the server to be detected The server to be detected after pressurized treatments is restarted, including:
At least one pressurization protocols and pressurization timer included according to the load pressure-applying unit, it is determined that described treat At least one target program corresponding with least one pressurization protocols in detection service device;
Control at least one target program to be started, and using it is described pressurization timer record it is described at least one The run time of target program;
When the pressurization timer expiry, the server to be detected is controlled to be restarted.
Preferably,
It is described when it is described restart number it is equal with the number of starts when, according to being monitored in the restarting process Running parameter, the stability of the server to be detected is determined, including:
For the running parameter monitored in each restarting process, the following steps are performed:
A1:Restart duration described in being parsed from the running parameter, restart whether duration is less than default threshold described in judgement Value, if it is, performing A2, otherwise report an error;
A2:Attribute information corresponding at least one project to be detected is parsed from the running parameter, according to pre- If at least one project to be detected corresponding to reference information, judge whether corresponding at least one project to be detected Attribute information differs with corresponding reference information, if it is, reporting an error;
It is determined that the number that always reports an error;
According to the number that always reports an error, the stability of the server to be detected is determined.
Preferably,
When attribute information corresponding at least one project to be detected be present and corresponding reference information differs, Further comprise:
At least one failure project is determined, exports attribute information corresponding to the failure project.
Preferably,
Further comprise:Set start-up mode to change file, file is changed using the start-up mode, will be described to be detected The startup interface of server is revised as Command Line Interface;
The server to be detected after the control pressurized treatments is restarted, including:
The server to be detected after the pressurized treatments is controlled by the Command Line Interface, into exempting from login mode;
It is described exempt from login mode under, start the operating system of the server to be detected.
Second aspect, the embodiments of the invention provide a kind of detection means of server stability, including:Setting unit, Restart unit and processing unit;Wherein,
The setting unit, for setting load pressure-applying unit in server to be detected;
It is described to restart unit, for the load pressure-applying unit set according to the setting unit, to the service to be detected Device carries out pressurized treatments, and controls the server to be detected after pressurized treatments to be restarted;
The processing unit, for monitoring running parameter of the server to be detected in restarting process, the work Parameter comprises at least:At least one item to be detected restarted in duration and the server to be detected of the server to be detected Attribute information corresponding to mesh;According to the running parameter monitored in the restarting process, the server to be detected is determined Stability.
Preferably,
The setting unit, it is further used for setting the number of starts of the server to be detected;
The processing unit, restart number for record the server to be detected;Restart number when described and be less than institute When stating the number of starts, according to the load pressure-applying unit, pressurized treatments are carried out to the server to be detected;And control pressurization The server to be detected after processing is restarted;When it is described restart number it is equal with the number of starts when, according to each The running parameter monitored in restarting process, determine the stability of the server to be detected.
Preferably,
It is described to restart unit, at least one pressurization protocols included according to the load pressure-applying unit and pressurization Timer, determine at least one target program corresponding with least one pressurization protocols in the server to be detected;Control Make at least one target program to be started, and at least one target program is recorded using the pressurization timer Run time;When the pressurization timer expiry, the server to be detected is controlled to be restarted.
Preferably,
The processing unit includes:First judgment sub-unit, the second judgment sub-unit and detection sub-unit;Wherein,
First judgment sub-unit, for the running parameter for being monitored in each restarting process, it is performed both by: Restart duration described in being parsed from the running parameter, restart whether duration is less than predetermined threshold value described in judgement, if it is, Second judgment sub-unit is triggered, is otherwise reported an error;
Second judgment sub-unit, for when receiving the triggering of first judgment sub-unit, from the work Attribute information corresponding at least one project to be detected is parsed in parameter, according to default at least one project to be detected Corresponding reference information, judge whether attribute information corresponding at least one project to be detected and corresponding reference Information differs, if it is, reporting an error;
The detection sub-unit, for reporting an error time according to first judgment sub-unit and second judgment sub-unit Number, it is determined that the number that always reports an error, and according to the number that always reports an error, determine the stability of the server to be detected.
Preferably,
The setting unit, it is further used for setting start-up mode to change file, and utilizes start-up mode modification text Part, the startup interface of the server to be detected is revised as Command Line Interface;
It is described to restart unit, for controlling the server to be detected after the pressurized treatments by the Command Line Interface, Into exempting from login mode;It is described exempt from login mode under, start the operating system of the server to be detected.
The embodiments of the invention provide a kind of detection method and device of server stability, by server to be detected It is middle that load pressure-applying unit is set, and according to default load pressure-applying unit, treat detection service device and carry out pressurized treatments, then control Server to be detected after pressurized treatments processed is restarted.In restarting process, the running parameter of server to be detected, root are monitored According to the running parameter monitored in restarting process, the stability of server to be detected is determined.Thus achieve in load pressurization bar The stability of server is detected under part, more meets the actual service conditions of server, server is entered so as to improve The accuracy rate of row stability test.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis These accompanying drawings obtain other accompanying drawings.
Fig. 1 is a kind of flow chart of the detection method for server stability that one embodiment of the invention provides;
Fig. 2 is a kind of flow chart of the detection method for server stability that another embodiment of the present invention provides;
Fig. 3 is a kind of flow chart of the detection method for server stability that another embodiment of the invention provides;
Fig. 4 is a kind of structural representation of the detection means for server stability that one embodiment of the invention provides;
Fig. 5 is a kind of structural representation of the detection means for server stability that another embodiment of the present invention provides.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, rather than whole embodiments, based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained on the premise of creative work is not made, belongs to the scope of protection of the invention.
As shown in figure 1, the embodiments of the invention provide a kind of detection method of server stability, this method can include Following steps:
Step 101:Load pressure-applying unit is set in server to be detected;
Step 102:According to the load pressure-applying unit, pressurized treatments are carried out to the server to be detected;
Step 103:The server to be detected after control pressurized treatments is restarted;
Step 104:Running parameter of the server to be detected in restarting process is monitored, the running parameter at least wraps Include:Belong to corresponding at least one project to be detected restarted in duration and the server to be detected of the server to be detected Property information;
Step 105:According to the running parameter monitored in the restarting process, the steady of the server to be detected is determined It is qualitative.
In above-described embodiment, add by setting load pressure-applying unit in server to be detected, and according to default load Component is pressed, detection service device is treated and carries out pressurized treatments, then control the server to be detected after pressurized treatments to be restarted. In restarting process, the running parameter of server to be detected is monitored, according to the running parameter monitored in restarting process, is determined to be checked Survey the stability of server.Thus achieve and the stability of server is detected in the case where loading pressurized conditions, more meet clothes The actual service conditions of business device, so as to improve the accuracy rate that stability test is carried out to server.
In one embodiment of the invention, this method may further include:The startup time of the server to be detected is set Number;Record the server to be detected restarts number;
Then the embodiment of step 105 can include:When it is described restart number and be less than the number of starts when, according to The load pressure-applying unit, pressurized treatments are carried out to the server to be detected;It is and described to be checked after control pressurized treatments Server is surveyed to be restarted;
When it is described restart number it is equal with the number of starts when, joined according to the work that is monitored in each restarting process Number, determine the stability of the server to be detected.
Based on this, the method in the present embodiment may comprise steps of:
Step 201:Load pressure-applying unit is set in server to be detected, and the startup of the server to be detected is set Number;
Step 202:According to the load pressure-applying unit, pressurized treatments are carried out to the server to be detected, and control and add The server to be detected after pressure processing is restarted;
Step 203:Running parameter of the server to be detected in restarting process is monitored, and records the clothes to be detected Business device restarts number;
Step 204:Restart whether number is not less than the number of starts described in judgement, if it is, performing step 205; Otherwise step 202 is performed;
Step 205:According to the running parameter monitored in each restarting process, the server to be detected is determined Stability.
In above-described embodiment, add by setting load pressure-applying unit in server to be detected, and according to default load Component is pressed, detection service device is treated and carries out pressurized treatments, then control the server to be detected after pressurized treatments to be restarted. In restarting process, the running parameter of server to be detected is monitored, and record server to be detected restarts number, is circulated with this, Until server to be detected is when restarting number and reaching the default number of starts, according to the work monitored in each restarting process Parameter, determine the stability of server to be detected.Thus achieve and the stability of server is carried out in the case where loading pressurized conditions Detection, more meet the actual service conditions of server, so as to improve the accuracy rate that stability test is carried out to server.
Specifically, in one embodiment of the invention, the embodiment of step 102 and step 103, can include:
At least one pressurization protocols and pressurization timer included according to the load pressure-applying unit, it is determined that described treat At least one target program corresponding with least one pressurization protocols in detection service device;
Control at least one target program to be started, and using it is described pressurization timer record it is described at least one The run time of target program;
When the pressurization timer expiry, the server to be detected is controlled to be restarted.
For example, the pressurization protocols that load pressure-applying unit includes have audio program A and video program B, pressing time For 500ms, then after server to be detected is started for the first time, start audio program A and video journey in server to be detected Sequence B, and audio program A and video program B run time are recorded, when audio program A and video program B run time reach During 500ms, in the case where keeping audio program A and video program B to be in starting state, server to be detected is controlled to be restarted.By This can control server to be detected when restarting every time, load according to the pressurization protocols in load pressurization establishment and pressing time Amount of pressurization is identical, so as to further increase the accuracy rate of stability test.
In one embodiment of the invention, it is described when it is described restart number it is equal with the number of starts when, according to described heavy The running parameter monitored during opening, the stability of the server to be detected is determined, can be included:
For the running parameter monitored in each restarting process, the following steps are performed:
A1:Restart duration described in being parsed from the running parameter, restart whether duration is less than default threshold described in judgement Value, if it is, performing A2, otherwise report an error;
A2:Attribute information corresponding at least one project to be detected is parsed from the running parameter, according to pre- If at least one project to be detected corresponding to reference information, judge whether corresponding at least one project to be detected Attribute information differs with corresponding reference information, if it is, reporting an error;
It is determined that the number that always reports an error;
According to the number that always reports an error, the stability of the server to be detected is determined.
Herein, for the running parameter monitored in restarting process each time, weight is parsed from running parameter first Duration is opened, and judges that this restarts whether duration is less than predetermined threshold value, when the duration is more than predetermined threshold value, is illustrated in restarting process In be likely to occur failure, it is longer to cause to restart duration, illustrates server to be detected in multiple restarting process, performance is unstable It is fixed, now then reported an error.
When length is less than predetermined threshold value when re-launched, then parsed from running parameter corresponding at least one project to be detected Attribute information, and according to the reference information of default at least one project to be detected, further determine whether item to be detected be present Attribute information corresponding to mesh from its corresponding to reference information it is different, if in the presence of illustrating that some projects to be detected were being restarted Occur mistake in journey, also reported an error.For example, the running parameter in restarting process is presented by log daily records, in the log daily records The attribute information of each project to be detected is stored, by the attribute information of each project to be detected and the reference information that prestores one by one Contrasted, mistake occur so as to accurately determine whether to exist project to be detected.
According to each error information, it is determined that the number that always reports an error, and according to the number that always reports an error, determine the steady of server to be detected It is qualitative.For example, when setting the number of starts as 1000 times, the number that always reports an error is less than 5, you can it is stable to determine server to be detected 's.According to the percentage always to report an error between number and the number of starts, the stability of to be detected server can be determined.Thus can be right Each project to be detected in server to be detected and duration corresponding to restarting are detected, steady so as to further increase The accuracy rate of qualitative test.
In one embodiment of the invention, when exist attribute information corresponding at least one project to be detected with it is corresponding Reference information when differing, further comprise:
At least one failure project is determined, exports attribute information corresponding to the failure project.
In the present embodiment, when determine to exist attribute information corresponding to project to be detected with its corresponding to reference information When differing, then the project to be detected that attribute information and reference information differ is defined as failure project, and export the failure Attribute information corresponding to project, it is easy to staff to be taken appropriate measures, according to this attribute information to improve service to be detected The stability of device, thus improves Consumer's Experience.
In order to improve Detection of Stability efficiency, in one embodiment of the invention, may further include:Start-up mode is set File is changed, file is changed using the start-up mode, the startup interface of the server to be detected is revised as order line circle Face;
The embodiment of step 103, it can include:
The server to be detected after the pressurized treatments is controlled by the Command Line Interface, into exempting from login mode;
It is described exempt from login mode under, start the operating system of the server to be detected.
Because the operating system of server is the system with interface, generally, after the system login with interface Can typically give tacit consent into graphical interfaces pattern, under graphical interfaces pattern, it is necessary to input user name corresponding with the server and Password could normally start server.In the present embodiment, file is changed by the start-up mode pre-set, by clothes to be detected The startup interface of business device is revised as Command Line Interface.Then when controlling server to be detected to be restarted, clothes to be detected are can control Device be engaged in by Command Line Interface, into login mode is exempted from, i.e., need not input username and password corresponding to server to be detected again, Server to be detected can normally be started, so as to shorten the time of Server Restart, and then improve Detection of Stability efficiency.
For example, in the server, there are individual inttab files under/etc/ files, this file is responsible for log-in interface pattern Setting, when id be 5 when, acquiescence log-in interface is graphical interfaces pattern;When id is 3, acquiescence log-in interface is order line circle Surface model.Then by changing this file start-up mode can be set to change file.
Specifically, opening/etc/inittab files:#vim/etc/inittab, last column id:5: Initdefault makes id into:3:Initdefault, this process can at least be realized by following program language:
#Default runlevel.The runlevels used are:
#0-halt(Do NOT set initdefault to this)
#1-Single user mode
#2-Multiuser,without NFS(The same as 3,if you do not have networking)
#3-Full multiuser mode
#4-unused
#5-X11
#6-reboot(Do NOT set initdefault to this)
#
Id 3initdefault
“/etc/inittab”26L,8884C
Meanwhile the tty.conf files in modification/etc/init/ files, the input of exempting from that server can be achieved log in, and have Body, opening/etc/init/tty.conf files:#vim/etc/init/tty.conf, add behind text last column It is upper -- autologin root, then preserve and close.This process can at least be realized by following program language:
#This service maintains a getty on the specified device.
Stop on runlevel1[S016]
Respawn
Instance STTY
Exec/sbin/mingetty STTY–autologin root.
As shown in figure 3, the embodiments of the invention provide a kind of detection method of server stability, this method can include Following steps:
Step 301:Load pressure-applying unit is set in server to be detected, and the startup of the server to be detected is set Number.
When setting the load pressure-applying unit of server, it can be set automatic running is carried out after startup of server, this can Pass through finally being instructed plus pressure program for the hidden file .bashrc under file/root/.Specifically, can pass through Following procedure language is realized:
#.bashrc
#User specific aliases and functions
Alias rm=' rm-I '
Alias cp=' cp-I '
Alias mv=' mv-I '
#Source global definitions
If[-f/etc/bashrc];then
./etc/bashrc
Fi
Fio/root/reboot/random_stress.dat
Step 302:Set start-up mode to change file, file is changed using the start-up mode, by the clothes to be detected The startup interface of business device is revised as Command Line Interface.
For example, opening/etc/inittab files can be passed through:#vim/etc/inittab, last column id:5: Initdefault makes id into:3:Initdefault, the startup interface of server is revised as Command Line Interface.Specifically, may be used Realized by following program language:
#Default runlevel.The runlevels used are:
#0-halt(Do NOT set initdefault to this)
#1-Single user mode
#2-Multiuser,without NFS(The same as 3,if you do not have networking)
#3-Full multiuser mode
#4-unused
#5-X11
#6-reboot(Do NOT set initdefault to this)
#
Id 3initdefault
“/etc/inittab”26L,8884C
Step 303:At least one pressurization protocols and pressurization timer included according to the load pressure-applying unit, really At least one target program corresponding with least one pressurization protocols in the fixed server to be detected;
For example, the pressurization protocols that include of load pressure-applying unit have audio program A and video program B, pressing time is 500ms, then using the audio program A in server to be detected and video program B as target program.
Step 304:Control at least one target program to start, and pressurizeed using described described in timer record at least The run time of one target program.
Herein, when audio program A and video program B run time reach 500ms, keep audio program A and Video program B is under starting state, controls server to be detected to be restarted.
Step 305:When the pressurization timer expiry, the server to be detected after the pressurized treatments is controlled to pass through institute Command Line Interface is stated, into exempting from login mode;It is described exempt from login mode under, start the server to be detected.
For example, can by the tty.conf files in modification/etc/init/ files, realize server exempt from it is defeated Enter to log in, specifically, opening/etc/init/tty.conf files:#vim/etc/init/tty.conf, text last Row adds below -- and autologin root, then preserve and close.This process can at least be realized by following program language:
#This service maintains a getty on the specified device.
Stop on runlevel1[S016]
Respawn
Instance STTY
Exec/sbin/mingetty STTY–autologin root.
Step 306:Running parameter of the server to be detected in restarting process is monitored, and records the clothes to be detected Business device restarts number.
For example, running parameter can comprise at least restarting in duration and the server to be detected extremely for server to be detected Attribute information corresponding to a few project to be detected.
Step 307:Restart whether number is not less than the number of starts described in judgement, if it is, performing step 308; Otherwise step 303 is performed.
Step 308:For the running parameter monitored in each restarting process, it is performed both by:From the running parameter In parse and restart duration, judge whether the duration is less than predetermined threshold value, if it is, performing step 309, otherwise perform step Rapid 310.
For the running parameter monitored in restarting process each time, parsed from running parameter restart duration first, And judge that this restarts whether duration is less than predetermined threshold value, when this, which restarts duration, is more than predetermined threshold value, illustrate in restarting process Failure has been likely to occur, it is longer to cause to restart duration, illustrates server to be detected in multiple restarting process, and performance is unstable, Now then reported an error.
Step 309:Attribute information corresponding at least one project to be detected is parsed from the running parameter, according to pre- If at least one project to be detected corresponding to reference information, judge whether corresponding at least one project to be detected Attribute information differs with corresponding reference information, if it is, performing step 310, otherwise performs step 311.
When duration corresponding to restarting process is less than predetermined threshold value, then parsed from running parameter at least one to be detected Attribute information corresponding to project, and according to the reference information of default at least one project to be detected, further determine whether to deposit Attribute information corresponding to project to be detected from its corresponding to reference information it is different, if in the presence of illustrating some items to be detected There is mistake in restarting process in mesh, is also reported an error.
Step 310:Reported an error.
Step 311:It is determined that the number that always reports an error, according to the number that always reports an error, the stabilization of the server to be detected is determined Property.
For example, when setting the number of starts as 1000 times, the number that always reports an error is less than 5, you can it is steady to determine server to be detected Fixed.According to the percentage always to report an error between number and the number of starts, the stability of to be detected server can be determined.
Method in the present embodiment can at least be realized by following procedure:
[global]
Direct=1
Ioengine=libaio
Time_based=1
End_fsync=1
Ramp_time=120
Norandommap=1
Randrepeat=0
Log_avg_msec=500
Bwavgtime=500
Filename=/dev/sda3
Filename=/dev/sdb
[random stress]
Numjobs=4
Iodepth=32
Rw=randrw
Bs=4k
Runtime=1000
Rwmixread=50
As shown in figure 4, the embodiments of the invention provide a kind of detection means of server stability, including:Setting unit 401st, unit 402 and processing unit 403 are restarted;Wherein,
The setting unit 401, for setting load pressure-applying unit in server to be detected;
It is described to restart unit 402, for the load pressure-applying unit set according to the setting unit 401, to described to be checked Survey server and carry out pressurized treatments, and control the server to be detected after pressurized treatments to be restarted;
The processing unit 403, for monitoring running parameter of the server to be detected in restarting process, the work Comprised at least as parameter:Restarting for the server to be detected is at least one to be detected in duration and the server to be detected Attribute information corresponding to project;According to the running parameter monitored in the restarting process, the service to be detected is determined The stability of device.
In above-described embodiment, add by setting load pressure-applying unit in server to be detected, and according to default load Component is pressed, detection service device is treated and carries out pressurized treatments, then control the server to be detected after pressurized treatments to be restarted. In restarting process, the running parameter of server to be detected is monitored, according to the running parameter monitored in restarting process, is determined to be checked Survey the stability of server.Thus achieve and the stability of server is detected in the case where loading pressurized conditions, more meet clothes The actual service conditions of business device, so as to improve the accuracy rate that stability test is carried out to server.
In one embodiment of the invention, the processing unit, number is restarted for record the server to be detected;When It is described when restarting number and being less than the number of starts, according to the load pressure-applying unit, the server to be detected is added Pressure processing;And the server to be detected after control pressurized treatments is restarted;Restart number and the startup when described When number is equal, according to the running parameter monitored in each restarting process, the stability of the server to be detected is determined.
In above-described embodiment, add by setting load pressure-applying unit in server to be detected, and according to default load Component is pressed, detection service device is treated and carries out pressurized treatments, then control the server to be detected after pressurized treatments to be restarted. In restarting process, the running parameter of server to be detected is monitored, and record server to be detected restarts number, is circulated with this, Until server to be detected is when restarting number and reaching the default number of starts, according to the work monitored in each restarting process Parameter, determine the stability of server to be detected.Thus achieve and the stability of server is carried out in the case where loading pressurized conditions Detection, more meet the actual service conditions of server, so as to improve the accuracy rate that stability test is carried out to server.
Specifically, it is described to restart unit 402 in one embodiment of the invention, for according in the load pressure-applying unit Including at least one pressurization protocols and pressurization timer, determine in the server to be detected with least one pressurization At least one target program corresponding to program;At least one target program is controlled to be started, and it is fixed using the pressurization When device record the run time of at least one target program;When the pressurization timer expiry, control is described to be detected Server is restarted.
For example, the pressurization protocols that load pressure-applying unit includes have audio program A and video program B, pressing time For 500ms, then after server to be detected is started for the first time, start audio program A and video journey in server to be detected Sequence B, and audio program A and video program B run time are recorded, when audio program A and video program B run time reach During 500ms, in the case where keeping audio program A and video program B to be in starting state, server to be detected is controlled to be restarted.By This can control server to be detected when restarting every time, load according to the pressurization protocols in load pressurization establishment and pressing time Amount of pressurization is identical, so as to further increase the accuracy rate of stability test.
As shown in figure 5, in one embodiment of the invention, the processing unit 403 includes:First judgment sub-unit 501, Two judgment sub-units 502 and detection sub-unit 503;Wherein,
First judgment sub-unit 501, for the running parameter for being monitored in each restarting process, hold OK:Restart duration described in being parsed from the running parameter, restart whether duration is less than predetermined threshold value described in judgement, if It is then to trigger second judgment sub-unit 502, otherwise reports an error;
Second judgment sub-unit 502, for when receiving the triggering of first judgment sub-unit 501, from institute State and attribute information corresponding at least one project to be detected is parsed in running parameter, according to default at least one to be checked Reference information corresponding to survey project, judge whether attribute information corresponding at least one project to be detected with it is corresponding Reference information differ, if it is, reporting an error;
The detection sub-unit 503, for according to first judgment sub-unit 501 and second judgment sub-unit 502 number that reports an error, it is determined that the number that always reports an error, and according to the number that always reports an error, determine the stabilization of the server to be detected Property.
Herein, for the running parameter monitored in restarting process each time, weight is parsed from running parameter first Duration is opened, and judges that this restarts whether duration is less than predetermined threshold value, when the duration is more than predetermined threshold value, is illustrated in restarting process In be likely to occur failure, it is longer to cause to restart duration, illustrates server to be detected in multiple restarting process, performance is unstable It is fixed, now then reported an error.
When length is less than predetermined threshold value when re-launched, then parsed from running parameter corresponding at least one project to be detected Attribute information, and according to the reference information of default at least one project to be detected, further determine whether item to be detected be present Attribute information corresponding to mesh from its corresponding to reference information it is different, if in the presence of illustrating that some projects to be detected were being restarted Occur mistake in journey, also reported an error.For example, the running parameter in restarting process is presented by log daily records, in the log daily records The attribute information of each project to be detected is stored, by the attribute information of each project to be detected and the reference information that prestores one by one Contrasted, mistake occur so as to accurately determine whether to exist project to be detected.
According to each error information, it is determined that the number that always reports an error, and according to the number that always reports an error, determine the steady of server to be detected It is qualitative.For example, when setting the number of starts as 1000 times, the number that always reports an error is less than 5, you can it is stable to determine server to be detected 's.According to the percentage always to report an error between number and the number of starts, the stability of to be detected server can be determined.Thus can be right Each project to be detected in server to be detected and duration corresponding to restarting are detected, steady so as to further increase The accuracy rate of qualitative test.
In one embodiment of the invention, second judgment sub-unit 502, it is further used for working as and judges there is at least one When attribute information corresponding to the individual project to be detected differs with corresponding reference information, at least one failure item is determined Mesh, export attribute information corresponding to the failure project.
In the present embodiment, when determine to exist attribute information corresponding to project to be detected with its corresponding to reference information When differing, then the project to be detected that attribute information and reference information differ is defined as failure project, and export the failure Attribute information corresponding to project, it is easy to staff to be taken appropriate measures, according to this attribute information to improve service to be detected The stability of device, thus improves Consumer's Experience.
In order to improve Detection of Stability efficiency, in one embodiment of the invention, the setting unit 301, it is further used for Start-up mode is set to change file, and using start-up mode modification file, by the startup interface of the server to be detected It is revised as Command Line Interface;
It is described to restart unit 402, for controlling the server to be detected after the pressurized treatments to pass through order line circle Face, into exempting from login mode;It is described exempt from login mode under, start the operating system of the server to be detected.
Because the operating system of server is the system with interface, generally, after the system login with interface Can typically give tacit consent into graphical interfaces pattern, under graphical interfaces pattern, it is necessary to input user name corresponding with the server and Password could normally start server.In the present embodiment, file is changed by the start-up mode pre-set, by clothes to be detected The startup interface of business device is revised as Command Line Interface.Then when controlling server to be detected to be restarted, clothes to be detected are can control Device be engaged in by Command Line Interface, into login mode is exempted from, i.e., need not input username and password corresponding to server to be detected again, Server to be detected can normally be started, so as to shorten the time of Server Restart, and then improve Detection of Stability efficiency.
The contents such as the information exchange between each unit, implementation procedure in said apparatus, due to implementing with the inventive method Example is based on same design, and particular content can be found in the narration in the inventive method embodiment, and here is omitted.
Present invention also offers a kind of computer-readable recording medium, including execute instruction, when described in the computing device of storage control During execute instruction, the storage control performs the method that any of the above-described embodiment of the present invention provides.
In addition, present invention also offers a kind of storage control, including:Processor, memory and bus;The memory For storing execute instruction, the processor is connected with the memory by the bus, when the storage control is run When, the execute instruction of memory storage described in the computing device, so that the storage control is performed in the present invention The method that any embodiment offer is provided.
In summary, each embodiment of the invention at least has the advantages that:
1st, in embodiments of the present invention, by setting load pressure-applying unit in server to be detected, and according to default Pressure-applying unit is loaded, detection service device is treated and carries out pressurized treatments, then controls the server to be detected after pressurized treatments to carry out Restart.In restarting process, the running parameter of server to be detected is monitored, according to the running parameter monitored in restarting process, Determine the stability of server to be detected.Thus achieve and the stability of server detected in the case where loading pressurized conditions, More meet the actual service conditions of server, so as to improve the accuracy rate that stability test is carried out to server.
2nd, in embodiments of the present invention, at least one pressurization protocols included according to load pressure-applying unit and pressurization timing Device, at least one target program corresponding with least one pressurization protocols in server to be detected is determined, and control what is determined At least one target program is started, while the run time of at least one target program is recorded using the timer that pressurizes.When During pressurization timer expiry, server to be detected is controlled to be restarted.Thus the pressurization protocols in being set up according to load pressurization And pressing time, controlling server to be detected, load amount of pressurization is identical, so as to further increase stability when restarting every time The accuracy rate of test.
3rd, in embodiments of the present invention, for the running parameter monitored in restarting process each time, join first from work Parsed in number and restart duration, and judge that this restarts whether duration is less than predetermined threshold value, be more than predetermined threshold value when this restarts duration When, illustrate to be likely to occur failure in restarting process, now then reported an error.When length is less than predetermined threshold value when re-launched, then Attribute information corresponding at least one project to be detected is parsed from running parameter, and according to default at least one to be detected The reference information of project, further determine whether to exist reference information of the attribute information corresponding to project to be detected corresponding to it Difference, if in the presence of illustrating that mistake occur in restarting process in some projects to be detected, also reported an error.Reported an error according to each Information, it is determined that the number that always reports an error, and according to the number that always reports an error, determine the stability of server to be detected.Thus can be to be detected Each project to be detected in server and duration corresponding to restarting are detected, and are surveyed so as to further increase stability The accuracy rate of examination.
4th, in embodiments of the present invention, when determine to exist attribute information corresponding to project to be detected with its corresponding to ginseng When examining information and differing, then the project to be detected that attribute information and reference information differ is defined as failure project, and export Attribute information corresponding to the failure project, it is easy to staff to be taken appropriate measures according to this attribute information, it is to be checked to improve The stability of server is surveyed, thus improves Consumer's Experience.
5th, in embodiments of the present invention, file is changed by the start-up mode pre-set, by opening for server to be detected It is revised as Command Line Interface in arena face.Then when controlling server to be detected to be restarted, server to be detected can control to pass through Command Line Interface, into login mode is exempted from, so as to shorten the time of Server Restart, and then improve Detection of Stability effect Rate.
It should be noted that herein, such as first and second etc relational terms are used merely to an entity Or operation makes a distinction with another entity or operation, and not necessarily require or imply and exist between these entities or operation Any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant be intended to it is non- It is exclusive to include, so that process, method, article or equipment including a series of elements not only include those key elements, But also the other element including being not expressly set out, or also include solid by this process, method, article or equipment Some key elements.In the absence of more restrictions, the key element limited by sentence " including one ", is not arranged Except other identical factor in the process including the key element, method, article or equipment being also present.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through Programmed instruction related hardware is completed, and foregoing program can be stored in computer-readable storage medium, the program Upon execution, the step of execution includes above method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or light Disk etc. is various can be with the medium of store program codes.
It is last it should be noted that:Presently preferred embodiments of the present invention is the foregoing is only, is merely to illustrate the skill of the present invention Art scheme, is not intended to limit the scope of the present invention.Any modification for being made within the spirit and principles of the invention, Equivalent substitution, improvement etc., are all contained in protection scope of the present invention.

Claims (10)

  1. A kind of 1. detection method of server stability, it is characterised in that including:
    Load pressure-applying unit is set in server to be detected;
    According to the load pressure-applying unit, pressurized treatments are carried out to the server to be detected;
    The server to be detected after control pressurized treatments is restarted;
    Running parameter of the server to be detected in restarting process is monitored, the running parameter comprises at least:It is described to be checked Survey attribute information corresponding at least one project to be detected restarted in duration and the server to be detected of server;
    According to the running parameter monitored in the restarting process, the stability of the server to be detected is determined.
  2. 2. according to the method for claim 1, it is characterised in that
    Further comprise:
    The number of starts of the server to be detected is set;
    Record the server to be detected restarts number;
    It is described that the stability of the server to be detected is determined according to the running parameter detected in the restarting process, including:
    When it is described restart number and be less than the number of starts when, according to the load pressure-applying unit, to the server to be detected Carry out pressurized treatments;And the server to be detected after control pressurized treatments is restarted;
    When it is described restart number it is equal with the number of starts when, according to the running parameter monitored in each restarting process, really The stability of the fixed server to be detected.
  3. 3. method according to claim 1 or 2, it is characterised in that
    It is described according to the load pressure-applying unit, pressurized treatments, and the control pressurization are carried out to the server to be detected The server to be detected after processing is restarted, including:
    At least one pressurization protocols and pressurization timer included according to the load pressure-applying unit, are determined described to be detected At least one target program corresponding with least one pressurization protocols in server;
    Control at least one target program to be started, and at least one target is recorded using the pressurization timer The run time of program;
    When the pressurization timer expiry, the server to be detected is controlled to be restarted.
  4. 4. according to the method for claim 2, it is characterised in that
    It is described when it is described restart number it is equal with the number of starts when, joined according to the work that is monitored in each restarting process Number, the stability of the server to be detected is determined, including:
    For the running parameter monitored in each restarting process, the following steps are performed:
    A1:Restart duration described in being parsed from the running parameter, restart whether duration is less than predetermined threshold value described in judgement, such as Fruit is then to perform A2, is otherwise reported an error;
    A2:Attribute information corresponding at least one project to be detected is parsed from the running parameter, according to default Reference information corresponding at least one project to be detected, judge whether attribute corresponding at least one project to be detected Information differs with corresponding reference information, if it is, reporting an error;
    It is determined that the number that always reports an error;
    According to the number that always reports an error, the stability of the server to be detected is determined.
  5. 5. according to the method for claim 4, it is characterised in that
    When attribute information corresponding at least one project to be detected be present and corresponding reference information differs, enter one Step includes:
    At least one failure project is determined, exports attribute information corresponding to the failure project.
  6. 6. according to any described method in claim 1 to 5, it is characterised in that
    Further comprise:Set start-up mode to change file, file is changed using the start-up mode, by the service to be detected The startup interface of device is revised as Command Line Interface;
    The server to be detected after the control pressurized treatments is restarted, including:
    The server to be detected after the pressurized treatments is controlled by the Command Line Interface, into exempting from login mode;
    It is described exempt from login mode under, start the operating system of the server to be detected.
  7. A kind of 7. detection means of server stability, it is characterised in that including:Setting unit, restart unit and processing unit; Wherein,
    The setting unit, for setting load pressure-applying unit in server to be detected;
    It is described to restart unit, for the load pressure-applying unit set according to the setting unit, the server to be detected is entered Row pressurized treatments, and control the server to be detected after pressurized treatments to be restarted;
    The processing unit, for monitoring running parameter of the server to be detected in restarting process, the running parameter Comprise at least:At least one project pair to be detected restarted in duration and the server to be detected of the server to be detected The attribute information answered;According to the running parameter monitored in the restarting process, the steady of the server to be detected is determined It is qualitative.
  8. 8. device according to claim 7, it is characterised in that
    The setting unit, it is further used for setting the number of starts of the server to be detected;
    The processing unit, restart number for record the server to be detected;Restart number when described and be less than described open During dynamic number, according to the load pressure-applying unit, pressurized treatments are carried out to the server to be detected;And control pressurized treatments The server to be detected afterwards is restarted;When it is described restart number it is equal with the number of starts when, according to restarting every time During the running parameter that monitors, determine the stability of the server to be detected.
  9. 9. the device according to claim 7 or 8, it is characterised in that
    It is described to restart unit, at least one pressurization protocols included according to the load pressure-applying unit and pressurization timing Device, determine at least one target program corresponding with least one pressurization protocols in the server to be detected;Control institute State at least one target program to be started, and the operation of at least one target program is recorded using the pressurization timer Time;When the pressurization timer expiry, the server to be detected is controlled to be restarted.
  10. 10. device according to claim 8, it is characterised in that
    The processing unit includes:First judgment sub-unit, the second judgment sub-unit and detection sub-unit;Wherein,
    First judgment sub-unit, for the running parameter for being monitored in each restarting process, it is performed both by:From institute State and restart duration described in being parsed in running parameter, restart whether duration is less than predetermined threshold value described in judgement, if it is, triggering Second judgment sub-unit, otherwise reports an error;
    Second judgment sub-unit, for when receiving the triggering of first judgment sub-unit, from the running parameter In parse attribute information corresponding at least one project to be detected, it is corresponding according to default at least one project to be detected Reference information, judge whether attribute information corresponding at least one project to be detected and corresponding reference information Differ, if it is, reporting an error;
    The detection sub-unit, for the number that reports an error according to first judgment sub-unit and second judgment sub-unit, It is determined that the number that always reports an error, and according to the number that always reports an error, the stability of the server to be detected is determined.
    And/or
    The setting unit, it is further used for setting start-up mode to change file, and using start-up mode modification file, will The startup interface of the server to be detected is revised as Command Line Interface;
    It is described to restart unit, for controlling the server to be detected after the pressurized treatments to pass through the Command Line Interface, entrance Exempt from login mode;It is described exempt from login mode under, start the operating system of the server to be detected.
CN201710706653.5A 2017-08-17 2017-08-17 A kind of detection method and device of server stability Pending CN107451043A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710706653.5A CN107451043A (en) 2017-08-17 2017-08-17 A kind of detection method and device of server stability

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710706653.5A CN107451043A (en) 2017-08-17 2017-08-17 A kind of detection method and device of server stability

Publications (1)

Publication Number Publication Date
CN107451043A true CN107451043A (en) 2017-12-08

Family

ID=60491416

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710706653.5A Pending CN107451043A (en) 2017-08-17 2017-08-17 A kind of detection method and device of server stability

Country Status (1)

Country Link
CN (1) CN107451043A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209541A (en) * 2019-05-21 2019-09-06 苏州浪潮智能科技有限公司 Test method and device are restarted under LINUX system hard disk load condition
CN112486755A (en) * 2020-12-11 2021-03-12 北京金山云网络技术有限公司 Server detection method, detection device, electronic equipment and storage medium
CN113626136A (en) * 2021-06-30 2021-11-09 济南浪潮数据技术有限公司 Virtual machine fault detection method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246446A (en) * 2008-03-12 2008-08-20 浪潮电子信息产业股份有限公司 Method for testing PC server performance
CN102298532A (en) * 2011-09-15 2011-12-28 奇智软件(北京)有限公司 Startup-item-based management method and device
CN102981955A (en) * 2012-11-29 2013-03-20 浪潮电子信息产业股份有限公司 Automatic continuous restarting method based on Linux system
CN103984612A (en) * 2014-05-28 2014-08-13 浪潮电子信息产业股份有限公司 Unattended pressure testing method based on HPL tool
CN104572422A (en) * 2015-02-03 2015-04-29 浪潮电子信息产业股份有限公司 Memory monitoring achievement method based on startup and shutdown of Linux system
CN105302687A (en) * 2015-12-10 2016-02-03 浪潮电子信息产业股份有限公司 Linux-based hard disk sequence detection method
CN105718340A (en) * 2016-01-13 2016-06-29 浪潮电子信息产业股份有限公司 Crontab-based CPU stability test method
CN106776256A (en) * 2016-12-21 2017-05-31 郑州云海信息技术有限公司 SAS Switch whole machine cabinet blend pressure automated testing methods

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246446A (en) * 2008-03-12 2008-08-20 浪潮电子信息产业股份有限公司 Method for testing PC server performance
CN102298532A (en) * 2011-09-15 2011-12-28 奇智软件(北京)有限公司 Startup-item-based management method and device
CN102981955A (en) * 2012-11-29 2013-03-20 浪潮电子信息产业股份有限公司 Automatic continuous restarting method based on Linux system
CN103984612A (en) * 2014-05-28 2014-08-13 浪潮电子信息产业股份有限公司 Unattended pressure testing method based on HPL tool
CN104572422A (en) * 2015-02-03 2015-04-29 浪潮电子信息产业股份有限公司 Memory monitoring achievement method based on startup and shutdown of Linux system
CN105302687A (en) * 2015-12-10 2016-02-03 浪潮电子信息产业股份有限公司 Linux-based hard disk sequence detection method
CN105718340A (en) * 2016-01-13 2016-06-29 浪潮电子信息产业股份有限公司 Crontab-based CPU stability test method
CN106776256A (en) * 2016-12-21 2017-05-31 郑州云海信息技术有限公司 SAS Switch whole machine cabinet blend pressure automated testing methods

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209541A (en) * 2019-05-21 2019-09-06 苏州浪潮智能科技有限公司 Test method and device are restarted under LINUX system hard disk load condition
CN110209541B (en) * 2019-05-21 2022-07-19 苏州浪潮智能科技有限公司 Restart testing method and device under LINUX system hard disk load state
CN112486755A (en) * 2020-12-11 2021-03-12 北京金山云网络技术有限公司 Server detection method, detection device, electronic equipment and storage medium
CN112486755B (en) * 2020-12-11 2024-07-02 北京金山云网络技术有限公司 Server detection method, detection device, electronic equipment and storage medium
CN113626136A (en) * 2021-06-30 2021-11-09 济南浪潮数据技术有限公司 Virtual machine fault detection method and device
CN113626136B (en) * 2021-06-30 2023-12-22 济南浪潮数据技术有限公司 Virtual machine fault detection method and device

Similar Documents

Publication Publication Date Title
US8522214B2 (en) Keyword based software testing system and method
EP2204739B1 (en) Graphical user interface for setting of conditional breakpoints
CN107451043A (en) A kind of detection method and device of server stability
CN109510742B (en) Server network card remote test method, device, terminal and storage medium
US20160283353A1 (en) Automated software testing
CN110221820B (en) Spring framework generalized dependency injection method and device, computer equipment and storage medium
US20130166243A1 (en) Test device and method for testing stability of electronic devices
US20070277155A1 (en) Evaluating performance of software application
US20100115496A1 (en) Filter generation for load testing managed environments
CN106598682B (en) Component upgrade method and device
US20080127067A1 (en) Method and system for timing code execution in a korn shell script
CN106815054A (en) A kind of method and device of refreshing BMC firmwares
CN106330599B (en) Android application program network flow multithreading acquisition system and method
CN104572422A (en) Memory monitoring achievement method based on startup and shutdown of Linux system
US20190188116A1 (en) Automated software testing method and system
CN104246714A (en) Software defect verification
CN111258591B (en) Program deployment task execution method, device, computer equipment and storage medium
CN106790195A (en) A kind of SQL injection detection method and device
CN108733561A (en) Application program launching duration test method, device, electronic equipment and storage medium
US9348728B2 (en) Trace capture of successfully completed transactions for trace debugging of failed transactions
CN112631891A (en) Performance analysis method and device, electronic equipment and storage medium
US20140310508A1 (en) Method and apparatus for acquiring time spent on system shutdown
CN111666200A (en) Testing method and terminal for time consumption of cold start of PC software
CN109684205A (en) System detection method, device, electronic equipment and storage medium
CN113672917A (en) Malicious code detection method and device, storage medium and electronic equipment

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

Application publication date: 20171208

RJ01 Rejection of invention patent application after publication