I’ve discussed this with @glyn.hudson and we had a look at the log2ram repository. The ability to avoid the /var/log setup currently in rc.local as you describe @pb66 is really interesting. Is it possible to turn off the syncing to disk? We are keen to avoid writing the logs to disk, I think this has been discussed before. Is there a way the behaviour could be user selectable? will log2ram work with older distributions, /etc/init.d scripts etc?
Glyn has also just tested the logrotate script in the emoncms repository that we had running on the previous image emoncms/scripts/logger at master · emoncms/emoncms · GitHub (this was mistakenly left out in this current image). The script works well, rotates and deletes the logs but does of course require the rc.local entries.
We’ve also looked again at Better handling of files in tmpfs /var/log - #13 by pb66, the requirement for /var/log/directory/logfile.log structure seems to be a sticking issue. We also need to rotate /var/log/daemon.log and /var/log/syslog.
For the current emonpi image with the existing rc.local, solution 2 will fix the immediate problem of the logs filling up quickly. Glyn’s keen to merge that in to the update process in the interim so that we can then consider a better solution as part of the longer term plan