Logs stop ZRAM issue?

Hi,

I’m also having some problems with zram. My logs stop working after about 2 days…

###############################################################################
############### openhab3 ####################################################
###############################################################################

Ip = 192.168.28.92

Release = Raspbian GNU/Linux 10 (buster)

Kernel = Linux 5.10.52-v7l+

Platform = none

Uptime = 2 day(s). 18:56:4

CPU Usage = 6.48% avg over 4 cpu(s) (4 core(s) x 1 socket(s))

CPU Load = 1m: 0.29, 5m: 0.40, 15m: 0.45

Memory = Free: 1.03GB (27%), Used: 2.76GB (73%), Total: 3.79GB

Swap = Free: 2.43GB (100%), Used: 0.00GB (0%), Total: 2.43GB

Root = Free: 20.36GB (73%), Used: 7.39GB (27%), Total: 28.97GB

Updates = 13 apt updates available.

Sessions = 1 session(s)

Processes = 134 running processes of 32768 maximum processes

###############################################################################

openhabian@openhab3:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 29G 7.4G 21G 27% /
devtmpfs 1.8G 0 1.8G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 1.5M 1.9G 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/mmcblk0p1 253M 49M 205M 20% /boot
/dev/zram1 870M 276M 534M 35% /opt/zram/zram1
overlay1 870M 276M 534M 35% /var/lib/openhab/persistence
/dev/zram2 324M 43M 257M 15% /opt/zram/zram2
overlay2 324M 43M 257M 15% /var/lib/influxdb
/dev/zram3 420M 210M 180M 54% /opt/zram/zram3
overlay3 420M 210M 180M 54% /var/log
tmpfs 389M 0 389M 0% /run/user/1000

openhabian@openhab3:~ $ sudo zramctl
[sudo] password for openhabian:
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram3 zstd 450M 412.1M 65.1M 200M 4 /opt/zram/zram3
/dev/zram2 zstd 350M 119.6M 70.2M 82.8M 4 /opt/zram/zram2
/dev/zram1 zstd 900M 309M 12.4M 152.1M 4 /opt/zram/zram1
/dev/zram0 lzo-rle 450M 4K 86B 4K 4 [SWAP]

Hope somone can help.
Restart gets them to work again, as turning of zram… but this is obviously not a good solution…

https://nextcloud.oberwinklers.at/s/CRHis47prj2yaLc

Please use code fences when posting code and logs and such. This is really hard to read.

```
code goes here
```

But the output from df doesn’t show any of the zram file systems being full so I doubt zram has anything top do with this. I’m assuming that df was run after the logs stopped. If not then wait until the logging stops and rerun it. Any time before that it’s meaningless.

Hi,

thanks for your answer. I’ll put the code in “” the next time, thanks for the hint.

The output is indeed after the logs stop… and I am puzzled as well, however… I raised the size of zram3 for now… but It’s only running since 1 day, if it stops again I’ll come back.

The only hint I have that it is indeed zram, is that if I stop zram and go back to the normal system the logs don’t stop…

Hi all

I have the same problem as described above.

Blockquote
openhabian@openHAB-3:~ $ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 29667920 7078668 21571256 25% /
devtmpfs 3904652 0 3904652 0% /dev
tmpfs 4069516 188 4069328 1% /dev/shm
tmpfs 4069516 3864 4065652 1% /run
tmpfs 5120 0 5120 0% /run/lock
tmpfs 4069516 0 4069516 0% /sys/fs/cgroup
tmpfs 20480 0 20480 0% /tmpfs
/dev/mmcblk0p1 258095 49304 208792 20% /boot
/dev/zram1 890712 2276 825972 1% /opt/zram/zram1
overlay1 890712 2276 825972 1% /var/lib/openhab/persistence
/dev/zram2 588352 209016 336328 39% /opt/zram/zram2
overlay2 588352 209016 336328 39% /var/log
tmpfs 813900 0 813900 0% /run/user/1000

