服務端開發,經常需要對伺服器進行壓測。
在windows下我們使用jmeter來測試,開啟jmeter.bat檔案,介面就出來了,操作很方便。
但在linux下,在沒有介面的境況下,我們如何使用jmeter呢?
有個簡單的方法:
先在windows儲存好test plan,就是jmx檔案。
把檔案複製到linxu下,使用下面cmd即可,測試完畢會生成log檔案,通過vi來檢視。
jmeter -n -t 檔名.jmx -l log.jtl
如果無法執行請檢查自己機器的環境變數.
引數說明:
-n this specifies jmeter is to run in non-gui mode
-t [name of jmx file that contains the test plan].
-l [name of jtl file to log sample results to].
-r run all remote servers specified in jmeter.properties (or remote servers specified on command line by overriding properties)
the script also lets you specify the optional firewall/proxy server information:
-h [proxy server hostname or ip address]
-p [proxy server port]
官方的user guide
Linux下C語言使用openssl庫進行加密
在這裡插一小節加密的吧,使用openssl庫進行加密。使用md5加密 我們以乙個字串為例,新建乙個檔案filename.txt,在檔案內寫入hello 然後在linux下可以使用命令md5sum filename.txt計算md5值 b1946ac92492d2347c6235b4d2611184 ...
Linux下Jmeter相關引數
jmeter命令列選項 jmeter在windows系統下啟動的是乙個swing gui介面,也可以在linux unix系統中作為乙個命令使用。呼叫jmeter的 jmeter 命令將列印所有命令選項的乙個列表。列表如下 h,help 列印使用資訊並退出 v,version 列印版本資訊並推出 p...
linux下執行jmeter指令碼
1 win下生成測試計畫 2 上傳至linux下 3 執行測試計畫 sh jmeter.sh n t second login.jmx l res.jtl 錯誤1 solution 刪除原linux系統自帶的jdk版本傳入新的jdk版本,並將新版本的jdk路徑配置在環境變數裡面 source etc...