# iperf boot launch issue

**URL:** https://dietpi.com/forum/t/iperf-boot-launch-issue/1980
**Category:** Troubleshooting
**Created:** [16 February 2018 03:33 UTC](https://dietpi.com/forum/t/iperf-boot-launch-issue/1980 "2018-02-16T03:33:04Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![n8xyn](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/n/49beb7/32.png) [@n8xyn](https://dietpi.com/forum/u/n8xyn)
#### Post date: [16 February 2018 03:33 UTC](https://dietpi.com/forum/t/iperf-boot-launch-issue/1980/1 "2018-02-16T03:33:04Z")

</div>

I’m trying really hard to get iperf to launch at boot on my Z83-II. I’ve tried 3 different tutorials and have yet to have it work. Is there something in the structure of Dietpi I’m unaware of? 2 of the tutorials were pretty much the same and one had my put the startup script in /etc/intit instead of /etc/init.d

---

<div class="post-metadata">

### Author: ![johnvick](https://dietpi.com/forum/user_avatar/dietpi.com/johnvick/32/16_2.png) [@johnvick](https://dietpi.com/forum/u/johnvick)
#### Post date: [16 February 2018 06:40 UTC](https://dietpi.com/forum/t/iperf-boot-launch-issue/1980/2 "2018-02-16T06:40:45Z")

</div>

Can you post a bit more info on what you’ve tried and your startup script?

John

---

<div class="post-metadata">

### Author: ![n8xyn](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/n/49beb7/32.png) [@n8xyn](https://dietpi.com/forum/u/n8xyn)
#### Post date: [16 February 2018 17:56 UTC](https://dietpi.com/forum/t/iperf-boot-launch-issue/1980/3 "2018-02-16T17:56:23Z")

</div>

Hi John, first I tried this in the /etc/init.d dierctory under the name “iperf3”

#!/bin/bash  
/usr/bin/iperf3 -s &

I also tried this more complex script under the /etc/init directory under the name iperf3.conf

description “Iperf 3 Upstart Script”  
author “Author”

start on filesystem or runlevel [2345]  
stop on shutdown  
expect fork

script

exec /usr/bin/iperf3 -s -D  
echo $$ \> /var/run/iperf3.pid

end script

pre-start script  
echo “[`date`] Iperf 3 Server Starting” \>\> /var/log/iperf3.log  
end script

pre-stop script  
rm /var/run/iperf3.pid  
echo “[`date`] Iperf 3 Server Stopping” \>\> /var/log/iperf3.log  
end script

iperf3 runs perfectly if I launch it manually with

iperf3 -s

---

<div class="post-metadata">

### Author: ![johnvick](https://dietpi.com/forum/user_avatar/dietpi.com/johnvick/32/16_2.png) [@johnvick](https://dietpi.com/forum/u/johnvick)
#### Post date: [16 February 2018 18:27 UTC](https://dietpi.com/forum/t/iperf-boot-launch-issue/1980/4 "2018-02-16T18:27:33Z")

</div>

I take it you have done the obvious:

# chmod 755 /etc/init.d/iperf3

and

# update-rc.d iperf3 defaults

John

---

<div class="post-metadata">

### Author: ![n8xyn](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/n/49beb7/32.png) [@n8xyn](https://dietpi.com/forum/u/n8xyn)
#### Post date: [18 February 2018 19:43 UTC](https://dietpi.com/forum/t/iperf-boot-launch-issue/1980/5 "2018-02-18T19:43:25Z")

</div>

I did but being unsure I did it again and still will not start at boot… not a big issue since I can manually start it…

---

<div class="post-metadata">

### Author: ![johnvick](https://dietpi.com/forum/user_avatar/dietpi.com/johnvick/32/16_2.png) [@johnvick](https://dietpi.com/forum/u/johnvick)
#### Post date: [27 February 2018 04:21 UTC](https://dietpi.com/forum/t/iperf-boot-launch-issue/1980/6 "2018-02-27T04:21:35Z")

</div>

Just a thought on this could it be that the script is running before the network is up?

Have you thought of trying to start it using a Systemd script?

[https://gist.github.com/mmasaki/3147f23fca698da9ff79](https://gist.github.com/mmasaki/3147f23fca698da9ff79)

John
