HNGamingUK Posted January 17, 2020 Share Posted January 17, 2020 Hello, I have 2 scripts that automatically move files from local storage to GDrive. I currently have the logs going to a user share under /mnt/user/rclone/logs I also have setup logrotate in /etc/logrotate.d to rotate the logs daily and keep 7 of them. I wanted to know if it's okay to store logs in /var/log instead? Quote Link to comment
BRiT Posted January 17, 2020 Share Posted January 17, 2020 /var/log/ is is RAM. It will all be removed on reboots. Since it's in memory, the more you store the more it uses. If you don't have enough memory it will lead to OOM - Out of Memory errors and the kernel will pick randomly what programs to kill. Quote Link to comment
HNGamingUK Posted January 17, 2020 Author Share Posted January 17, 2020 2 minutes ago, BRiT said: /var/log/ is is RAM. It will all be removed on reboots. Since it's in memory, the more you store the more it uses. If you don't have enough memory it will lead to OOM - Out of Memory errors and the kernel will pick randomly what programs to kill. Thought as much, one of the script has been running since this morning at 8:00 and is at 7.2KB. Will need to watch it over the next 7 days and see how large the files and rotated logs get. All it stores in the log is when the move starts and when it finished with how long it took in seconds. So 2 lines. The script is running every 10mins unless it is already moving. So it has the potential to write 2 lines every 10mins. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.