Linux命令执行Jmeter文件并生成报告

#nohup  jmeter -n -t a.jmx -l a.jtl -e -o /tmp/result

参数说明:

nohup 是 no hang up 的缩写,就是不挂断的意思。

nohup命令:如果你正在运行一个进程,而且你觉得在退出帐户时该进程还不会结束,那么可以使用nohup命令。该命令可以在你退出帐户/关闭终端之后继续运行相应的进程。

[root@localhost]# jmeter -?
    _    ____   _    ____ _   _ _____       _ __  __ _____ _____ _____ ____
   / \  |  _ \ / \  / ___| | | | ____|     | |  \/  | ____|_   _| ____|  _ \
  / _ \ | |_) / _ \| |   | |_| |  _|    _  | | |\/| |  _|   | | |  _| | |_) |
 / ___ \|  __/ ___ \ |___|  _  | |___  | |_| | |  | | |___  | | | |___|  _ <
/_/   \_\_| /_/   \_\____|_| |_|_____|  \___/|_|  |_|_____| |_| |_____|_| \_\ 5.4.1

Copyright (c) 1999-2021 The Apache Software Foundation

	--?
		print command line options and exit
	-h, --help
		print usage information and exit
	-v, --version
		print the version information and exit
	-p, --propfile 
		the jmeter property file to use
	-q, --addprop 
		additional JMeter property file(s)
	-t, --testfile 
		the jmeter test(.jmx) file to run. "-t LAST" will load last 
		used file
	-l, --logfile 
		the file to log samples to
	-i, --jmeterlogconf 
		jmeter logging configuration file (log4j2.xml)
	-j, --jmeterlogfile 
		jmeter run log file (jmeter.log)
	-n, --nongui
		run JMeter in nongui mode
	-s, --server
		run the JMeter server
	-E, --proxyScheme 
		Set a proxy scheme to use for the proxy server
	-H, --proxyHost 
		Set a proxy server for JMeter to use
	-P, --proxyPort 
		Set proxy server port for JMeter to use
	-N, --nonProxyHosts 
		Set nonproxy host list (e.g. *.apache.org|localhost)
	-u, --username 
		Set username for proxy server that JMeter is to use
	-a, --password 
		Set password for proxy server that JMeter is to use
	-J, --jmeterproperty =
		Define additional JMeter properties
	-G, --globalproperty =
		Define Global properties (sent to servers)
		e.g. -Gport=123
		 or -Gglobal.properties
	-D, --systemproperty =
		Define additional system properties
	-S, --systemPropertyFile 
		additional system property file(s)
	-f, --forceDeleteResultFile
		force delete existing results files and web report folder if
		 present before starting the test
	-L, --loglevel =
		[category=]level e.g. jorphan=INFO, jmeter.util=DEBUG or com
		.example.foo=WARN
	-r, --runremote
		Start remote servers (as defined in remote_hosts)
	-R, --remotestart 
		Start these remote servers (overrides remote_hosts)
	-d, --homedir 
		the jmeter home directory to use
	-X, --remoteexit
		Exit the remote servers at end of test (non-GUI)
	-g, --reportonly 
		generate report dashboard only, from a test results file
	-e, --reportatendofloadtests
		generate report dashboard after load test
	-o, --reportoutputfolder 
		output folder for report dashboard

参考文档:Apache JMeter - User's Manual: Getting Started

Linux命令执行Jmeter文件并生成报告_第1张图片

你可能感兴趣的:(自动化,Jmeter)