Bug Report - Log trim cronjob stops logger from writing logs
Posted: Thu Dec 13, 2012 11:27 am
Hi Boris,
I have discovered a bug in the current version of meteohub (v4.9q), although I suspect it's been present for a while.
The bug is that at 00:15, when a cron job is called to trim the meteohub.log file, it causes the "logger" process to stop writing it's errors, etc to the meteohub.log file. Perhaps "logger" doesn't like having the file moved/removed/recreated in-flight?
I have proven this behaviour, as by disabling that line in the crontab, it prevents the problem from occurring.
I noticed the problem as the RF errors from my RFXCOM always seemed to stop logging at the same time each night (00:15). I would never see the errors again until I restarted the data logging, and then it would stop again at 00:15 the next day. I've managed to track it down to the log-trimming job.
Hope this is of some help!
Cheers,
Graham
I have discovered a bug in the current version of meteohub (v4.9q), although I suspect it's been present for a while.
The bug is that at 00:15, when a cron job is called to trim the meteohub.log file, it causes the "logger" process to stop writing it's errors, etc to the meteohub.log file. Perhaps "logger" doesn't like having the file moved/removed/recreated in-flight?
I have proven this behaviour, as by disabling that line in the crontab, it prevents the problem from occurring.
I noticed the problem as the RF errors from my RFXCOM always seemed to stop logging at the same time each night (00:15). I would never see the errors again until I restarted the data logging, and then it would stop again at 00:15 the next day. I've managed to track it down to the log-trimming job.
Hope this is of some help!
Cheers,
Graham