Skip to content
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

stop dnsmasq from filling the log 11/01/2022 #531

Merged
merged 1 commit into from Nov 1, 2022

Conversation

ab7pa
Copy link
Contributor

@ab7pa ab7pa commented Oct 22, 2022

The node's limited log buffer is being filled quickly by dnsmasq which is very chatty. Once the log buffer fills, then older messages are lost when they may be needed. There seems to be no way to reduce the chattiness of dnsmasq, but there is a way to keep it from logging altogether. This allows other important messages to be retained for a longer period of time in the log.

@ab7pa
Copy link
Contributor Author

ab7pa commented Oct 23, 2022

I've been running this on my nodes for a while and find that the log is actually usable again. I now see all of the ntp time updates for example. It also shows an error message from netifd that I was unable to catch before.

@dman776
Copy link
Contributor

dman776 commented Oct 23, 2022

What info was dnsmasq logging that was filling the log???

@aanon4
Copy link
Contributor

aanon4 commented Oct 23, 2022

Here's an example of what the log looks like without this change:

Sun Oct 23 13:44:26 2022 daemon.info dnsmasq[1278]: read /etc/hosts - 4 addresses
Sun Oct 23 13:44:27 2022 daemon.info dnsmasq[1278]: read /var/run/hosts_olsr.stable - 1103 addresses
Sun Oct 23 13:44:47 2022 daemon.info dnsmasq[1278]: read /etc/hosts - 4 addresses
Sun Oct 23 13:44:47 2022 daemon.info dnsmasq[1278]: read /var/run/hosts_olsr.stable - 1103 addresses
Sun Oct 23 13:45:07 2022 daemon.info dnsmasq[1278]: read /etc/hosts - 4 addresses
Sun Oct 23 13:45:07 2022 daemon.info dnsmasq[1278]: read /var/run/hosts_olsr.stable - 1103 addresses
Sun Oct 23 13:45:39 2022 daemon.info dnsmasq[1278]: read /etc/hosts - 4 addresses
Sun Oct 23 13:45:39 2022 daemon.info dnsmasq[1278]: read /var/run/hosts_olsr.stable - 1104 addresses
Sun Oct 23 13:46:04 2022 daemon.info dnsmasq[1278]: read /etc/hosts - 4 addresses
Sun Oct 23 13:46:04 2022 daemon.info dnsmasq[1278]: read /var/run/hosts_olsr.stable - 1104 addresses
Sun Oct 23 13:46:29 2022 daemon.info dnsmasq[1278]: read /etc/hosts - 4 addresses
Sun Oct 23 13:46:29 2022 daemon.info dnsmasq[1278]: read /var/run/hosts_olsr.stable - 1104 addresses
Sun Oct 23 13:46:57 2022 daemon.info dnsmasq[1278]: read /etc/hosts - 4 addresses
Sun Oct 23 13:46:57 2022 daemon.info dnsmasq[1278]: read /var/run/hosts_olsr.stable - 1104 addresses
Sun Oct 23 13:47:27 2022 daemon.info dnsmasq[1278]: read /etc/hosts - 4 addresses
Sun Oct 23 13:47:27 2022 daemon.info dnsmasq[1278]: read /var/run/hosts_olsr.stable - 1104 addresses
Sun Oct 23 13:47:43 2022 daemon.info dnsmasq[1278]: read /etc/hosts - 4 addresses
Sun Oct 23 13:47:43 2022 daemon.info dnsmasq[1278]: read /var/run/hosts_olsr.stable - 1104 addresses
Sun Oct 23 13:48:11 2022 daemon.info dnsmasq[1278]: read /etc/hosts - 4 addresses
Sun Oct 23 13:48:11 2022 daemon.info dnsmasq[1278]: read /var/run/hosts_olsr.stable - 1104 addresses
Sun Oct 23 13:48:35 2022 daemon.info dnsmasq[1278]: read /etc/hosts - 4 addresses
Sun Oct 23 13:48:35 2022 daemon.info dnsmasq[1278]: read /var/run/hosts_olsr.stable - 1104 addresses

Every time the mesh changes you get these messages - and the mesh changes all the time. This chatter essentially flushes anything useful from the log.

@ab7pa
Copy link
Contributor Author

ab7pa commented Oct 24, 2022

I did a quick survey of some local nodes and found that over 80% of log messages were generated by dnsmasq.

@ab7pa
Copy link
Contributor Author

ab7pa commented Oct 27, 2022

After continuing to run this mod, the logs now are able to contain 4 days of log messages which is very helpful.

Copy link
Contributor

@aanon4 aanon4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes the logs usable again - approved

@dman776 dman776 changed the title stop dnsmasq from filling the log stop dnsmasq from filling the log 11/01/2022 Nov 1, 2022
@dman776 dman776 merged commit 7e5adf1 into aredn:main Nov 1, 2022
@ab7pa ab7pa deleted the dnsmasq-nolog branch November 1, 2022 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants