× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: Correct way to delete all logs

aks-2
Apprentice

Correct way to delete all logs

I am downloading the full logs from the ReadyNAS 214 dashboard. After that, I 'clear logs', which does remove all entries displayed on the dashboard. However, I noticed that many logs remain intact on the system if I ssh in and poke around, particularly the backup log files in /var/log/frontview/backup/. Various system logs also are not cleared.

 

This leads me to wonder what is the correct way of clearing out all logs then?

 

Model: RN21400|ReadyNAS 214 Series 4- Bay (Diskless)
Message 1 of 15

Accepted Solutions
StephenB
Guru

Re: Correct way to delete all logs


@aks-2 wrote:

I am not so worried about free space, just want to avoid issues later - so this is just maintenance:

> df
Filesystem      1K-blocks       Used  Available Use% Mounted on
udev                10240          4      10236   1% /dev
/dev/md0          3862208     629072    3007244  18% /
tmpfs             1032992         12    1032980   1% /dev/shm
tmpfs             1032992        664    1032328   1% /run
tmpfs              516500       1656     514844   1% /run/lock
tmpfs             1032992          0    1032992   0% /sys/fs/cgroup
/dev/md125     8775854208 5654598068 3119758764  65% /data

Well, you could clear things out more completely with journalctl.  But maybe first use journalctl --disk-usage to see how much space you are actually talking about.  My logs haven't been cleared for quite a while, and I am still only using 36 MB.

 

If you do want want to empty them more agressively, you'd use journalctl --rotate followed by journalctl --vacuum-time=1s.  But personally I'd just leave well enough alone.

 

 

View solution in original post

Message 14 of 15

All Replies
StephenB
Guru

Re: Correct way to delete all logs


@aks-2 wrote:

I am downloading the full logs from the ReadyNAS 214 dashboard. After that, I 'clear logs', which does remove all entries displayed on the dashboard. However, I noticed that many logs remain intact on the system if I ssh in and poke around, particularly the backup log files in /var/log/frontview/backup/. Various system logs also are not cleared.

 


Clear logs clears more than what is on the dashboard.  Backup jobs are cleared using the control in the backup job setting (there is  clear log on the logs page).

 

What system logs are you seeing?  The NAS logs in the zip are mostly generated on the fly from journalctl, and don't exist as separate files.

 

 

Message 2 of 15
aks-2
Apprentice

Re: Correct way to delete all logs

Yes I can clear each backup log, one by one, from the backup jobs list. That's fine, thanks.

 

I notice the other system logs, e.g. smbd.log, contains data from a year ago, i.e. not 'cleared':

 

[2020/10/03 16:15:49.760477,  0] ../lib/util/become_daemon.c:136(daemon_ready)
  daemon_ready: daemon 'smbd' finished starting up and ready to serve connections

There are several growing logs, which was an issue in the days past with older Duo/NV+ v2, etc (I recall), so just wondering how to manage these logs to avoid disks filling up with stuff no longer needed?

Message 3 of 15
StephenB
Guru

Re: Correct way to delete all logs


@aks-2 wrote:

 

I notice the other system logs, e.g. smbd.log, contains data from a year ago, i.e. not 'cleared':

 


There is no smbd.log file on my system.

 

Are you finding this with ssh?  If so, was rsyslog installed on your system?

 


@aks-2 wrote:

There are several growing logs, which was an issue in the days past with older Duo/NV+ v2, etc (I recall), so just wondering how to manage these logs to avoid disks filling up with stuff no longer needed?


How full is your OS partition?

Message 4 of 15
aks-2
Apprentice

Re: Correct way to delete all logs

I am downloading from the dashboard, and unzipping the file. I find 113 log files, here is a snip:

 

ReadyNAS-log.PNG

 

I am not yet worried about OS partition space, just establishing the correct process for clearing (maintenance).

 

# df
Filesystem      1K-blocks       Used  Available Use% Mounted on
udev                10240          4      10236   1% /dev
/dev/md0          3862208     629072    3007244  18% /
tmpfs             1032992         12    1032980   1% /dev/shm
tmpfs             1032992        664    1032328   1% /run
tmpfs              516500       1660     514840   1% /run/lock
tmpfs             1032992          0    1032992   0% /sys/fs/cgroup
/dev/md125     8775854208 5654598068 3119758764  65% /data

Looks like I don't have to worry for a while, but for maintenance would like to better understand.

 

Cheers

Message 5 of 15
aks-2
Apprentice

Re: Correct way to delete all logs

I am downloading the logs via the dashboard, then unzipping them. Here is an extract (it shows the file I mention) which has 113 log files:

ReadyNAS-log.PNG

 

I am not worried about free space, but here is volume info:

# df
Filesystem      1K-blocks       Used  Available Use% Mounted on
udev                10240          4      10236   1% /dev
/dev/md0          3862208     629072    3007244  18% /
tmpfs             1032992         12    1032980   1% /dev/shm
tmpfs             1032992        664    1032328   1% /run
tmpfs              516500       1660     514840   1% /run/lock
tmpfs             1032992          0    1032992   0% /sys/fs/cgroup
/dev/md125     8775854208 5654598068 3119758764  65% /data
Message 6 of 15
aks-2
Apprentice

Re: Correct way to delete all logs

My quick reply included an image - I thought the system hadn't registered the reply, so re-did it, but the second reply is also [currently] not showing. My guess is the image has caused it to go through a clearing/approval process.

Message 7 of 15
aks-2
Apprentice

Re: Correct way to delete all logs

The replies with images attached are not showing, so I'll use txt only which seems to still be fine:

 

