軟件介紹
LTP(LinuxTest Project)是SGI、IBM、OSDL和Bull合作的項目,目的是為開源社區(qū)提供一個測試套件,用來驗證Linux系統(tǒng)可靠性、健壯性和穩(wěn)定性。LTP測試套件是測試Linux內(nèi)核和內(nèi)核相關(guān)特性的工具的集合。該工具的目的是通過把測試自動化引入到Linux內(nèi)核測試,提高Linux的內(nèi)核質(zhì)量。LTP提供了驗證linux系統(tǒng)穩(wěn)定性的標(biāo)準,設(shè)計標(biāo)準的壓力場景,通過對linux系統(tǒng)進行壓力測試,對系統(tǒng)的功能、性能進行分析,并以此確定linux系統(tǒng)的可靠性、健壯性和穩(wěn)定性。
軟件使用
前提:
1. 系統(tǒng)安裝 yum install autoconf gcc
2. 執(zhí)行init 3 ,進入純文本模式
3. 執(zhí)行setterm -blank 0,關(guān)閉顯示器節(jié)能功能
編譯和安裝:
$ tar xf ltp20161110.tar.gz
$ cd ltp
$ ./configure
$ make autotools
$ ./configure --build=mips64el
$ make
(可根據(jù)CPU個數(shù)加 -j參數(shù)并行編譯)
make install
測試:
進入/opt/ltp/testscripts目錄,執(zhí)行如下命令
./ltpstress.sh -S -p -t 72 -n
參數(shù)
-S? 為使用sar工具統(tǒng)計結(jié)果
-n? ? ? ? ? 不對網(wǎng)絡(luò)進行壓力測試
-p:? ? ? ? 人為指定日志格式,保證日志為可讀格式
-l:? ? ? ? ? 記錄測試日志的文件
-d:? ? ? ? 指定臨時存儲目錄,默認為/tmp
-o:? ? ? ? 直接打印測試輸出到/tmp/ltpscreen.20111207
-t:? ? ? ? 指定測試的持續(xù)時間
-t 60s = 60 seconds
-t 45m = 45 minutes
-t 24h = 24 hours
-t 2d? = 2 days
注:
細節(jié)方面可參考
http://blog.csdn.net/kernel_learner/article/details/8238974
http://www.07net01.com/linux/LTP__linuxwendingxingceshi_linuxxingnenceshi_436020_1371838080.html