LOG define max filesize, best data persistence

Hi,

I have now had to realise for the second time that my internal memory is full, as demon/syslog and ebus log have accumulated a total of 20GB.

Where can I set the maximum memory size of the logs?

In addition, I would also look for a data persistence that stores a data history in order to display it in influxdb, for example, and can also call up normal int values after a restart without loading them as a float.

memory or disk space ?
Did you analyse what is being logged and if you require that ( deep ) level of logging ?

I think there are two places where you can tune it.
a) for non openhab ( resp. log4j2 ) related logging have a look at the manual page of logrotate.conf ( man 5 logrotate.conf ). Configuration is done in /etc/logrotate.conf resp. application related in /etc/logrotate.d/ in application related files.
b) for openhab ( resp. log4j2 ) relating logging like it is done in /var/log/openhab/ directory. The configuration is done in file /var/lib/openhab/etc/log4j2.xml .

In both kind of configuration files you can setup a filesize that will trigger a rotation of the logfile as well as if rotated files are to be compressed and how many of them are to be kept.
An intro with examples of logrotate configuration is explained in e.g. Logrotate | Ashraf's Linux Blog

Before doing any change to the default I would go to the /var/log directory and check where the maximum of storage is related to. E.g. do

sudo du -s -h /var/log

to check for the total amount of used disk space in /var/log. Command returns space in human ( h ) readable format.

To check for the top ten files/dirs in in /var/log do:

sudo du -s -k /var/log/* | sort -nr | head
27684   /var/log/openhab
644     /var/log/wtmp
552     /var/log/samba
480     /var/log/mosquitto
444     /var/log/daemon.log.1
392     /var/log/daemon.log
292     /var/log/lastlog
256     /var/log/nginx
236     /var/log/auth.log.1
220     /var/log/auth.log

Values in this list are in kB.