CN105740115A - Method for automatically testing lmbench memory under Linux - Google Patents

Method for automatically testing lmbench memory under Linux Download PDF

Info

Publication number
CN105740115A
CN105740115A CN201610073879.1A CN201610073879A CN105740115A CN 105740115 A CN105740115 A CN 105740115A CN 201610073879 A CN201610073879 A CN 201610073879A CN 105740115 A CN105740115 A CN 105740115A
Authority
CN
China
Prior art keywords
lmbench
test
linux
automatic test
under
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610073879.1A
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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201610073879.1A priority Critical patent/CN105740115A/en
Publication of CN105740115A publication Critical patent/CN105740115A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing

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 discloses a method for automatically testing an lmbench memory under Linux, which relates to the technical field of server pressure testing, and utilizes a self-contained Bash language and an lmbench tool under a Linux operating system to automatically test the lmbench memory, wherein the automatic testing process comprises the following steps: compiling and installing test software, executing a pressure test, recording a test result and uploading the test result to a designated FTP server. The method realizes the automation of the whole process of testing the memory bandwidth of the lmbench tool, improves the testing efficiency and ensures the testing quality.

Description

A kind of method of lmbench internal memory automatic test under Linux
Technical field
The present invention relates to server stress technical field of measurement and test, specifically a kind of method of lmbench internal memory automatic test under Linux.
Background technology
It is known that for meeting the diversified demand of different user, it is ensured that various applied environments stable, reliable, stability is had high requirement by key business server.No matter a server is at development or subsequent product maintenance phase, is required for product is carried out comprehensive system stress test, so that it is guaranteed that the stability of this product.Internal memory is as server vitals, and whether it stablizes direct relation server performance and stability.
Linux is the operating system based on the multi-user of POSIX and UNIX, multitask, support multithreading and multi-CPU.It can run main unix tool software, application program and procotol, supports 32 and 64 hardware.Linux also exists many different linux versions, but they all employ linux kernel, and custom Linux describes whole based on linux kernel, and uses the operating system of the various instrument of GNU engineering and data base.
Bash (GNUBourne-AgainShell) is the acquiescence Shell of many Linux release, and a ShellScript generally can use on a variety of Shell.Bash is most of linux system and the shell of MacOSX acquiescence, and it can run on the operating system of most of class Unix style.The command syntax of bash is the superset of Bourneshell command syntax.Namely the Bourneshell script of substantial amounts is scarcely modified can perform in bash, only used Bourne special variable or employ Bourne built-in command script just need amendment.As an interactively shell, press TAB key and get final product the program name of auto-complete part input, filename, variable name etc..
Lmbench is a set of simple and easy transplantable, and meeting ANSI/C standard is the UNIX/POSIX miniature evaluation tool formulated.In general, it weighs two key features: response time and bandwidth.Lmbench is intended to the basic cost making system developer understand key operation in depth.Lmbench has following principal character: a) test for portability of operating system, b) self-adaptative adjustment, c) calculates database result, d) memory latency result of calculation, e) context switch result of calculation, f) regression test etc..The installation installing and using Lmbench is relatively simple, downloads compressed package Lmbench.tar.gz to its official website and is decompressed, and enters the directory command line unit after decompression and enter makeresults and can start compiler test.
In order to improve server memory automatic test effect, the present invention proposes a kind of lmbench internal memory automated testing method based on Bash under linux.
Summary of the invention
The present invention is directed to current needs and the weak point of prior art development, it is provided that a kind of method of lmbench internal memory automatic test under Linux.
The method of lmbench internal memory automatic test under a kind of Linux of the present invention, the technical scheme solving the employing of above-mentioned technical problem is as follows: the method for lmbench internal memory automatic test under described Linux, utilize and under (SuSE) Linux OS, carry Bash language and lmbench instrument, carry out lmbench internal memory automatic test, automatic test course includes: compiling and installation test software, perform stress test, record test result and test result is uploaded to appointment ftp server.
Preferably, described compiling and installation test software refer to, carry bash script by writing (SuSE) Linux OS, server memory lmbench instrument are compiled automatically and installs.
Preferably, the method for lmbench internal memory automatic test under described Linux, implement step as follows:
1) lmbench instrument is replicated to linux system;
2) automatic test script file is write;
3) give automatic test script file and can perform authority;
4) under linux system terminal, automatic test script file is run.
Under a kind of Linux of the present invention, the method for lmbench internal memory automatic test compared with prior art has the beneficial effect that the memory bandwidth that the method can be widely used in all types of servers under linux system and stability automatic test, the use of this method enormously simplify the operating process of memory bandwidth and stability test, easily realize being installed to stress test from lmbench testing tool to perform, arrive test result record again, and test result such as uploads at the automatization of overall process;Realize the automatization of lmbench instrument memory bandwidth test overall process, improve testing efficiency, it is ensured that test quality, save the testing time, reduce human input, Improving The Quality of Products, save cost for company.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearly understand, below in conjunction with specific embodiment, the method for lmbench internal memory automatic test under a kind of Linux of the present invention is further described.
The present invention provides a kind of method of lmbench internal memory automatic test under Linux, utilize and under (SuSE) Linux OS, carry Bash language and lmbench instrument, carry out lmbench internal memory automatic test, and record test result, upload test result to specifying ftp server.This method can be widely used for memory bandwidth and the stability automatic test of all types of servers under linux system, and the use of this method enormously simplify the operating process of memory bandwidth and stability test.
Embodiment:
The method of lmbench internal memory automatic test under a kind of Linux described in the present embodiment, utilize and under (SuSE) Linux OS, carry Bash language and lmbench instrument, realize lmbench and carry out internal memory automatic test, automatic test course includes: compiling and installation test software, perform stress test, record test result and test result is uploaded ftp server.
The method of lmbench internal memory automatic test under Linux described in the present embodiment, described compiling and installation test software refer to, carry bash script by writing (SuSE) Linux OS, server memory lmbench instrument are compiled automatically and installs.Meanwhile, then carry out automatic pressure Force meansurement, and after test terminates, record test result, and upload test result to specifying ftp server.Perform thus realizing being installed to stress test from testing tool, then to test result record, and test result such as uploads at the automatization of overall process, significantly improves testing efficiency, it is ensured that test quality.
The method of lmbench internal memory automatic test under Linux described in the present embodiment, implements step as follows:
1) lmbench instrument is replicated to linux system;
2) automatic test script file lmbenchautotest.sh is write;
3) give automatic test script file and can perform authority: chmod+xlmbenchautotest.sh;
4) under linux system terminal, automatic test script file: ./lmbenchautotest.sh is run;
Wherein, lmbenchautotest.sh file source code following (# behavior comment line):
#!/bin/bash
tarzxvf/home/lmbench-3.0-a9
cd/lmbench-3.0-a9/bin/x86_64-linux-gnu
makeresults
# compiles and installs lmbench
cd/lmbench-3.0-a9/bin/x86_64-linux-gnu
pro_number=`cat/proc/cpuinfo|grepprocessor|wc-l`
# obtains CPU number information
mem_size=`free-g|grepMem|awk'{print$2}'`
# obtains system free memory quantity
letmem_size_test=$mem_size*800/$pro_number
# calculates the amount of memory that need to test
While:;dodate>>/home/lmbenchtest.txt;./bw_mem-P$pro_number$mem_size_testMrdwr>>/home/lmbenchtest.txt2>&1done&
# performs lmbench automatic test, and preserves test result
test_result=`cat/home/lmbenchtest.txt|awk'NR==10{print$2}'`
# obtains memory bandwidth measured value
NUMSOCK=${1:-`grep'physicalid'/proc/cpuinfo|sort-u|wc-l`}
# obtains system CPU socket number
lettheoreticalvalue=1066/8*64*8*$NUMSOCK
# calculates internal memory theoretical bandwidth value
lettest_result2=$test_result/$theoreticalvalue
# calculates memory bandwidth measured value and theoretical value ratio
echoThememorybandwidthof$NUMSOCKsockets’serveris:$test_result
# exports memory bandwidth test result
echorate:$test_result2
# exports memory bandwidth measured value and theoretical value ratio
scp/home/lmbenchtest.txtroot172.19.2.75:/home/root.
# uploads test result to specifying ftp server.
Above-mentioned detailed description of the invention is only the concrete case of the present invention; the scope of patent protection of the present invention includes but not limited to above-mentioned detailed description of the invention; claims of any present invention of meeting and any person of an ordinary skill in the technical field to its suitably change done or replaces, and all should fall into the scope of patent protection of the present invention.

Claims (3)

1. the method for lmbench internal memory automatic test under a Linux, it is characterized in that, utilize and under (SuSE) Linux OS, carry Bash language and lmbench instrument, carry out lmbench internal memory automatic test, automatic test course includes: compiling and installation test software, perform stress test, record test result and test result is uploaded to appointment ftp server.
2. a kind of method of lmbench internal memory automatic test under Linux according to claim 1, it is characterized in that, described compiling and installation test software refer to, carry bash script by writing (SuSE) Linux OS, server memory lmbench instrument are compiled automatically and installs.
3. a kind of method of lmbench internal memory automatic test under Linux according to claim 2, it is characterised in that it is as follows that it implements step:
1) lmbench instrument is replicated to linux system;
2) automatic test script file is write;
3) give automatic test script file and can perform authority;
4) under linux system terminal, automatic test script file is run.
CN201610073879.1A 2016-02-02 2016-02-02 Method for automatically testing lmbench memory under Linux Pending CN105740115A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610073879.1A CN105740115A (en) 2016-02-02 2016-02-02 Method for automatically testing lmbench memory under Linux

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610073879.1A CN105740115A (en) 2016-02-02 2016-02-02 Method for automatically testing lmbench memory under Linux

