-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Systemd-based socket activation #1171
base: master
Are you sure you want to change the base?
Conversation
This is very helpful. Absent multiple simultaneous client support in iperf3, this allows me to have systemd monitor, say, 24 ports and dynamically launch one-off iperf3 servers to service client requests on those ports. I've built iperf3 from schaten's fork and it works perfectly. It took me a bit to realize that libsystemd-dev was a dependency. I guess that should have been obvious. Edit: I think schaten's fork requires libsystemd-dev > version 237 in order to work. I.e. won't work on Ubuntu 18.04, but works fine on Ubuntu 20.04 which has version 245. |
Cool! Yes, it's very helpful! |
what's blocking the merge of this? |
This is a merge commit Author of the merged in commit d2d7088 from https://github.com/schaten/iperf/tree/master is Philip Schaten <philip.schaten@stud.uni-goettingen.de> Erik Sjölund <erik.sjolund@gmail.com> solved the merge conflicts. As of today 25 September 2024 the PR esnet#1171 wants to merge 1 commit into https://github.com/esnet/iperf/tree/master from https://github.com/schaten/iperf/tree/master Info about the branches: The branch https://github.com/esnet/iperf/tree/master is currently the Git commit 0ea9cb6 The branch https://github.com/schaten/iperf/tree/master is currently the Git commit d2d7088
@schaten Thanks for implementing this functionality! I would like to use a current esnet:master (https://github.com/esnet/iperf/commits/master/) with the socket activation functionality added. To achieve that I created a git merge commit I don't know how to properly do git merges, especially the question of which name to write for author. I hope I got it right. @schaten could you rebase on to esnet:master and resolve the trivial conflicts? |
Glad to hear this was useful. Thanks everyone. :) Somehow it took me way too long to test it afterwards, because of the following things. Leaving it here as a reference:
|
Version of iperf3 (or development branch, such as
master
or3.1-STABLE
) to which this pull request applies: masterIssues fixed (if any): enhancement: systemd socket activation, service and target files #742
Brief description of code changes (suitable for use as a commit message): Allow iperf3 to receive sockets from systemd.
This patch enables systemd-based socket activation of iperf3. To test, build and install this fork, then:
mv contrib/iperf3_@.* /etc/systemd/system/
systemctl daemon-reload
systemctl start iperf3_5201
This will make systemd listen on port 5201. As soon as a client tries to connect, iperf3 is started and takes over.
I originally wanted to add multi-user support, but this is not as easy due to the separate control / data connections.
In combination with loadbalancing (i.e. based on the IP address, client could be NATted to a socket-activated iperf3 instance) it might still be useful..
Also, as the socket-activation was a separate issue, maybe it's useful to others. :)