Compare commits

3 Commits

Author SHA1 Message Date
4967c20f51 ajout logrotate 2025-11-28 11:10:18 +01:00
97170bdbee mise au point solution 2025-09-16 10:47:58 +02:00
b21c16c296 solution 2025-09-16 09:42:18 +02:00
2 changed files with 45 additions and 1 deletions

View File

@@ -10,5 +10,38 @@ Prérequis: un serveur nfs
Installer iperf3 et mettre au point un fichier d'unité permettant de lancer automatiquement le service au démarrage avec les caractéristiques suivantes:
- fichier de log /var/log/iperf3.log
- pid /run/iperf3.pid
- pid /var/run/iperf3.pid
- lancement en mode daemon
```bash
dnf install iperf3 -y
cat > /etc/systemd/system/iperf3.service <<EOF
#/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
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
View 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