b2un0 / silabs-multipan-docker

A standalone RPC server based on HomeAssistant's Silicon Labs multiprotocol addon
https://hub.docker.com/r/b2un0/silabs-multipan-docker
Apache License 2.0
56 stars 7 forks source link

Lots of logs #13

Closed supersjimmie closed 7 months ago

supersjimmie commented 7 months ago

I'm running on a small storage (32GB) raspberry, where I see the log growing very fast. As far as I can see, there's nothing really special, it looks like the logs is filled with just "normal" lines which are in such a huge amout that my storage fills fast.

Is there some way to config the log to only capture errors or perhaps rotate or some way to make it less "consuming"?

{"log":"OTBR_FORWARD_EGRESS  all opt    in wpan0 out *  ::/0  -\u003e ::/0  \n","stream":"stdout","time":"2024-03-14T18:51:59.214872844Z"}
{"log":"Chain OTBR_FORWARD_EGRESS (0 references)\n","stream":"stdout","time":"2024-03-14T18:51:59.220055465Z"}
{"log":"target     prot opt source               destination         \n","stream":"stdout","time":"2024-03-14T18:51:59.220459454Z"}
{"log":"ACCEPT     all      anywhere             anywhere            \n","stream":"stdout","time":"2024-03-14T18:51:59.220687374Z"}
{"log":"\u001b[32m2024-03-14 18:51:59 [INFO] OTBR firewall teardown completed.\u001b[0m\n","stream":"stdout","time":"2024-03-14T18:51:59.23172756Z"}
{"log":"[2024-03-14T18:51:59.079240Z] Info : Endpoint socket #12: Client disconnected. 1 connections\n","stream":"stdout","time":"2024-03-14T18:51:59.461139061Z"}
{"log":"[2024-03-14T18:51:59.079984Z] Info : Client disconnected\n","stream":"stdout","time":"2024-03-14T18:51:59.461255706Z"}
{"log":"\u001b[32m2024-03-14 18:52:00 [INFO] Setup OTBR firewall...\u001b[0m\n","stream":"stdout","time":"2024-03-14T18:52:00.264211604Z"}
{"log":"\u001b[32m2024-03-14 18:52:00 [INFO] Starting otbr-agent...\u001b[0m\n","stream":"stdout","time":"2024-03-14T18:52:00.290660566Z"}
{"log":"otbr-agent[13392]: [NOTE]-AGENT---: Running 0.3.0\n","stream":"stderr","time":"2024-03-14T18:52:00.294309988Z"}
{"log":"otbr-agent[13392]: [NOTE]-AGENT---: Thread version: 1.3.0\n","stream":"stderr","time":"2024-03-14T18:52:00.294372097Z"}
{"log":"otbr-agent[13392]: [NOTE]-AGENT---: Thread interface: wpan0\n","stream":"stderr","time":"2024-03-14T18:52:00.294380615Z"}
{"log":"otbr-agent[13392]: [NOTE]-AGENT---: Radio URL: spinel+cpc://cpcd_0?iid=2\u0026iid-list=0\n","stream":"stderr","time":"2024-03-14T18:52:00.2943853Z"}
{"log":"otbr-agent[13392]: [NOTE]-ILS-----: Infra link selected: ens192\n","stream":"stderr","time":"2024-03-14T18:52:00.29865339Z"}
{"log":"otbr-agent[13392]: 49d.18:16:09.539 [C] Platform------: mCpcBusSpeed = 115200\n","stream":"stderr","time":"2024-03-14T18:52:00.301293376Z"}
{"log":"[2024-03-14T18:52:00.298880Z] Info : New client connection using library v4.4.0.0\n","stream":"stdout","time":"2024-03-14T18:52:00.461518106Z"}
{"log":"[2024-03-14T18:52:00.301023Z] Info : Endpoint socket #12: Client connected. 2 connection(s)\n","stream":"stdout","time":"2024-03-14T18:52:00.461577456Z"}
{"log":"otbr-agent[13392]: 49d.18:16:11.584 [C] Platform------: platformBackboneInit() at backbone.cpp:62: Failure\n","stream":"stderr","time":"2024-03-14T18:52:02.346356052Z"}
{"log":"\u001b[32m2024-03-14 18:52:02 [INFO] otbr-agent ended with exit code 1 (signal 0)...\u001b[0m\n","stream":"stdout","time":"2024-03-14T18:52:02.374968219Z"}
{"log":"OTBR_FORWARD_INGRESS  all opt    in * out wpan0  ::/0  -\u003e ::/0  \n","stream":"stdout","time":"2024-03-14T18:52:02.378836357Z"}
{"log":"Chain OTBR_FORWARD_INGRESS (0 references)\n","stream":"stdout","time":"2024-03-14T18:52:02.385615141Z"}
{"log":"target     prot opt source               destination         \n","stream":"stdout","time":"2024-03-14T18:52:02.385693694Z"}
{"log":"DROP       all      anywhere             anywhere             PKTTYPE = unicast\n","stream":"stdout","time":"2024-03-14T18:52:02.385706953Z"}
{"log":"DROP       all      anywhere             anywhere             match-set otbr-ingress-deny-src src\n","stream":"stdout","time":"2024-03-14T18:52:02.385714434Z"}
{"log":"ACCEPT     all      anywhere             anywhere             match-set otbr-ingress-allow-dst dst\n","stream":"stdout","time":"2024-03-14T18:52:02.38572136Z"}
{"log":"DROP       all      anywhere             anywhere             PKTTYPE = unicast\n","stream":"stdout","time":"2024-03-14T18:52:02.385728878Z"}
{"log":"ACCEPT     all      anywhere             anywhere            \n","stream":"stdout","time":"2024-03-14T18:52:02.385735878Z"}
{"log":"otbr-ingress-deny-src\n","stream":"stdout","time":"2024-03-14T18:52:02.391333267Z"}
{"log":"ipset v7.10: Set cannot be destroyed: it is in use by a kernel component\n","stream":"stderr","time":"2024-03-14T18:52:02.404121187Z"}
{"log":"otbr-ingress-deny-src\n","stream":"stdout","time":"2024-03-14T18:52:02.406121319Z"}
{"log":"otbr-ingress-deny-src-swap\n","stream":"stdout","time":"2024-03-14T18:52:02.426717773Z"}
{"log":"otbr-ingress-allow-dst\n","stream":"stdout","time":"2024-03-14T18:52:02.450729618Z"}
{"log":"[2024-03-14T18:52:02.346563Z] Info : Endpoint socket #12: Client disconnected. 1 connections\n","stream":"stdout","time":"2024-03-14T18:52:02.461708086Z"}
{"log":"[2024-03-14T18:52:02.348196Z] Info : Client disconnected\n","stream":"stdout","time":"2024-03-14T18:52:02.461755344Z"}
{"log":"otbr-ingress-allow-dst-swap\n","stream":"stdout","time":"2024-03-14T18:52:02.475111509Z"}
{"log":"OTBR_FORWARD_EGRESS  all opt    in wpan0 out *  ::/0  -\u003e ::/0  \n","stream":"stdout","time":"2024-03-14T18:52:02.49922361Z"}
{"log":"Chain OTBR_FORWARD_EGRESS (0 references)\n","stream":"stdout","time":"2024-03-14T18:52:02.504454824Z"}
{"log":"target     prot opt source               destination         \n","stream":"stdout","time":"2024-03-14T18:52:02.504911719Z"}
b2un0 commented 7 months ago

first of all take a look at the linked environments variables in the README.md https://github.com/b2un0/silabs-multipan-docker/blob/main/Dockerfile#L13C5-L13C19

your friend could be OTBR_LOG_LEVEL i don't know the options, you should search here https://openthread.io/guides/border-router/build

also, yo can limit the docker logs for each container https://docs.docker.com/config/containers/logging/local/ take a look at the examples

supersjimmie commented 7 months ago

yes, thanks, that worked (docker stop, rm and install again with --env OTBR_LOG_LEVEL="warn")