Author Topic: Prevent wearing internal flash storage?  (Read 329 times)

lokomoko

  • Newbie
  • *
  • Posts: 22
    • View Profile
Prevent wearing internal flash storage?
« on: December 18, 2020, 04:52:00 am »
Running the Linux firmware (currently V3) for some days now and I observe the /var/log directory grow to impressive size of many GB as I already saw with V2. I can find a whole lot of "fuelgauged", "pmic_thread" and "battery_thread" related messages in syslog, messages and kern.log. I'm concerned that this - besides draining the battery - will wear the internal flash storage. Can anyone confirm that this is a problem or am I just a bit paranoid?

While /var/log/journal/ will grow to a max. of around 4GB (Thats what 'systemctl status systemd-journald' tells me), the text files seem to keep growing until they get log-rotated. All together the logging creates a continuos write-bandwith of 200 to 700 kB/s on mmcblk0p43 - around a GB per hour.

So I turned the text file output off by commenting out in /etc/rsyslog.conf. This did not reduce the bandwidth much, but at least it stopped growing the textfiles. Additionally I temporarily deactivated systemd-journald, which brought the storage bandwidth close to 0. So now I don't have to worry about wearing my internal storage anymore.

Still I would like to filter the above mentioned messages before systemd-journald produces write-bandwidth. This would allow me to turn back to normal (stock) logging.

Any ideas how to turn off that excesive kernel logging. Do I have to modify the boot commandline (which probably is not trivial) or can I switch it off in a runing system? What other strategies do you use to prevent wearing flash storage?

Thanks for any help in advance!

sven1999

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Prevent wearing internal flash storage?
« Reply #1 on: December 29, 2020, 04:38:33 am »
The wiki page https://github.com/gemian/gemian/wiki/DebianCosmo has a new final paragraph about /var/log/journal
Cosmo Communicator (UbuntuTouch), OnePlus 3T (UbuntuTouch OTA 18)

lokomoko

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Prevent wearing internal flash storage?
« Reply #2 on: January 03, 2021, 08:14:57 am »
Thanks for the pointer, sven1999. I probably should subscribe to that repository :)