Publications (1)

Publication Number Publication Date
CN105740115A true CN105740115A (en) 2016-07-06

Family

ID=56245679

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610073879.1A Pending CN105740115A (en) 2016-02-02 2016-02-02 Method for automatically testing lmbench memory under Linux

Country Status (1)

Country Link
CN (1) CN105740115A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250309A (en) * 2016-07-22 2016-12-21 浪潮电子信息产业股份有限公司 A kind of memory pressure change method of testing and device
CN106294053A (en) * 2016-07-28 2017-01-04 浪潮电子信息产业股份有限公司 A kind of internal memory performance method of testing and device
CN107193724A (en) * 2017-05-25 2017-09-22 郑州云海信息技术有限公司 A kind of method based on Stream instrument automatic test internal memory performances

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104820628A (en) * 2015-04-01 2015-08-05 浪潮电子信息产业股份有限公司 Method for monitoring system load and system resource use condition based on BASH
CN105243000A (en) * 2015-10-30 2016-01-13 浪潮电子信息产业股份有限公司 Cross-numa memory testing method suitable for multi-path server

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104820628A (en) * 2015-04-01 2015-08-05 浪潮电子信息产业股份有限公司 Method for monitoring system load and system resource use condition based on BASH
CN105243000A (en) * 2015-10-30 2016-01-13 浪潮电子信息产业股份有限公司 Cross-numa memory testing method suitable for multi-path server

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250309A (en) * 2016-07-22 2016-12-21 浪潮电子信息产业股份有限公司 A kind of memory pressure change method of testing and device
CN106294053A (en) * 2016-07-28 2017-01-04 浪潮电子信息产业股份有限公司 A kind of internal memory performance method of testing and device
CN107193724A (en) * 2017-05-25 2017-09-22 郑州云海信息技术有限公司 A kind of method based on Stream instrument automatic test internal memory performances

