I generally use "nohup" to start Jmeter, Instead of using Cmd all the time, i have decided to configure a systemd service which runs the Jmeter all the time.
i have this below command: which basically run the jmeter and logs the output
nohup /app/jmeter/apache-jmeter-5.3/bin/jmeter -j /app/server-1/jmeter/logs/jmeter-traffic.log -n -t /app/jmeter/inputfile.jmx > /dev/null 2>&1 &
i Have created a .service file which runs the above command on
ExecStart=/app/jemter/apache-jmeter-5.3/bin/jmeter -j /app/jmeter/logs/jmeter-log -n -t /app/jmeter/inputfile.jmx > /dev/null 2>&1 &
when i started the service - i encountered various errors.
EX: class path contains multiple bindings
EX: failed to start the service
EX: failed at step EXEC spawing
EX: an error occured at arg: >
Is this the correct way of starting the service or should i be creating the shell script file to include the above command.
systemd knows nothing about your
>
operator so I would recommend leaving the command as it is:If you don't want to see JMeter output in the journal you can amend your systemd unit configuration like:
I would also suggest adding
-l
command line argument so you could store the results into a .jtl results file for further analysisMore information: How Do I Run JMeter in Non-GUI Mode?