systemd iperf at startup

General support questions
vptech
Posts: 2
Joined: 2018/02/08 14:01:56

systemd iperf at startup

Postby vptech » 2018/02/08 14:45:42

Hi folks,
I am new to centos7. I have requirement to run iperf3 (bandwidth testing app) at startup .

I followed the instruction & it works if I wanted to run iperf3 at the startup.
https://arr4.wordpress.com/2016/04/21/i ... a-service/

[Unit]
Description=iperf3 Service
After=network.target
[Service]
Type=simple
User=iperf
ExecStart=/usr/bin/iperf3 -s
Restart=on-abort
[Install]
WantedBy=multi-user.target

But I wanted to pass some parameters like create logfile with --forceflush so when I passed this under ExeStart it does not work & it does not
give me any error .
ExecStart=iperf3 -s -D -J --logfile /var/www/html/iperf/log.json --forceflush

if somebody can point me to right direction .
Sincerely
Viral Patel

User avatar
TrevorH
Forum Moderator
Posts: 22591
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: systemd iperf at startup

Postby TrevorH » 2018/02/08 15:17:12

Try writing your log files under /var/log/not /var/www - selinux knows about /var/www and restricts what or who can write there to a select list. The /var/log directory is meant for logs.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

vptech
Posts: 2
Joined: 2018/02/08 14:01:56

Re: systemd iperf at startup

Postby vptech » 2018/02/08 17:00:42

Thank you
Sincerely
Viral Patel