Have some service that freezes my raspberry pi. How can I trace it?

I have dietpi on a raspberry pi 3b+. Sometimes I can see I cannot ssh into that system or access the web interface of all my services (like portainer, transmission, sonarr, pi-hole). It seems like the pi completely freezes. However, after around half an hour everything returns normal and I can access back to my stuff.

Do you know how I can easily find out what is freezing the system once for a while?

Hi,

many thanks for your message. It’s quite hard to investigate if you don’t have access to your system. Would it be possible to connect a screen and keyboard to be able to check is happening once the system is not reacting? My guess, you are running transmission and sonarr. Probably your system is fully utilised during unzip/unrar of download files.

Install monitorix, then use the graphs to see what times it spikes and maybe compare to some cron jobs that might be running at that time

It keeps a graph of time when resources get used (not the particular resource) but it might be a start for helping investigate

Debian/Ubuntu
Users in ‘Buster’ or a newer release should better use the command sudo apt install monitorix.

Includes Raspbian, Bananian, and other Debian derivative Linux distributions.

Maintainer: Baptiste BEAUPLAT


Users in older Debian releases can use the Izzy’s repository.

monitorix_3.12.0-izzy1_all.deb
Monitorix 3.12.0 - Izzy Repository

24-Feb-2020, 209KiB

Maintainer: Andreas Itzchak Rehberg

SHA256 checksum: 4fb9fa233463e036020e71aa2e545f5dc2c1106f2c8397017de5c3cb17de1263

question is, if in the stuck situation, monitoring is still able to catch thinks or if it will stuck as well.

Oh it will probably stick too…then return to normal after…but still have the huge cpu spike in the graph telling you when it went bonkers

you are right, that should be visible

But to me is not that important the “when” the freeze happens but “what” causes it. Are you sure I can see that with that monitoring tool? I would not like to bloat my system if not necessary.

well aim is to see who your system resources are behaving before system is going to freeze. Means how memory as well as CPU is utilised