CN107423184A - The method of automatic test server hard-disk interface speed when a kind of hot-swappable - Google Patents
The method of automatic test server hard-disk interface speed when a kind of hot-swappable Download PDFInfo
- Publication number
- CN107423184A CN107423184A CN201710630901.2A CN201710630901A CN107423184A CN 107423184 A CN107423184 A CN 107423184A CN 201710630901 A CN201710630901 A CN 201710630901A CN 107423184 A CN107423184 A CN 107423184A
- Authority
- CN
- China
- Prior art keywords
- hotplug
- disk
- hard disk
- daily record
- hard
- 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/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/26—Functional testing
Abstract
The method of automatic test server hard-disk interface speed when the present invention provides a kind of hot-swappable, belong to hard disk test technical field, the invention mainly comprises acquisition disk state information, and information analysis is carried out automatically, hard-disk interface rate information is exported according to information analysis result.I.e. each cycle hard disk plug process, the interface rate of instruction checking hard disk need not be manually entered, automatic inspection and record interface rate information can be achieved.
Description
Technical field
The present invention relates to hard disk test technology, more particularly to it is a kind of hot-swappable when automatic test server hard-disk interface speed
Method.
Background technology
Hard disk is the basic mass-memory unit of server, information needed when being mainly used for providing server operation,
And the program and data files that storage server system is all.General server hard disk is supported hot-swappable.(note:Hot plug is
Hot plugging, warm connection function is exactly to allow user that damage is taken out and changed in the case where not closing system, do not cut off the electricity supply
Hard disk).
So hard disk it is hot-swappable be server research and development test process in an important step.Needed in R&D process to clothes
Business device hard disk carries out hot-swappable test repeatedly, and checks the interface rate of each cycle hard disks, to confirm to occur without reduction of speed.I.e.
In server running, hard disk is extracted from server, again plugged hard disk after waiting several seconds, when hard disk can be normal
After recognizing, whether the interface rate that need to be manually entered instruction checking hard disk is normal.When detect hard disk identification and interface rate
After normal, hard disk is extracted again, then plugged again, then is detected.A large amount of repeatedly plug experiments are carried out according to standard, it is therefore an objective to are examined
Can hard disk be surveyed reliably being serviced device recognize.
But be required to manually with upper type, efficiency is very low.Therefore how to improve the automatization level of this process is
Urgent problem.It is a preferable direction that the detection of hard-disk interface speed wherein is become into automation.
The content of the invention
In order to solve the problem, the side of automatic test server hard-disk interface speed when the present invention proposes a kind of hot-swappable
Method.I.e. each cycle hard disk plug process, the interface rate of instruction checking hard disk need not be manually entered, can be achieved automatic
Check simultaneously record interface rate information.
The method of automatic test server hard-disk interface speed when a kind of hot-swappable,
Mainly include:
Disk state information is obtained,
It is automatic to carry out information analysis,
Hard-disk interface rate information is exported according to information analysis result.
Disk state information acquisition method:
During hot-swappable, disk state is divided into hard disk and extracts state and hard disk insert state;
It is able to record that information is extracted or inserted to hard disk under server Linux system/var/log/messages files;
Can produce a band after hard disk is extracted, in/var/log/messages files has keyword
" Synchronizing SCSI cache " daily record;After hard disk inserts and is identified, in/var/log/messages files
A band, which can be produced, keyword " Attached SCSI disk " daily record;" Synchronizing is carried by calculating
SCSI cache " daily record and with " the quantity sum of Attached SCSI disk " daily record, to judge that hard disk is to be in
Extraction or insert state;
Keyword " Synchronizing SCSI cache " daily record is carried in setting/var/log/messages files
Bar number is hotplug_A, and with keyword, " Attached SCSI disk " daily record bar number is hotplug_B;
Hotplug_A is hotplug_C with hotplug_B sums;
Test before first empty/var/log/messages files in content;Now, hotplug_A 0,
Hotplug_B is that 0, hotplug_C is also 0;After a hard disk is extracted, hotplug_A 1, hotplug_B 0, therefore
Hotplug_C is also 1;After inserting hard disk and recognizing, hotplug_A 1, hotplug_B 1, therefore hotplug_C is also
2;After a hard disk is extracted again, hotplug_A 2, hotplug_B 1, therefore hotplug_C is also 2;When insertion hard disk
And after recognizing, hotplug_A 2, hotplug_B 2, therefore hotplug_C is also 4.Therefore, often extract or insert hard disk one
Secondary, hotplug_A will increase by 1 with hotplug_B sums hotplug_C.
Analyze disk state change:
Hotplug_C numerical value is continually scanned for by program, when hotplug_C numerical value increases by 1, just automatic output
Hard-disk interface rate information;Judge whether hard disk is pulled out by contrasting the numerical values recited of hotplug_C before and after plug
Or insertion.
Setting is current/var/log/messages in " Synchronizing SCSI cache " daily record and carrying
" the quantity sum of Attached SCSI disk " daily record is hotplug_C;Then proceed to continually scan for
" Synchronizing SCSI cache " daily record and with " the quantity sum of Attached SCSI disk " daily record, if
It is set to hotplug_D;When finding that hotplug_D is more than hotplug_C, it can prove that disk state is changed.
Output interface rate information:By can query interface rate information in dmesg files.
Brief description of the drawings
Fig. 1 is the workflow schematic diagram of the present invention.
Embodiment
More detailed elaboration is carried out to present disclosure below:
Disk state information acquisition method:During hot-swappable, disk state is divided into hard disk and extracts state and hard disk insertion
State.It is able to record that information is extracted or inserted to hard disk under server Linux system/var/log/messages files.Work as hard disk
After extraction, a band can be produced in/var/log/messages files keyword " Synchronizing SCSI cache "
Daily record;Can produce a band after hard disk inserts and is identified, in/var/log/messages files has keyword
" Attached SCSI disk " daily record.The judgement of disk state information is exactly to utilize this feature, is carried by calculating
" Synchronizing SCSI cache " daily record and with " the quantity sum of Attached SCSI disk " daily record, come
It is in extraction or insert state to judge hard disk.
Keyword " Synchronizing SCSI cache " daily record is carried in setting/var/log/messages files
Bar number is hotplug_A, and with keyword, " Attached SCSI disk " daily record bar number is hotplug_B.hotplug_A
It is hotplug_C with hotplug_B sums.Test before first empty/var/log/messages files in content.Now,
Hotplug_A is 0, hotplug_B 0, and hotplug_C is also 0;After a hard disk is extracted, hotplug_A 1,
Hotplug_B is 0, therefore hotplug_C is also 1;After inserting hard disk and recognizing, hotplug_A 1, hotplug_B 1,
Therefore hotplug_C is also 2;After a hard disk is extracted again, hotplug_A 2, hotplug_B 1, therefore hotplug_C
For 2;After inserting hard disk and recognizing, hotplug_A 2, hotplug_B 2, therefore hotplug_C is also 4.Therefore, often pull out
Go out or insert hard disk once, hotplug_A will increase by 1 with hotplug_B sums hotplug_C.Can be brighter by following table
Really show.
Disk state | hotplug_A | hotplug_B | hotplug_C |
1st extraction | 1 | 0 | 1 |
1st insertion | 1 | 1 | 2 |
2nd extraction | 2 | 1 | 3 |
2nd insertion | 2 | 2 | 4 |
3rd extraction | 3 | 2 | 5 |
3rd insertion | 3 | 3 | 6 |
N-th is extracted | n | n-1 | 2n-1 |
N-th is inserted | n | n | 2n |
Analyze disk state change:Hotplug_C numerical value is continually scanned for by program, whenever hotplug_C numerical value
When increasing by 1, a hard-disk interface rate information is just exported automatically.However, how to recognize the change of hotplug_C numerical value
It is to need to solve the problems, such as.The present invention judges whether hard disk is pulled out by contrasting the numerical values recited of hotplug_C before and after plug
Go out or insert.It is assumed that carry " Synchronizing SCSI cache " daily record and band in current/var/log/messages
Have that " the quantity sum of Attached SCSI disk " daily record is hotplug_C;Then proceed to continually scan for
" Synchronizing SCSI cache " daily record and with " the quantity sum of Attached SCSI disk " daily record, it is false
It is set to hotplug_D.When finding that hotplug_D is more than hotplug_C, it can prove that disk state is changed.
Output interface rate information:By in dmesg files can query interface rate information, different hard disk controllers
Under, the output of information slightly has difference, but thinking is similar.
The emphasis of the present invention is to obtain disk state information and how to analyze disk state change, is then tied by analyzing
The desired data of fruit output.
Concrete methods of realizing refers to following program
Claims (5)
1. the method for automatic test server hard-disk interface speed when a kind of hot-swappable, it is characterised in that
Mainly include:
Disk state information is obtained,
It is automatic to carry out information analysis,
Hard-disk interface rate information is exported according to information analysis result.
2. according to the method for claim 1, it is characterised in that
Disk state information acquisition method:
During hot-swappable, disk state is divided into hard disk and extracts state and hard disk insert state;
It is able to record that information is extracted or inserted to hard disk under server Linux system/var/log/messages files;
Can produce a band after hard disk is extracted, in/var/log/messages files has keyword " Synchronizing
SCSI cache " daily record;One can be produced after hard disk inserts and is identified, in/var/log/messages files to carry
Keyword " Attached SCSI disk " daily record;" Synchronizing SCSI cache " daily record is carried by calculating
With with " the quantity sum of Attached SCSI disk " daily record, come judge hard disk be in extract or insert state;
Keyword " Synchronizing SCSI cache " daily record bar number is carried in setting/var/log/messages files
For hotplug_A, with keyword, " Attached SCSI disk " daily record bar number is hotplug_B;
Hotplug_A is hotplug_C with hotplug_B sums;
Test before first empty/var/log/messages files in content;Now, hotplug_A 0, hotplug_B are
0, hotplug_C is also 0;After a hard disk is extracted, hotplug_A 1, hotplug_B 0, therefore hotplug_C is also 1;
After inserting hard disk and recognizing, hotplug_A 1, hotplug_B 1, therefore hotplug_C is also 2;When extracting one again
After individual hard disk, hotplug_A 2, hotplug_B 1, therefore hotplug_C is also 2;After inserting hard disk and recognizing,
Hotplug_A is 2, hotplug_B 2, therefore hotplug_C is also 4.Therefore, often extract or insert hard disk once, hotplug_
A will increase by 1 with hotplug_B sums hotplug_C.
3. according to the method for claim 2, it is characterised in that
Analyze disk state change:
Hotplug_C numerical value is continually scanned for by program, it is just automatic to export once when hotplug_C numerical value increases by 1
Hard-disk interface rate information;Judge whether hard disk is pulled out or inserts by contrasting the numerical values recited of hotplug_C before and after plug
Enter.
4. according to the method for claim 3, it is characterised in that set in current/var/log/messages and carry
" Synchronizing SCSI cache " daily record and with " the quantity sum of Attached SCSI disk " daily record is
hotplug_C;Then proceed to continually scan for " Synchronizing SCSI cache " daily record and with " Attached
The quantity sum of SCSI disk " daily record, is set as hotplug_D;When finding that hotplug_D is more than hotplug_C, just
Provable disk state is changed.
5. according to the method for claim 4, it is characterised in that
Output interface rate information:By can query interface rate information in dmesg files.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710630901.2A CN107423184A (en) | 2017-07-28 | 2017-07-28 | The method of automatic test server hard-disk interface speed when a kind of hot-swappable |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710630901.2A CN107423184A (en) | 2017-07-28 | 2017-07-28 | The method of automatic test server hard-disk interface speed when a kind of hot-swappable |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107423184A true CN107423184A (en) | 2017-12-01 |
Family
ID=60431616
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710630901.2A Pending CN107423184A (en) | 2017-07-28 | 2017-07-28 | The method of automatic test server hard-disk interface speed when a kind of hot-swappable |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107423184A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101620558A (en) * | 2008-07-01 | 2010-01-06 | 环旭电子股份有限公司 | General debugging-assistant device |
US20110188196A1 (en) * | 2006-10-30 | 2011-08-04 | American Megatrends, Inc. | System and apparatus for removably mounting hard disk drives |
CN102789371A (en) * | 2012-07-27 | 2012-11-21 | 曙光信息产业(北京)有限公司 | Method for distributing disk identifier of hard disk |
CN105260274A (en) * | 2015-10-23 | 2016-01-20 | 浪潮电子信息产业股份有限公司 | Linux-based hard disk random hot plug stability detection method |
CN105843720A (en) * | 2016-05-12 | 2016-08-10 | 浪潮电子信息产业股份有限公司 | Method and device for testing hot-plug stability of hard disks |
-
2017
- 2017-07-28 CN CN201710630901.2A patent/CN107423184A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110188196A1 (en) * | 2006-10-30 | 2011-08-04 | American Megatrends, Inc. | System and apparatus for removably mounting hard disk drives |
CN101620558A (en) * | 2008-07-01 | 2010-01-06 | 环旭电子股份有限公司 | General debugging-assistant device |
CN102789371A (en) * | 2012-07-27 | 2012-11-21 | 曙光信息产业(北京)有限公司 | Method for distributing disk identifier of hard disk |
CN105260274A (en) * | 2015-10-23 | 2016-01-20 | 浪潮电子信息产业股份有限公司 | Linux-based hard disk random hot plug stability detection method |
CN105843720A (en) * | 2016-05-12 | 2016-08-10 | 浪潮电子信息产业股份有限公司 | Method and device for testing hot-plug stability of hard disks |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109062874A (en) | Acquisition methods, terminal device and the medium of financial data | |
CN106294222A (en) | A kind of method and device determining PCIE device and slot corresponding relation | |
CN104331446A (en) | Memory map-based mass data preprocessing method | |
CN104091164A (en) | Face picture name recognition method and system | |
CN102882716A (en) | Ministry of industry and information technology recording detecting method and system | |
CN104765664A (en) | PCI (Peripheral Component Interface) equipment detection system and method | |
CN105740462A (en) | Method for supporting data migration between different environments | |
CN104699516B (en) | Automatic identification Android mobile phone and the method and apparatus for installing driving under Windows | |
CN107423184A (en) | The method of automatic test server hard-disk interface speed when a kind of hot-swappable | |
CN105678557A (en) | Method and device for generating model, method and device for evaluating service quality | |
CN104063308B (en) | The verification method and device of data | |
CN105335459A (en) | XBRL intelligent report platform based statement consolidation data extraction method | |
CN110719445A (en) | Remote meter reading system and method based on image recognition | |
CN103309993B (en) | The extracting method of a kind of key word and device | |
CN103699482A (en) | Method and device for testing reasonableness of controls | |
CN106502843A (en) | A kind of hard disk plug stability test method suitable for raid card | |
CN112417837A (en) | Method, system and storage medium for automatic cross judgment retrieval matching template based on mole identification | |
CN114637845B (en) | Model testing method, device, equipment and storage medium | |
CN105607988A (en) | Automated test and analysis method for IO performance of storage devices in server | |
CN109783022A (en) | A kind of method and device of more hard-disc storage fast assembling multiplicity RAID | |
CN112650796A (en) | Automatic application data collection and storage management system | |
CN113590903B (en) | Management method and device of information data | |
CN205563393U (en) | Electricity subdata information collection system based on military computer | |
CN104978273B (en) | The automatic testing method and automatic detection unit of pad name | |
CN107707856A (en) | The method and device that a kind of multimedia programming is recorded |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171201 |
|
RJ01 | Rejection of invention patent application after publication |