September 10, 20205 yr My system log runs full and I know definitely why. Is there a way to clear it without a restart? Edited September 10, 20205 yr by abra8c
September 10, 20205 yr Community Expert Just now, abra8c said: I know definitely why. Why? 1 minute ago, abra8c said: Is there a way to clear it without a restart? You might be able to delete old logs (syslog.1, syslog.2, ...) in /var/log. Doubt you can delete the current syslog.
September 10, 20205 yr Author Thanks that worked. It fills up because of the mover logging. I enabled it to troubleshoot something.
September 10, 20205 yr 7 minutes ago, trurl said: You might be able to delete old logs (syslog.1, syslog.2, ...) in /var/log. Doubt you can delete the current syslog. I had to do this a few weeks back when my logs filled up and didn't want to reboot. If I remember right, I think I was able to delete the current syslog as well. 9 minutes ago, trurl said: Why? Why? In my case, not entirely sure but it was related to the webgui server and some issues with it - probably because I left a browser window open on a computer for too long. I also had to nuke the web server and restart it. In hind sight, I probably should have just moved the logs off onto the array in case I needed to troubleshoot something. Anyway, I find this to be a good tip in case you don't want to or can't reboot. ymmv
June 27, 20233 yr Might be useful for someone in the future but you can run this via ssh or terminal in gui: truncate -s 0 /var/log/syslog this will effectively empty the syslog
June 27, 20233 yr Community Expert 3 hours ago, helvete said: this will effectively empty the syslog but note that other files could be taking up log space in /var/log and its subfolders
May 8, 20242 yr On 6/27/2023 at 10:33 AM, helvete said: Might be useful for someone in the future but you can run this via ssh or terminal in gui: truncate -s 0 /var/log/syslog this will effectively empty the syslog Just to add that this will also work if it's syslog.1 or syslog.2, etc. Just append the .#.
September 11, 20241 yr this is a linux system a reboot is not a solution. if logs are getting full there should be a way to force logrotate daemon to rotate the syslog file more frequently and reduce the number of logs you store. I would wholeheartedly agree with the reboot solution if this was a Microsoft solution. I have modified my logrotate file to rotate the file every time it hits 512kb. Will provide an update if this works. But I think it's sloppy that the system falls over when you have enough disk space but the syslog gets full.
September 11, 20241 yr Another temporary workaround which will allow you to examine things while debugging is to increase the size of the "/var/log" ramfs filesystem: # increase tmpfs for logging mount -t tmpfs tmpfs /var/log -o size=1G,remount
October 22, 20241 yr On 9/11/2024 at 4:56 PM, nick5429 said: Another temporary workaround which will allow you to examine things while debugging is to increase the size of the "/var/log" ramfs filesystem: should it work by increase Local syslog maximum file size ? i have strange `rsyslogd: file '/var/log/syslog'[7] write error - see https://www.rsyslog.com/solving-rsyslog-write-errors/ for help OS error: No space left on device [v8.2102.0 try https://www.rsyslog.com/e/2027 ]` when syslog 133mb but config is 200mb 2 files Unraid 6.12.13
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.