Log2Ram uses max amount assigned memory

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

njlammerts
Posts: 149
Joined: Wednesday 12 August 2020 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Fryslan
Contact:

Re: Log2Ram uses max amount assigned memory

Post by njlammerts »

pi@Pi245:~ $ sudo systemctl stop systemd-journald.service

Warning: Stopping systemd-journald.service, but it can still be activated by:
systemd-journald.socket
systemd-journald-audit.socket
systemd-journald-dev-log.socket

I removed ll the journal files (not deleting dir)

pi@Pi245:/var/log/journal/f95f24a098d047ecb6f4402309e1d1e8 $ ls -la
total 16384
drwxr-sr-x+ 2 root systemd-journal 80 Mar 9 12:58 .
drwxr-sr-x+ 3 root systemd-journal 60 Feb 23 14:17 ..
-rw-r-----+ 1 root systemd-journal 8388608 Mar 9 14:19 system.journal
-rw-r-----+ 1 root systemd-journal 8388608 Mar 9 14:19 user-1000.journal


How can I check if jobrotate did its job?
I did all the previous setting suggeted in this topic
Kedi
Posts: 575
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Log2Ram uses max amount assigned memory

Post by Kedi »

Every day files like xxxx.1 should be created from the daemon.log and syslog.
Is size of /var/log normalized? Check with df -h /var/log
Logic will get you from A to B. Imagination will take you everywhere.
njlammerts
Posts: 149
Joined: Wednesday 12 August 2020 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Fryslan
Contact:

Re: Log2Ram uses max amount assigned memory

Post by njlammerts »

I did a check on 9 mrt 22:40h

pi@Pi245:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 29G 2.6G 26G 10% /
devtmpfs 667M 0 667M 0% /dev
tmpfs 925M 0 925M 0% /dev/shm
tmpfs 370M 25M 346M 7% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
/dev/mmcblk0p1 255M 52M 204M 21% /boot
log2ram 192M 18M 175M 9% /var/log
tmpfs 185M 0 185M 0% /run/user/1000

pi@Pi245:~ $ df -h /var/log
Filesystem Size Used Avail Use% Mounted on
log2ram 192M 18M 175M 9% /var/log
Kedi
Posts: 575
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Log2Ram uses max amount assigned memory

Post by Kedi »

The 9% looks good, seems that your problem is solved.
Logic will get you from A to B. Imagination will take you everywhere.
njlammerts
Posts: 149
Joined: Wednesday 12 August 2020 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Fryslan
Contact:

Re: Log2Ram uses max amount assigned memory

Post by njlammerts »

check on 11 march 2024 17:00

pi@Pi245:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 29G 2.7G 26G 10% /
devtmpfs 667M 0 667M 0% /dev
tmpfs 925M 0 925M 0% /dev/shm
tmpfs 370M 39M 332M 11% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
/dev/mmcblk0p1 255M 52M 204M 21% /boot
log2ram 192M 74M 119M 39% /var/log
tmpfs 185M 0 185M 0% /run/user/1000


I will try to check again 11 march same time to see what's going on
Kedi
Posts: 575
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Log2Ram uses max amount assigned memory

Post by Kedi »

If you do a

Code: Select all

cd /var/log
ls -lhSr
You will get a directory listing sorted by filesize and can see which file is growing.
To see all the option for the ls command do a

Code: Select all

man ls
Logic will get you from A to B. Imagination will take you everywhere.
njlammerts
Posts: 149
Joined: Wednesday 12 August 2020 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Fryslan
Contact:

Re: Log2Ram uses max amount assigned memory

Post by njlammerts »

3% increase in Log2Ram mem use in 3,5 h