Similar Documents

Publication Publication Date Title
CN103412816B (en) A kind of continuous integrating test platform building method based on linux
Kofler The Definitive Guide to MySQL5
Poess et al. Analysis of tpcx-iot: The first industry standard benchmark for iot gateway systems
US20070055963A1 (en) Compile target and compiler flag extraction in program analysis and transformation systems
CN105718251A (en) Multilanguage SDK (software development kit) automatic implementation method and system
CN103324474B (en) Based on (SuSE) Linux OS across the method for System structure ISO and module
US20060282815A1 (en) System, method and computer program product for developing, configuring, installing and testing software
CN105740115A (en) Method for automatically testing lmbench memory under Linux
AU2012201749B2 (en) Single development test environment
Ciroth et al. openLCA 1.4 overview and first steps
CN109408101A (en) A kind of code development maintaining method and electronic equipment for programming
CN109445832A (en) Language carries out the method and electronic equipment of hot update to application program based on programming
Ingo et al. Automated system performance testing at MongoDB
CN103955423B (en) Test evaluation method of domestic JVM (Java Virtual Machine)
CN111258595A (en) PyInstaler-based python source code packaging method
Gerboles et al. AirSensEUR: an open data/software/hardware multi-sensor platform for air quality monitoring
Alanwar et al. Cyclops: PRU programming framework for precise timing applications
Ordiales Coscia et al. Avoiding wsdl bad practices in code-first web services
Buffenbarger Adding automatic dependency processing to makefile-based build systems with amake
Abiteboul et al. Edos: Environment for the development and distribution of open source software
Watson et al. Bluespec Extensible RISC Implementation: BERI Software reference
Denisov Annotations-driven configuration framework for Java applications
Binet et al. docker & HEP: Containerization of applications for development, distribution and preservation
Sivaiah et al. Boot multiple Operating Systems from ISO images using USB Disk
Weeks The calq system for signal processing applications

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160706