(I’m feeling particularly dumb, having panicked when my *min partition filled… benign neglect is NOT a good thing! I had to go to backup due to deleting crucial stuff…and then didn’t even copy other crucial post-backup files. Sigh.)
I just discovered a set of log files on my *min system that have never been truncated, ever since I first set this up four years ago. Some of the files are QUITE large now.
QUESTION: what admin (script?) am I missing?
NOTES:
webmin.debug and webmin.debug.0 are only a few days old
lookup-domain-daemon.log started Aug 2024
The rest go wayyy back
-rw-r--r-- 1 root root 2722580 Jun 30 10:13 webmin.debug
-rw-r--r-- 1 root root 9719126 Jun 30 10:13 lookup-domain-daemon.log
-rw------- 1 root root 10547700 Jun 30 10:08 miniserv.log
-rw-r--r-- 1 root root 12129745 Jun 30 10:13 webmin.debug.0
-rw------- 1 root root 150428414 Jun 30 10:10 webmin.log
-rw-r--r-- 1 root root 4969372906 Jun 30 10:08 miniserv.error
The setting only seems to be effecting the miniserv.log. I set it to one hour and I still see logs from aug 2024 in the webmin.log. There also other logs not getting effected like the lookup-domain-daemon.log (getting large), can that be cleared as well
P.S. Just looked again and webmin.log has been purged, but other have not.
unless folk are aware of them what is the point of a log that is never used.
A log has to be both known and used to have any purpose - at which point it should have some clear policy (documented) for its removal/cleaning/backup from the system.
Is there a way to force a clean manually? This seems useful.
Perhaps even better: how about incorporating these logs into the logrotate system? I do like to keep many old logs around (NOT all). I have email logs going back many years…
Also, could you possibly fix the issue of saving variables to both files, i.e. miniserv.conf and config? We could read miniserv.conf from webmin_log—what’s the point of this complexity by adding options to both files?
I think Jamie chose hours to account for debug logs, since they can fill up really fast.
@MrPete It looks like you can add them to the Webmin > System > Log File Rotation module if you want. That module has a button to Force Log Rotation individually or global.
As with any other service: Delete the log file (or move it), and restart the service (or SIGHUP or whatever, but Webmin restarts basically instantly, so that’s how Webmin applies changes to Webmin).
Whatever the “clean” script is, if we are able to run that script manually, it enables us to see what actually gets cleaned…
AND, allows cleanly resetting the logs that need cleaning.
This may be particularly important when setting the clean interval to a few months. I have a hunch that interval might be set to N (hours/months) in the future, not “clean now, then wait X time.”
Could you double-check that it actually works at all? I mean, even if it’s explicitly enabled, do your miniserv.error files get cleared?
And, what does “Periodically clear log files” actually mean? Are the files cleared completely, or does it keep logs for a set period (like keeping the last 7 days if set to 168 hours)?