pi@Pi245:/var/log $ ls -lhSr
total 80M
-rw-r----- 1 root adm 0 Mar 10 00:00 user.log
-rw-r--r-- 1 root root 0 Mar 11 00:00 log2ram.log
-rw-r----- 1 root adm 0 Mar 10 00:00 kern.log
-rw-r----- 1 root adm 0 Mar 10 00:00 debug
drwx------ 2 root root 40 May 3 2023 private
drwxr-xr-x 3 root root 60 Feb 23 14:17 runit
drwxr-xr-x 2 mosquitto root 60 Mar 4 13:41 mosquitto
drwxr-sr-x+ 3 root systemd-journal 60 Feb 23 14:17 journal
-rw-r----- 1 root adm 146 Mar 10 00:10 messages.1
-rw-r----- 1 root adm 146 Mar 11 00:10 messages
-rw-r--r-- 1 root root 217 Mar 9 23:55 log2ram.log.2.gz
drwxr-xr-x 2 root root 220 Feb 23 14:17 apt
-rw-r--r-- 1 root root 313 Mar 8 23:55 log2ram.log.3.gz
-rw-r--r-- 1 root root 363 Mar 10 23:55 log2ram.log.1
-rw-rw---- 1 root utmp 384 Mar 10 15:01 btmp
-rw-r----- 1 root adm 401 Mar 9 12:59 user.log.1
-rw-r----- 1 root adm 947 Mar 9 12:58 debug.1
-rw-r--r-- 1 root root 2.7K May 28 2023 faillog
-rw-r----- 1 root adm 4.8K Mar 11 20:17 auth.log
-rw-r----- 1 root adm 7.4K Mar 10 23:17 auth.log.1
-rw-r----- 1 root adm 37K Mar 9 12:58 kern.log.1
-rw-rw-r-- 1 root utmp 177K Mar 11 17:05 wtmp
-rw-rw-r-- 1 root utmp 286K Mar 11 17:05 lastlog
-rw-r----- 1 root adm 20M Mar 11 00:00 daemon.log.1
-rw-r----- 1 root adm 20M Mar 11 00:00 syslog.1
-rw-r----- 1 root adm 21M Mar 11 20:27 daemon.log
-rw-r----- 1 root adm 21M Mar 11 20:27 syslog
pi@Pi245:/var/log $ df -la
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 30391480 2778252 26346264 10% /
devtmpfs 682572 0 682572 0% /dev
proc 0 0 0 - /proc
sysfs 0 0 0 - /sys
securityfs 0 0 0 - /sys/kernel/security
tmpfs 946796 0 946796 0% /dev/shm
devpts 0 0 0 - /dev/pts
tmpfs 378720 38948 339772 11% /run
tmpfs 5120 4 5116 1% /run/lock
cgroup2 0 0 0 - /sys/fs/cgroup
pstore 0 0 0 - /sys/fs/pstore
bpf 0 0 0 - /sys/fs/bpf
systemd-1 - - - - /proc/sys/fs/binfmt_misc
debugfs 0 0 0 - /sys/kernel/debug
sunrpc 0 0 0 - /run/rpc_pipefs
mqueue 0 0 0 - /dev/mqueue
tracefs 0 0 0 - /sys/kernel/tracing
configfs 0 0 0 - /sys/kernel/config
fusectl 0 0 0 - /sys/fs/fuse/connections
/dev/mmcblk0p1 261108 52820 208288 21% /boot
/dev/root 30391480 2778252 26346264 10% /var/hdd.log
log2ram 196608 81832 114776 42% /var/log
tmpfs 189356 0 189356 0% /run/user/1000
binfmt_misc 0 0 0 - /proc/sys/fs/binfmt_misc
njlammerts
Posts: 149
Joined: Wednesday 12 August 2020 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Fryslan
Contact:

Re: Log2Ram uses max amount assigned memory

Post by njlammerts »

11 hours later (next day/morning) this was the result:

pi@Pi245:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 29G 2.7G 26G 10% /
devtmpfs 667M 0 667M 0% /dev
tmpfs 925M 0 925M 0% /dev/shm
tmpfs 370M 39M 332M 11% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
/dev/mmcblk0p1 255M 52M 204M 21% /boot
log2ram 192M 62M 131M 33% /var/log
tmpfs 185M 0 185M 0% /run/user/1000

It seems that jobrotate does his work

listing of /var/log:

pi@Pi245:/var/log $ ls -la
total 63232
drwxr-xr-x 7 root root 600 Mar 12 00:00 .
drwxr-xr-x 12 root root 4096 May 28 2023 ..
drwxr-xr-x 2 root root 220 Feb 23 14:17 apt
-rw-r----- 1 root adm 2749 Mar 12 08:39 auth.log
-rw-r----- 1 root adm 5415 Mar 11 23:17 auth.log.1
-rw-rw---- 1 root utmp 384 Mar 10 15:01 btmp
-rw-r----- 1 root adm 7478875 Mar 12 08:44 daemon.log
-rw-r----- 1 root adm 24601491 Mar 12 00:00 daemon.log.1
-rw-r----- 1 root adm 0 Mar 10 00:00 debug
-rw-r----- 1 root adm 947 Mar 9 12:58 debug.1
-rw-r--r-- 1 root root 2664 May 28 2023 faillog
drwxr-sr-x+ 3 root systemd-journal 60 Feb 23 14:17 journal
-rw-r----- 1 root adm 0 Mar 10 00:00 kern.log
-rw-r----- 1 root adm 36889 Mar 9 12:58 kern.log.1
-rw-rw-r-- 1 root utmp 292292 Mar 12 08:39 lastlog
-rw-r--r-- 1 root root 0 Mar 12 00:00 log2ram.log
-rw-r--r-- 1 root root 321 Mar 11 23:55 log2ram.log.1
-rw-r--r-- 1 root root 226 Mar 10 23:55 log2ram.log.2.gz
-rw-r--r-- 1 root root 217 Mar 9 23:55 log2ram.log.3.gz
-rw-r--r-- 1 root root 313 Mar 8 23:55 log2ram.log.4.gz
-rw-r----- 1 root adm 146 Mar 12 00:10 messages
-rw-r----- 1 root adm 146 Mar 11 00:10 messages.1
drwxr-xr-x 2 mosquitto root 60 Mar 4 13:41 mosquitto
drwx------ 2 root root 40 May 3 2023 private
drwxr-xr-x 3 root root 60 Feb 23 14:17 runit
-rw-r----- 1 root adm 7480112 Mar 12 08:44 syslog
-rw-r----- 1 root adm 24604153 Mar 12 00:00 syslog.1
-rw-r----- 1 root adm 0 Mar 10 00:00 user.log
-rw-r----- 1 root adm 401 Mar 9 12:59 user.log.1
-rw-rw-r-- 1 root utmp 182016 Mar 12 08:39 wtmp
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest