Node on an RPi: log sizes / sd card usage

Hi there,

I am running my node on an RPi4 with Debian 64 bit, headless usually, Storj within docker.

My questions:

  • Where are the logs from Storj are stored? Within the docker container, so that they will be removed, when the container is removed as well?
  • If so, how can I check, how huge they currently are? (before just stopping, removing and restarting the node)
  • My feeling is, that I have a lot of waste on my RPi (14 GB used from 32 GB). How can I figure out, what is “spamming” my system?

Thx in advance & kind regards

Unless you set it in the config it wont have any logs on the system only able to run docker commands to get the logs.

Not really sure what you mean by this just the OS installed probably uses 9gigs after updates and installing docker.
If you are running Swap it will use more of the drive space, You can disable swap though.

You can get an idea of the size with the docker logs storagenode command.
Maybe add 2>&1|wc to see the size

You can use the recommended options from the guide for Raspberry:

This will instruct docker to use not more than 50MiB for every log and do not store more than 10 historic log files. So the usage would be only 500MiB in total.

I you really want to have all history (it could be useful for troubleshooting much much later), you need to redirect logs to the file.

just for your information, regarding my question about the disk usage: there was a docker container used 10+ GB of storage. I’ve deleted it and restarted everything. disk usage is now around 5 GB instead of almost 15 GB.

@Alexey I’ve also added the memory option. what is it for? the bash output shows, when starting the node:

WARNING: Your kernel does not support memory limit capabilities or the cgroup is not mounted. Limitation discarded.

thank you all! it will take a while, going through all your feedbacks.

To protect a weak pi3 from hanging because of OOM.

You can try to configure the setup string, as described in the step

not required for an RPI4 ?

@all: I’ve changed the whole logging mechanism on my RPi with the following hoots:

Additionally I’ve added the log limitation for the node, as my previous container, as mentioned, was already 10 GB huge:

--log-opt max-size=50m \
--log-opt max-file=10 \

I’ve also, first time, used and therefore understood, where to finde the logs and work with it. :wink:

Thank you @CutieePie for your inspiring guide, too!

No, it’s not required, since the 4 generation have more than 1GB of RAM.

1 Like