Blockquote
openhabian@openHAB-3:~ $ sudo zramctl
[sudo] password for openhabian:
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram2 zstd 600M 366.4M 83.7M 200M 4 /opt/zram/zram2
/dev/zram1 zstd 900M 16.6M 8.5K 316K 4 /opt/zram/zram1
/dev/zram0 lzo-rle 600M 4K 87B 4K 4 [SWAP]

If I deactivate the zram feature. Logging will work as expected and never stop.

Thanks

  • Rasperry Pi 3:
    • Hardware: _Rasberry Pi 3 B+
    • OS: _Raspbian GNU/Linux 11
    • Java Runtime Environment:
    • openHAB version: OpenHAB 3.4.2

I’m having a problem with openHab crashing.
Every day it freezes and I can’t use it, it doesn’t respond in browser or app. I need to update Zram to restore functionality. And so almost every day. Additionally, I can’t read the log files via Log Viewer. It does not see the log files. How can all this be fixed?
If use:
zramctl
I have this:

NAME        ALGORITHM DISKSIZE   DATA  COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram19 zstd          500M   604K  13.9K  144K       4
/dev/zram16 zstd          500M    38M   4.6M    5M       4
/dev/zram1  zstd          375M 230.4M   7.2M  8.2M       4
/dev/zram0  lzo-rle       500M    12K   1.6K   40K       4
/dev/zram15 zstd          500M  30.4M   3.2M  3.6M       4
/dev/zram14 zstd          500M 161.2M  33.2M 34.8M       4
/dev/zram13 zstd          500M  22.9M   1.8M  2.2M       4
/dev/zram12 zstd          500M  17.7M 999.6K  1.3M       4
/dev/zram11 zstd          500M 171.4M  27.5M 28.7M       4
/dev/zram10 zstd          500M 166.1M  26.5M 27.6M       4
/dev/zram9  zstd          500M  75.7M  10.9M 11.5M       4
/dev/zram8  zstd          500M 265.7M  46.7M 48.3M       4
/dev/zram7  zstd          500M    19M   1.1M  1.4M       4
/dev/zram6  zstd          500M 236.6M  38.7M 40.2M       4
/dev/zram5  zstd          500M 227.3M    37M 38.4M       4
/dev/zram4  zstd          500M 474.4M  79.7M 82.2M       4 /opt/zram/zram4
/dev/zram3  zstd          500M 476.8M  86.8M 89.3M       4
/dev/zram2  zstd          500M 474.6M  80.3M 82.7M       4 /opt/zram/zram2

That’s guessing in the dark and does not make sense.

Install openHABian from scratch and import your old config.

in case it is not responding do you then run zramctl - have you ever done a reboot instead ?
Just a reboot may not help; logfile inspection is required. But in case always running zramctl it looks like everytime a /dev/zram items is being added with looks like it would not be correct.

Mostly reboots, What can I do now?

I told you two posts ago.

Does it still happen if you turn the log levels down? Do you have other services that do excessive logging? I had similar problems due to excessive zigbee2mqtt-logging.

Can you tell me how to downgrade? log level

E.g. set it to warn or error instead of info. In the karaf console you can check the levels with log:list. If you never changed anything this should be fine.
Of course you might have additional services that write logs.

Debug instead of info is an increase in logging information. It would have to be error instead of info.

You’re right. As the name says debug is for debugging. Warn, error or fatal reduce the amount of logs depending on what you want. I corrected my post.

1 Like

The log level is irrelevant to the problem. It’ll just speed up or delay occurence.
@paul11 as I said, reinstall.
And eventually limit number and size of your logs in log4j2.xml after reinstall.

I swapped memory cards with the backup. But probably the backup was made with errors. I can’t run the rs232 -usb adapter and it doesn’t save me logs to files because I can’t see them openhab.log and events.log