Log Rotate Weirdness

Morning experts!
Digging around in my system now I’m back home, decided to check a few things
Quick check of my log files indicated that they stopped rotating properly on May 17
hosts file had been (partially) overwritten. No biggy
Fix that and force a rotate to be told there’s a session already running.
Kill the lock for that and go again:
For each file to be rotated and up loaded I now get this error:
sh: 06-24-45: bad number
For example I have : -rw-r–r-- 1 root root 56474780 May 22 06:24 NetworkMonitor.log_2019-05-22_06-24-45

Although some of them seem to have been uploaded, may still exist in the /var/log/cmh

Any suggestions?



Few months ago I think I had a similar problem with similar errors (I think). Logs were not rotating and the log partition was full. I just had to delete the largest log file and it settled down at the next rotation.

Then had another issue, again I forget the details of how I fixed it but I think the symlink /usr/bin/Rotate_Logs.sh was broken to the /mios/usr/bin/Rotate_Logs.sh


Doesn’t sound like the issue I have but cheers


Interesting as I am also looking at the RotateLogs.sh script myself and am finding it way more complicated than it needs to be. Since I killed my NetworkMonitor and all my tunnels and other services, I only need 2 log files and do not need any upload. I think I will be rewriting it when I get back from my current travel.

1 Like

did you rewrite it eventually @rafale77

Yes I have, but I did it mostly for my emulator so… I mostly deleted all the upload to server stuff and extended the interval between rotations so as to have either bigger files or one log covering every 12h.

I am hesitant to share it as it based on a very modified setup. Should be both extrooted and taken off the mios servers.