disable logging in beaglebone black

205 views
Skip to first unread message

jennifer Dsilva

unread,
Aug 13, 2020, 7:15:24 AM8/13/20
to BeagleBoard

how can we disable logging in bbb? my bbb writes log files into /var/log/ directory and consumes a lot of space

jonnymo

unread,
Aug 13, 2020, 4:13:52 PM8/13/20
to Beagle Board
You could look at '/etc/rsyslog.conf' and disable any logging you do not wish to keep track of.
You would have to either restart the board or restart the service for it to take.

Ex:
   sudo /etc/init.d/rsyslogd stop
   sudo /etc/init.d/rsyslogd start

The other option would be to remove any .gz file under /var/log that you do not want or create a script that purges these.

However, if you are getting an excessive amount of logging on something particular like messages, then it might be best to find what that issue is and see if it can be resolved.   Just a suggestion. 


Cheers,

Jon

On Thu, Aug 13, 2020 at 4:15 AM jennifer Dsilva <jennifer...@gmail.com> wrote:

how can we disable logging in bbb? my bbb writes log files into /var/log/ directory and consumes a lot of space

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/bc51ea4c-f240-426a-a24a-9aedaeed457ao%40googlegroups.com.

Tarmo

unread,
Aug 14, 2020, 4:43:43 AM8/14/20
to BeagleBoard
On Thursday, 13 August 2020 14:15:24 UTC+3, jennifer Dsilva wrote:
how can we disable logging in bbb? my bbb writes log files into /var/log/ directory and consumes a lot of space

As Jon mentioned, if you're getting anomalously verbose logs then have a look at what is the source of it and why. Generally I'd expect less then a megabyte of new logs every day from the system, plus any services which you're running. I don't know how verbose are the high-level services on official images (like nodejs, cloud9 etc) - I remove those before doing anything else.

If you're worried about running out of disk space, then find the source of verbose logs and fix it.

If you're worried about killing the Flash chip with frequent writes, the standard mitigation procedure is to divert the entire /var/log directory to a ramdisk. Some people use tmpfs, some people overlayfs. Latter is probably easier to set up.

--
Kind regards,
Tarmo

Alexander Zangerl

unread,
Aug 16, 2020, 5:20:24 PM8/16/20
to beagl...@googlegroups.com
On Thu, 13 Aug 2020 04:15:24 -0700, jennifer Dsilva writes:
>how can we disable logging in bbb? my bbb writes log files into /var/log/
>directory and consumes a lot of space

besides what others already suggested wrt figuring out what's too verbose
i'd suggest checking and adjusting your logrotation settings
(in /etc/logrotate.d/* and /etc/logrotate.conf) to keep stuff from
filling up your disk.


--
Best Regards,
Alexander Zangerl
IT Engineer

BREATHE-SAFE intelligent cabin air filtration
Keeps your lungs and cabin dust free!
Head Office: 37-43 Argon Street, Carole Park QLD 4300 Australia
Western Australia: 169 Chisholm Crescent, Kewdale WA 6105
Tel: +61 7 3276 7833 M. +61 415 482 341 E. a...@breathe-safe.com
Reply all
Reply to author
Forward
0 new messages