I downloaded the logs via the dashboard, then unzipped the file. I get 113 log files out, including smbd.log - here is an extract:

 

26/08/2021  12:57            25,608 processes.log
26/08/2021  12:57               802 readycloud.log
26/08/2021  12:57                18 readydr.log
26/08/2021  12:57                18 readynas-upgrade.log
26/08/2021  12:57           115,402 readynasd.log
26/08/2021  12:57            12,903 rn-expand.log
26/08/2021  12:25             2,089 services.conf
26/08/2021  12:57             3,019 sgdisk.log
26/08/2021  12:57            29,668 shares.log
26/08/2021  12:57             1,080 smart_history.log
26/08/2021  12:57           251,845 smbd.log
26/08/2021  12:57               750 smbstatus.log
26/08/2021  12:57             3,706 snapper.log
26/08/2021  12:57           336,421 spindown.log
26/08/2021  12:57            23,578 status.log
26/08/2021  12:57            36,935 sysctl.log
26/08/2021  12:57           510,504 system.log
26/08/2021  12:57            26,703 systemctl-status.log
26/08/2021  12:57           490,712 systemd-journal.log

I am not yet worried about volume space, just want to avoid bigger prblems, so this is just for maintenance. Volume free space:

df
Filesystem      1K-blocks       Used  Available Use% Mounted on
udev                10240          4      10236   1% /dev
/dev/md0          3862208     629072    3007244  18% /
tmpfs             1032992         12    1032980   1% /dev/shm
tmpfs             1032992        664    1032328   1% /run
tmpfs              516500       1660     514840   1% /run/lock
tmpfs             1032992          0    1032992   0% /sys/fs/cgroup
/dev/md125     8775854208 5654598068 3119758764  65% /data

Cheers

 

Message 8 of 15
StephenB
Guru

Re: Correct way to delete all logs


@aks-2 wrote:

My quick reply included an image - I thought the system hadn't registered the reply, so re-did it, but the second reply is also [currently] not showing. My guess is the image has caused it to go through a clearing/approval process.


The image does need to be approved (which I did), but it doesn't seem to be attached to a post.

 

The image shows that you are looking in the log zip file, and not with ssh.  As I said before, most of the files (including that one) are constructed on-the-fly via journalctl. 

 

Not sure why it doesn't clear out more, but as long as you have a good amount of free space in the OS partition (which you can see in volume.log), you should be fine.  The log is also automatically truncated by the system, so you normally don't need to clear them. 

 

There was an rsyslog app that mirrored the logging. That unfortunately wasn't written properly, and did result a full OS partition. But I think that has been removed.  

Message 9 of 15
aks-2
Apprentice

Re: Correct way to delete all logs

Multiple times now, my replies are not appearing. I did write a full test response, it said "success" but then it doesn't appear after I refresh the thread. I recall a similar problem in the past, so wonder what is going on - of course this may not become visible either!

 

Message 10 of 15
aks-2
Apprentice

Re: Correct way to delete all logs

I am not so worried about free space, just want to avoid issues later - so this is just maintenance:

> df
Filesystem      1K-blocks       Used  Available Use% Mounted on
udev                10240          4      10236   1% /dev
/dev/md0          3862208     629072    3007244  18% /
tmpfs             1032992         12    1032980   1% /dev/shm
tmpfs             1032992        664    1032328   1% /run
tmpfs              516500       1656     514844   1% /run/lock
tmpfs             1032992          0    1032992   0% /sys/fs/cgroup
/dev/md125     8775854208 5654598068 3119758764  65% /data
Message 11 of 15
StephenB
Guru

Re: Correct way to delete all logs


@aks-2 wrote:

Multiple times now, my replies are not appearing. I did write a full test response, it said "success" but then it doesn't appear after I refresh the thread. I recall a similar problem in the past, so wonder what is going on - of course this may not become visible either!

 


Four of your posts triggered the automatic spam filter. 

Message 12 of 15
aks-2
Apprentice

Re: Correct way to delete all logs

Yes it seems so, damn, I was just in the "community feedback" section to find the cause as I recall it from before (I've made a post and it's not showing up).

I have been around these forums for many years, I don't recall any complaints about my posts...

Message 13 of 15
StephenB
Guru

Re: Correct way to delete all logs


@aks-2 wrote:

I am not so worried about free space, just want to avoid issues later - so this is just maintenance:

> df
Filesystem      1K-blocks       Used  Available Use% Mounted on
udev                10240          4      10236   1% /dev
/dev/md0          3862208     629072    3007244  18% /
tmpfs             1032992         12    1032980   1% /dev/shm
tmpfs             1032992        664    1032328   1% /run
tmpfs              516500       1656     514844   1% /run/lock
tmpfs             1032992          0    1032992   0% /sys/fs/cgroup
/dev/md125     8775854208 5654598068 3119758764  65% /data

Well, you could clear things out more completely with journalctl.  But maybe first use journalctl --disk-usage to see how much space you are actually talking about.  My logs haven't been cleared for quite a while, and I am still only using 36 MB.

 

If you do want want to empty them more agressively, you'd use journalctl --rotate followed by journalctl --vacuum-time=1s.  But personally I'd just leave well enough alone.

 

 

Message 14 of 15
aks-2
Apprentice

Re: Correct way to delete all logs

Thanks again:

# journalctl --disk-usag
Archived and active journals take up 52.0M on disk.

I don't think I need to worry Smiley Happy!

Thanks a lot for the pointers.

Message 15 of 15
Top Contributors
Discussion stats
  • 14 replies
  • 2869 views
  • 1 kudo
  • 2 in conversation
Announcements