Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

System log full? Clear without restart

Featured Replies

My system log runs full and I know definitely why.
Is there a way to clear it without a restart?

Edited by abra8c

  • 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.

  • Author

Thanks that worked.
It fills up because of the mover logging. I enabled it to troubleshoot something.

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

  • 2 years later...

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 

  • 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

  • 10 months later...

 

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 .#.

  • 4 months later...

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.

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

 

  • 1 month later...
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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.