Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4967c20f51 | |||
| 97170bdbee | |||
| b21c16c296 |
32
Readme.md
32
Readme.md
@@ -13,15 +13,35 @@ Installer iperf3 et mettre au point un fichier d'unité permettant de lancer aut
|
|||||||
- pid /var/run/iperf3.pid
|
- pid /var/run/iperf3.pid
|
||||||
- lancement en mode daemon
|
- lancement en mode daemon
|
||||||
|
|
||||||
#### Cron
|
```bash
|
||||||
|
|
||||||
Planifier un redémarrage quotidien de iperf3 avec une unité de type _timer_
|
dnf install iperf3 -y
|
||||||
|
|
||||||
#### Point de montage
|
cat > /etc/systemd/system/iperf3.service <<EOF
|
||||||
|
|
||||||
Mettre au point 2 unités de type mount et automount permettant de monter automatiquement le partage nfs suivant: **_CHANGEME_**
|
#/etc/systemd/system/iperf3.service
|
||||||
|
[Unit]
|
||||||
|
Description = iperf3 daemon
|
||||||
|
|
||||||
Montage sur /mnt/nfs
|
[Service]
|
||||||
|
Type = simple
|
||||||
|
ExecStart = /usr/bin/iperf3 --logfile /var/log/iperf3.log --server
|
||||||
|
|
||||||
Démontage automatique au bout de 30sec d'inactivité
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
systemctl daemon-reload
|
||||||
|
|
||||||
|
cat > /etc/logrotate.d/iperf3
|
||||||
|
/var/log/iperf3.log {
|
||||||
|
daily
|
||||||
|
rotate 7
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
systemctl start iperf3
|
||||||
|
|
||||||
|
systemctl status iperf3
|
||||||
|
```
|
||||||
|
|||||||
11
iperf3.service
Normal file
11
iperf3.service
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#/etc/systemd/system/iperf3.service
|
||||||
|
[Unit]
|
||||||
|
Description = iperf3 daemon
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type = simple
|
||||||
|
ExecStart = /usr/bin/iperf3 --logfile /var/log/iperf3.log --server
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
Reference in New Issue
Block a user