disable logging in beaglebone black

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

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

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.

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.