-
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
Better daemon mode #1009
Comments
We actually don't control the content of https://iperf.fr/, which actually appears to be unmaintained (we have not been able to contact that site's maintainer for years). iperf3 wasn't intended to run as a public service, and we haven't really put a lot of thought about how to best do that. With respect to saving the output to a file when doing |
What do you think about including a systemd unit? Currently, I'm using this:
I had to set |
Feature request: exit with status 0 when receiving SIGTERM. From the glibc manual:
Exiting with non zero status should only be done in error conditions, and being asked politely to exit isn't an error. |
So, the systemd unit is there at contrib/iperf3.service, great! It could use a few improvements like admin-settable options (see my comment above), but it's good enough. However, iperf3 still has: exit(1) at src/iperf_error.c:139, which is causing systemd to interpret clean exit as failure due to the exitcode:
Using |
@rathann, per this comment, suggest when iperf3 gets a signal it should |
Submitted PR #1829 with a suggested change to exit with code 0 when iperf3 is terminated because of SIGTERM. I considered adding a parameter to allow of dynamic list of signals that should cause termination with exit code 0, but it seems to be an overkill. If there are other signals like SIGTERM they may be hard coded (as SIGTERM is hard coded in the PR). |
I'd say: SIGINT. See that glibc manual linked by @bjornfor above. SIGHUP is usually used for asking the daemon to re-read and re-apply its config. |
Thanks. Added SIGINT to PR #1829. |
On https://iperf.fr/iperf-servers.php, the suggested script has a lot of lines like this:
/usr/bin/sudo -u nobody /usr/bin/iperf3 -s -p 5200 -D >/dev/null 2>&1
So this writes all output (and errors) to /dev/null. That isn't a good idea as you have no idea what iperf3 is doing. It would be better that if -D was specified, that output was written to syslog instead.
Plus, the rest of script has a bunch of killall stuff that is suggested to run hourly (!). Is there really a chance that iperf3 requires a -9 kill? If it could hang up like that, that would seem to be a bug. Or is this page out of date?
If I submitted a pull request with syslog output if -D is specified, would that be something that would be considered?
The text was updated successfully, but these errors were encountered: