emonSD next steps: filesystem & logrotate

@pb66, I must be missing it, but I cannot see that this is true. olddir does not appear in the repo and your symbolic link is only active if there is a rotated_logs folder.

I think we should differentiate between

  • A desire to have a system of persistent logs for all services which includes a mechanism to restore the /var/log structure so is behaves on startup for any additional software installed
  • A desire to hold emon* logs for longer.

I have to say I am not convinced of L2R, it seems convoluted to me and I really do not like a Cron job calling a service by reload! I was reminded of this work by @jsroques Mosquitto won't start on boot after raspbian and emonsd update - #41 by jsroques which is much the same.

I also think we need to start from scratch (on the new Install process - consider retro fitting later).

  1. Get rid of all the rc.local stuff and the rsyslog & logrotate modifications.
  2. Setup the management of a tmpfs /var/log/ for persistence and management of other systems that are installed (e.g. mosquitto that just assumes the log file is there form the install process).
  3. Develop a mechanism to generate emon* system logs
  4. Rotate and preserve emon* logs.
1 Like