stress 壓力測試軟體

2022-09-16 14:18:15 字數 1715 閱讀 9435

ubuntu下安裝

zw@zw-pc:apt-get install stress

zw@zw-pc:apt-get install htop #top的增強版,比較直觀

zw@zw-pc:stress --help

`stress' imposes certain types of compute stress on your system

usage: stress [option [arg]] ...

-?, --help show this help statement

--version show version statement

-v, --verbose be verbose

-q, --quiet be quiet

-n, --dry-run show what would h**e been done

-t, --timeout n timeout after n seconds

--backoff n wait factor of n microseconds before work starts

-c, --cpu n spawn n workers spinning on sqrt()#產生 n 個程序,每個程序都反覆不停的計算隨機數的平方根

-i, --io n spawn n workers spinning on sync()#產生 n 個程序,每個程序反覆呼叫 sync() 將記憶體上的內容寫到硬碟上

-m, --vm n spawn n workers spinning on malloc()/free()#產生 n 個程序,每個程序不斷分配和釋放記憶體

--vm-bytes b malloc b bytes per vm worker (default is 256mb)

--vm-stride b touch a byte every b bytes (default is 4096)

--vm-hang n sleep n secs before free (default none, 0 is inf)

--vm-keep redirty memory instead of freeing and reallocating

-d, --hdd n spawn n workers spinning on write()/unlink()# 產生 n 個不斷執行 write 和 unlink 函式的程序(建立檔案,寫入內容,刪除檔案)

--hdd-bytes b write b bytes per hdd worker (default is 1gb)

example: stress --cpu 8 --io 4 --vm 2 --vm-bytes 128m --timeout 10s

note: numbers may be suffixed with s,m,h,d,y (time) or b,k,m,g (size).

產生6個程序消耗cpu資源

消耗2*300m 共600m的mem資源

Linux壓力測試軟體Stress安裝及使用指南

一 stress是什麼 stress是乙個linux下的壓力測試工具,專門為那些想要測試自己的系統,完全高負荷和監督這些裝置執行的使用者。二 安裝 將stress的安裝包上傳並解壓到linux伺服器的 usr local src路徑下,解壓命令為 tar xzpvf stress 1.0.1.ori...

Linux壓力測試之stress

有時候更換了自己linux系統的flash,需要測試flash效能,我們可以使用stress來測試,模擬系統高負荷的狀態,簡稱壓測。sudo apt install stress c,cpu n 產生 n 個程序,每個程序都反覆不停的計算隨機數的平方根 i,io n 產生 n 個程序,每個程序反覆呼...

Linux測試標準 stress壓力測試

linux測試標準 stress壓力測試 一 stress linux壓力測試軟體使用指南。q quiet 不顯示執行資訊 n dry run 顯示已經完成的指令執 況 t secs timeout secs 指定執行多少秒 backoff usecs 等待usecs微秒後才開始執行 c forks...