CN104598344A - Shell-based memory read-write testing method - Google Patents
Shell-based memory read-write testing method Download PDFInfo
- Publication number
- CN104598344A CN104598344A CN201510056172.5A CN201510056172A CN104598344A CN 104598344 A CN104598344 A CN 104598344A CN 201510056172 A CN201510056172 A CN 201510056172A CN 104598344 A CN104598344 A CN 104598344A
- Authority
- CN
- China
- Prior art keywords
- test
- parameter
- memory
- write
- mode
- 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
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The invention discloses a shell-based memory read-write testing method and belongs to the field of memory tests. The method comprises the following specific steps of: 1, ensuring that a tested memory is based on a linux kernel operating system, installing a memtester tool and logging on a running program; 2, presetting program parameters; 3, selecting modes which include a default current mode, a timing mode and a circulation mode, wherein the timing mode and the circulation mode are mutually exclusive, so that only one of the timing mode and the circulation mode can be selected; 4, setting a test environment of the memtester tool under the mode, and starting a memtester single-thread or multithread parallel test; 5, after the test is finished, viewing a test result file in which a test result and a test time record are recorded, and eliminating temporary files created in a program run process. During a process of testing memory read-write, an auxiliary test program runs, so that a series of complicated test operations such as parameter modification, repeated thread starting and result treatment are omitted, the test application limitation is broken, and the test efficiency is greatly increased.
Description
Technical field
The present invention discloses a kind of method that test memory based on shell is read and write, and belongs to memory test field.Specifically the present invention relates to based on shell language realize specially under linux OS to the automated testing method of memory read-write.
Background technology
Internal memory be CPU by bus addressing, and carry out the computer part of read-write operation.Along with the requirement that computer soft and hardware technology is constantly updated, the size of our usually said computer memory (RAM), namely refers to the total volume of internal memory.The literacy of internal memory is the key factor judging internal memory, but the memory read-write pressure test carried out at present, usual use Memtester, it is error catch memory and be always in very high or very low bad position mainly, by size and the number of times of given test memory, random value is carried out to the existing internal memory of system, XOR compares, subtraction, multiplication, division, with or the test of the project such as computing, but cannot setup times during memtester test, once cannot open the testing results mode of multi-threaded parallel, produce all drawbacks, such as Output rusults mistake, be unfavorable for the judgement of user to memory read-write, the present invention designs a kind of method that test memory based on shell is read and write, during test memory read-write, run subtest program, eliminate parameter modification, repeatedly open thread, a series of complicated test job such as result treatment, break Test Application limitation, and without the need to a series of complicated work such as manual operation and disposal data, greatly improve testing efficiency.
Summary of the invention
When the present invention is directed to memtester test cannot setup times, once cannot open the testing results mode of multi-threaded parallel, produce the problem of all drawbacks, a kind of method that test memory based on shell is read and write is provided, when realizing test memory read-write, run subtest program, eliminate parameter modification, repeatedly open a series of complicated test job such as thread, result treatment, break Test Application limitation, and without the need to a series of complicated work such as manual operation and disposal data, greatly improve testing efficiency.
The concrete scheme that the present invention proposes is:
Based on the method that the test memory of shell is read and write, concrete steps are:
1. guarantee the operating system of test memory based on linux kernel, memtester testing tool is installed, under copying the file of Linux system to, with root identity logs in operating system, working procedure;
2. the parameter of pre-set program, default parameter and test reading are got parameter and compare and check, whether exact p-value environment meets the demands, and if do not met, display translation prompting resets test parameter;
3. model selection, to be circulated the parameter obtained in order line by case, and parameter is applied in each function and go, carry out control program by parameter to run, comprise acquiescence present mode, timing mode, circulation pattern Three models, wherein timing mode and circulation pattern mutual exclusion, can only select a selection;
4. the test environment carrying out memtester instrument under pattern is arranged, and starts the test of memtester single-threaded or multi-threaded parallel;
5. after having tested, check test result file, in file record, record test result and test duration record, and the temporary file created in clear program operational process.
The described step test memory such as memory size, test duration, test loop number of times, required cpu Thread Count that 2. middle parameter preset comprises setup test reads and writes necessary parameter.
2. described step obtains the cpu information of system before the parameter of pre-set program, comprises physics cpu quantity and total number of threads; The corresponding relation that acquisition thread number and physics cpu number; Obtain total size of memory size, total size of active volume.
By the method for the key word in awk order and grep order crawl/proc/cpuinfo and/proc/meminfo, obtain the cpu information of system, comprise physics cpu quantity and total number of threads; The corresponding relation that acquisition thread number and physics cpu number; Obtain total size of memory size, total size of active volume.
Described step 3. middle acquiescence present mode is when not arranging any parameter, and acquiescence runs whole available memory space and whole cpu thread; Timing mode, according to the time parameter pre-seted, completes test, and when reaching the stipulated time, program terminates test process automatically, record result; Circulation pattern, according to the cycle index pre-seted, completes memory read-write test in regulation test.
Usefulness of the present invention is: this method of testing is mainly realized by test procedure, has parameter preset, automatically performs test, concludes the functions such as logging test results.Without the need to lengthy and jumbled result treatment, greatly save the test duration, improve testing efficiency.Make up at present when carrying out memory read-write test cannot setup times, cannot once open the drawbacks such as multi-threaded parallel testing results; Operation, run simple and easy, omnidistance unmanned; Can preset parameter before test, apply unrestricted; The data of record are detailed, grasp test machine situation, possess very strong applicability by data, are applicable to being generalized to various type widely.
Embodiment
This method of testing main body is realized by test procedure, and subtest program is based on bash shell language compilation.Whole test process for preparing, pre-set, model selection, bring into operation, result treatment, the part such as environment cleaning.The present invention carries out under general room temperature.
Usual testing standard:
After having tested, under test machine, check test result file, in file record, record test result and test duration record, test machine stable operation in whole test process, do not occur the abnormal occurrencies such as deadlock, power down or blue screen.
If there are the situations such as fail test item in test result, then illustrate that a certain region read-write of test machine internal memory has problem.
Testing the concrete test process of a certain computer memory is:
1. guarantee the operating system of test memory based on linux kernel, memtester testing tool is installed, under copying the file of Linux system to, with root identity logs in operating system, working procedure;
2. before the parameter of pre-set program, obtain the cpu information of system, comprise physics cpu quantity and total number of threads; The corresponding relation that acquisition thread number and physics cpu number; Obtain total size of memory size, total size of active volume, obtains above information by the method for the key word in awk order and grep order crawl/proc/cpuinfo and/proc/meminfo; The parameter of pre-set program, the test memory such as memory size, test duration, test loop number of times, required cpu Thread Count that parameter preset comprises setup test reads and writes necessary parameter; Default parameter and test reading are got parameter to compare and check, whether exact p-value environment meets the demands, and if do not met, display translation prompting resets test parameter;
3. model selection, to be circulated the parameter obtained in order line by case, and parameter is applied in each function and go, carry out control program by parameter to run, comprise acquiescence present mode, timing mode, circulation pattern Three models, wherein timing mode and circulation pattern mutual exclusion, can only select a selection;
4. the test environment carrying out memtester instrument under pattern is arranged, and starts the test of memtester single-threaded or multi-threaded parallel;
5. after having tested, check test result file, in file record, record test result and test duration record, and the temporary file created in clear program operational process.
Described step 3. middle acquiescence present mode is when not arranging any parameter, and acquiescence runs whole available memory space and whole cpu thread; Timing mode, according to the time parameter pre-seted, completes test, and when reaching the stipulated time, program terminates test process automatically, record result; Circulation pattern, according to the cycle index pre-seted, completes memory read-write test in regulation test.
Test the data obtained is as follows:
memtester version 4.3.0 (32-bit)
Copyright (C) 2001-2012 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).
pagesize is 8192
pagesizemask is 0xffffe000
want 480MB (503316480 bytes)
got 480MB (503316480 bytes), trying mlock ...locked.
Loop 1
Stuck Address : ok
Random Value : ok
Compare XOR : ok
Compare SUB : ok
Compare MUL : ok
Compare DIV : ok
Compare OR : ok
Compare AND : ok
Sequential Increment: ok
Solid Bits : ok
Block Sequential : ok
Checkerboard : ok
Bit Spread : ok
Bit Flip : ok
Walking Ones : ok
Walking Zeroes : ok
8-bit Writes : ok
16-bit Writes : ok
By test machine stable operation in the whole test process of above data, there is not the abnormal occurrencies such as deadlock, power down or blue screen.
Claims (5)
1., based on the method that the test memory of shell is read and write, it is characterized in that concrete steps are:
1. guarantee the operating system of test memory based on linux kernel, memtester testing tool is installed, under copying the file of Linux system to, with root identity logs in operating system, working procedure;
2. the parameter of pre-set program, default parameter and test reading are got parameter and compare and check, whether exact p-value environment meets the demands, and if do not met, display translation prompting resets test parameter;
3. model selection, to be circulated the parameter obtained in order line by case, and parameter is applied in each function and go, carry out control program by parameter to run, comprise acquiescence present mode, timing mode, circulation pattern Three models, wherein timing mode and circulation pattern mutual exclusion, can only select a selection;
4. the test environment carrying out memtester instrument under pattern is arranged, and starts the test of memtester single-threaded or multi-threaded parallel;
5. after having tested, check test result file, in file record, record test result and test duration record, and the temporary file created in clear program operational process.
2. the method read and write of a kind of test memory based on shell according to claim 1, is characterized in that the test memory such as memory size, test duration, test loop number of times, required cpu Thread Count that parameter preset during described step 2. comprises setup test reads and writes necessary parameter.
3. the method read and write of a kind of test memory based on shell according to claim 2, is characterized in that 2. described step obtains the cpu information of system before the parameter of pre-set program, comprises physics cpu quantity and total number of threads; The corresponding relation that acquisition thread number and physics cpu number; Obtain total size of memory size, total size of active volume.
4. the method that a kind of test memory based on shell according to any one of claim 1-3 is read and write, it is characterized in that the method by the key word in awk order and grep order crawl/proc/cpuinfo and/proc/meminfo, obtain the cpu information of system, comprise physics cpu quantity and total number of threads; The corresponding relation that acquisition thread number and physics cpu number; Obtain total size of memory size, total size of active volume.
5. the method read and write of a kind of test memory based on shell according to claim 4, it is characterized in that acquiescence present mode is when not arranging any parameter during described step is 3., acquiescence runs whole available memory space and whole cpu thread; Timing mode, according to the time parameter pre-seted, completes test, and when reaching the stipulated time, program terminates test process automatically, record result; Circulation pattern, according to the cycle index pre-seted, completes memory read-write test in regulation test.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510056172.5A CN104598344A (en) | 2015-02-03 | 2015-02-03 | Shell-based memory read-write testing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510056172.5A CN104598344A (en) | 2015-02-03 | 2015-02-03 | Shell-based memory read-write testing method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104598344A true CN104598344A (en) | 2015-05-06 |
Family
ID=53124157
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510056172.5A Pending CN104598344A (en) | 2015-02-03 | 2015-02-03 | Shell-based memory read-write testing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104598344A (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105095084A (en) * | 2015-08-25 | 2015-11-25 | 浪潮(北京)电子信息产业有限公司 | Memory performance test system and method of virtual machine of server virtualization platform |
CN105243000A (en) * | 2015-10-30 | 2016-01-13 | 浪潮电子信息产业股份有限公司 | Cross-numa memory testing method suitable for multi-path server |
CN105260286A (en) * | 2015-10-29 | 2016-01-20 | 浪潮电子信息产业股份有限公司 | Method for monitoring CPU working state in real time |
CN106933739A (en) * | 2017-03-10 | 2017-07-07 | 郑州云海信息技术有限公司 | A kind of read-write hybrid test instrument based on hbase |
CN107203445A (en) * | 2017-05-24 | 2017-09-26 | 郑州云海信息技术有限公司 | A kind of automated testing method of timing cycle perform script |
CN107799158A (en) * | 2017-11-23 | 2018-03-13 | 郑州云海信息技术有限公司 | A kind of NVMe SSD IO delays automated testing method |
CN108399121A (en) * | 2017-02-06 | 2018-08-14 | 中兴通讯股份有限公司 | A kind of test method and device based on script |
CN108763073A (en) * | 2018-05-21 | 2018-11-06 | 郑州云海信息技术有限公司 | A method of the software execution environment similarities and differences in two Linux systems of comparison |
CN109284211A (en) * | 2018-10-08 | 2019-01-29 | 郑州云海信息技术有限公司 | A kind of test method and device of AEP memorymodel |
CN109324934A (en) * | 2018-09-10 | 2019-02-12 | 郑州云海信息技术有限公司 | A kind of pressure detection method and system of AEP memory interface |
CN110399257A (en) * | 2019-07-04 | 2019-11-01 | 上海创功通讯技术有限公司 | Detection method, electronic equipment and the computer readable storage medium of memory |
CN111198792A (en) * | 2019-12-31 | 2020-05-26 | 上海派森诺生物科技股份有限公司 | Batch test system based on sysbench and test method thereof |
CN112363884A (en) * | 2020-12-08 | 2021-02-12 | 吉林大学 | Method and system for testing memory performance of domestic operating system |
CN114003419A (en) * | 2021-09-30 | 2022-02-01 | 苏州浪潮智能科技有限公司 | Method, system and device for realizing automatic testing of RAS (remote system operation) characteristics of memory based on OSES (open system operating system) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103984627A (en) * | 2014-05-15 | 2014-08-13 | 浪潮电子信息产业股份有限公司 | Test method for memory pressure of Linux server |
CN103984634A (en) * | 2014-06-05 | 2014-08-13 | 浪潮电子信息产业股份有限公司 | Memory unsteady state pressure test method of LINUX server |
CN104123224A (en) * | 2014-07-09 | 2014-10-29 | 浪潮电子信息产业股份有限公司 | Simple memory test method based on IA-64 framework |
CN104317683A (en) * | 2014-09-26 | 2015-01-28 | 浪潮电子信息产业股份有限公司 | Method for testing power consumption of memory |
-
2015
- 2015-02-03 CN CN201510056172.5A patent/CN104598344A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103984627A (en) * | 2014-05-15 | 2014-08-13 | 浪潮电子信息产业股份有限公司 | Test method for memory pressure of Linux server |
CN103984634A (en) * | 2014-06-05 | 2014-08-13 | 浪潮电子信息产业股份有限公司 | Memory unsteady state pressure test method of LINUX server |
CN104123224A (en) * | 2014-07-09 | 2014-10-29 | 浪潮电子信息产业股份有限公司 | Simple memory test method based on IA-64 framework |
CN104317683A (en) * | 2014-09-26 | 2015-01-28 | 浪潮电子信息产业股份有限公司 | Method for testing power consumption of memory |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105095084A (en) * | 2015-08-25 | 2015-11-25 | 浪潮(北京)电子信息产业有限公司 | Memory performance test system and method of virtual machine of server virtualization platform |
CN105095084B (en) * | 2015-08-25 | 2018-02-09 | 浪潮(北京)电子信息产业有限公司 | The virutal machine memory Performance Test System and method of a kind of server virtualization platform |
CN105260286A (en) * | 2015-10-29 | 2016-01-20 | 浪潮电子信息产业股份有限公司 | Method for monitoring CPU working state in real time |
CN105243000A (en) * | 2015-10-30 | 2016-01-13 | 浪潮电子信息产业股份有限公司 | Cross-numa memory testing method suitable for multi-path server |
CN108399121A (en) * | 2017-02-06 | 2018-08-14 | 中兴通讯股份有限公司 | A kind of test method and device based on script |
CN106933739A (en) * | 2017-03-10 | 2017-07-07 | 郑州云海信息技术有限公司 | A kind of read-write hybrid test instrument based on hbase |
CN107203445A (en) * | 2017-05-24 | 2017-09-26 | 郑州云海信息技术有限公司 | A kind of automated testing method of timing cycle perform script |
CN107799158A (en) * | 2017-11-23 | 2018-03-13 | 郑州云海信息技术有限公司 | A kind of NVMe SSD IO delays automated testing method |
CN108763073A (en) * | 2018-05-21 | 2018-11-06 | 郑州云海信息技术有限公司 | A method of the software execution environment similarities and differences in two Linux systems of comparison |
CN109324934A (en) * | 2018-09-10 | 2019-02-12 | 郑州云海信息技术有限公司 | A kind of pressure detection method and system of AEP memory interface |
CN109284211A (en) * | 2018-10-08 | 2019-01-29 | 郑州云海信息技术有限公司 | A kind of test method and device of AEP memorymodel |
CN110399257A (en) * | 2019-07-04 | 2019-11-01 | 上海创功通讯技术有限公司 | Detection method, electronic equipment and the computer readable storage medium of memory |
CN111198792A (en) * | 2019-12-31 | 2020-05-26 | 上海派森诺生物科技股份有限公司 | Batch test system based on sysbench and test method thereof |
CN111198792B (en) * | 2019-12-31 | 2023-09-08 | 上海派森诺生物科技股份有限公司 | Batch test system and method based on sysbankh |
CN112363884A (en) * | 2020-12-08 | 2021-02-12 | 吉林大学 | Method and system for testing memory performance of domestic operating system |
CN114003419A (en) * | 2021-09-30 | 2022-02-01 | 苏州浪潮智能科技有限公司 | Method, system and device for realizing automatic testing of RAS (remote system operation) characteristics of memory based on OSES (open system operating system) |
CN114003419B (en) * | 2021-09-30 | 2024-05-28 | 苏州浪潮智能科技有限公司 | Method, system and device for automatically testing RAS characteristics of memory based on OSES |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104598344A (en) | Shell-based memory read-write testing method | |
EP3097489B1 (en) | Byte-addressable non-volatile read-write main memory partitioned into regions including metadata region | |
Skorobogatov | The bumpy road towards iPhone 5c NAND mirroring | |
JP2011210037A5 (en) | ||
US8751817B2 (en) | Data processing apparatus and validity verification method | |
CN105205401A (en) | Trusted computer system based on safe password chip and trusted guiding method thereof | |
CN103200008A (en) | Linux identity authentication system and Linux identity authentication method | |
US10380283B2 (en) | Functional verification with machine learning | |
CN104123224A (en) | Simple memory test method based on IA-64 framework | |
KR102128472B1 (en) | Storage device for performing in-storage computing operations, method thereof, and system including same | |
CN103347017A (en) | Data processing method and system on chip | |
CN104778383A (en) | Hardware encryption method based on domestic processor blade server management daughter card | |
CN113127283B (en) | Chip repair system, method, apparatus, computer device, and storage medium | |
TW201833421A (en) | A system of an electronic lock for updating a firmware of the electronic lock | |
CN104679556B (en) | Application program method for burn-recording and system | |
TWI801954B (en) | Chip, designing method and failure analysis method thereof | |
CN110275845B (en) | Memory control method and device and electronic equipment | |
TW201324151A (en) | Method and system for protecting configuration file | |
Dasgupta et al. | Formal hardware/software co-verification of embedded power controllers | |
US9213864B2 (en) | Data processing apparatus and validity verification method | |
CN112783532A (en) | Program testing system and device for financial terminal equipment | |
Wahab et al. | A novel lightweight hardware-assisted static instrumentation approach for ARM SoC using debug components | |
CN110909317A (en) | General encryption method for FPGA storage program | |
CN103744696A (en) | Linux based USB bus width testing method | |
CN117744165A (en) | Encryption and verification method for embedded equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150506 |
|
RJ01 | Rejection of invention patent application after publication |