

Then at midnight it processes the combined file into a final daily log - stripping out everything except the query lines (discarding the responses and DHCP reports) and reformatting to a date/ip address/domain format like webmon output - and empties the original. The newest version of the script uses tmp/var/log/dnslog as the -log-facility target, and it appends this to a file on a cifs share every so often and empties it. is this another thing I'm worrying about unnecessarily? Looking at a (admittedly old and probably out of date) schedule for tomato startup at it doesn't seem to be guaranteed that the USB will be fully mounted by the time dnsmasq is started. I couldn't find a USB build of shibby that fitted on my WNR3500Lv2 that let me format the jffs. Ok, great, thanks! So not the issue I thought it was then - and I'm definitely not using jffs for logsĪt the moment, I have sacrificed the USB capability for a jffs partition (for storing scripts). I'd appreciate any pointers anyone can give me. I have about 50MB of RAM available so there is some wriggle room (I assume /tmp/var is based in RAM?) Should it be using /tmp/var/logs? I am sure there is a convention for what all these directories in the file system are for.

Ignoring the potential issues with the log size - I can work around that by processing the file regularly - where should this log ideally live? I assume a cifs share is a stupid idea (not least for the fact that dnsmasq complains when the router boots up because it starts before the cifs share is available, but it eventually manages to get it). The biggest issue is that I have to restart dnsmasq to get it to play nicely with the cifs share when I empty the log file at midnight, and this tends to make dnsmasq ignore the -log-facility argument and start logging in the router's log files. This seems to cause a few issues that I've tried to work around but my solutions just throw up more issues themselves. This gives me significantly more results than relying on webmon (most notably it is immune from https!)ĭue to the verbose nature of the dnsmasq output (from -log-queries), I am using a cifs share as the location for the temporary log files from dnsmasq. I am working on capturing all dns queries through a tomato router (for web activity logging).
