/var/log maintenance

Status
Not open for further replies.

balanga

Patron
Joined
Jul 10, 2014
Messages
271
How should I go about maintaining/checking logfiles in /var/log?

I just noticed that debug.log is quite large - >2MB and have no idea about most of the entries?

eg:-

Aug 12 11:07:32 freenas alert.py: [middleware.notifier:208] Popen()ing: /sbin/zpool status -x freenas-boot
Aug 12 11:07:32 freenas alert.py: [middleware.notifier:208] Popen()ing: zpool list -H -o health nas
Aug 12 11:07:32 freenas alert.py: [middleware.notifier:208] Popen()ing: /sbin/zpool status -x nas
Aug 12 11:08:32 freenas alert.py: [middleware.notifier:208] Popen()ing: /sbin/zpool status -x freenas-boot
Aug 12 11:08:32 freenas alert.py: [middleware.notifier:208] Popen()ing: zpool list -H -o health nas
Aug 12 11:08:32 freenas alert.py: [middleware.notifier:208] Popen()ing: /sbin/zpool status -x nas
Aug 12 11:09:32 freenas alert.py: [middleware.notifier:208] Popen()ing: /sbin/zpool status -x freenas-boot
Aug 12 11:09:32 freenas alert.py: [middleware.notifier:208] Popen()ing: zpool list -H -o health nas
Aug 12 11:09:32 freenas alert.py: [middleware.notifier:208] Popen()ing: /sbin/zpool status -x nas
 
D

dlavigne

Guest
There is a built-in script that does log rotation (assuming your box isn't shut off at night). You should make sure that the logs are on a device or pool large enough to hold them (in System -> System Dataset).
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
But do logs ever get deleted?

And what is the suggested way of viewing a *.bz2 file.

There are so many log files and I'm not really sure what most of them do and which to check. In the example above I have no idea what was being reported and whether I needed to take any action.
 
D

dlavigne

Guest
Yes, as only so many logs are kept (they are deleted, oldest first).

Use bzcat or bzmore to read a zipped file.
 
Status
Not open for further replies.
Top