-
Notifications
You must be signed in to change notification settings - Fork 29
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
stats don't get cleared after shutting down the systemd service #14
Comments
Fixed in fdns, need to port it to firetools. There is an up to 10s delay until the monitor detects fdns went down. |
@startx2017 Thanks for the work on this. The monitor now makes much more sense. But /dev/shm/fdns.stats still stays present after fdns stop (at least on Arch Linux, haven't tested Ubuntu yet). Maybe that's the 'new' intended behaviour? As stated above it can be easily cleaned up in the systemd service via a simple ExecStopPost command. But users that don't use the systemd service will have to take some other action. |
If the user does a "sudo pkill fdns" we get a chance to remove the file by intercepting the signal before the process gets killed. However if the kernel decides to kill the process (equivelent to kill -9), the process will just be killed without receiving a signal first. I'll bring in the signal part, but let's put in ExecStopPost also, is like a best effort. |
Done in bd89850. We can adjust the ExecStopPost command later when the signal part is implemented. Although 'rm -f /dev/shm/fdns-stats' does the job for now, it would be cleaner to have something like '/usr/bin/fdns --clear-stats'. Just a thought... |
Fdns stats in
/dev/shm/fdns-stats
stay lingering on the system after stopping the systemd service. I suspect this also affects users who don't use the systemd unit. This has two side-effects that I find confusing:fdns --monitor
is running, stopping the fdns systemd service doesn't terminatefdns --monitor
output (nor is there any indication the service is in fact dead);fdns --monitor
, which happily reports all the earlier stats.Perhaps this could be improved upon. For now I added an
ExecPostStop
command to clean it up, but that's not a full alternative. IMHO this should be done by fdns itself.Side-note: I realize the decision to put the stats into /dev/shm probably has to do with the original plan to integrate fdns into firejail, but rkhunter and the likes frown upon finding files in /dev/shm. Perhaps a small note is welcome that informs the user of what's going on exactly...
The text was updated successfully, but these errors were encountered: