[arm-allstar] Persistent logging

Mark VE3JMR ve3jmr at jmarkrobinson.ca
Thu Mar 16 17:41:48 EDT 2023


Hi David;

In fact my node software is executing from a 32G card. How do I utilize 
the unused space? I would like to use as much of the card as possible.

Also, your earlier explanation that Hamvoip was engineered to minimize 
reads/writes from/to the card: If Hamvoip is only using approx 4Gigs 
space, is the unused space used to move files around the entire card to 
give equal usage or is it entirely dead and unused?

Thanks so much.

73 75 de VE3JMR | VE3MR
Mark
Port Colborne, Ontario, CANADA
https://www.qrz.com/db/VE3JMR
Allstar# 531320 [1] | Echolink# 736666 | VE3JMR-L [2]

Date: Thu, 16 Mar 2023 05:37:01 -0400 (EDT)

Hi Mark,

The reported Supermon filesystem usage is normal.  The reason why that
number jumped from 2%-4% to 56% is that in the original configuration, 
the
/var/log filesystem was an empty RAMdrive (tmpfs), so almost no usage.
Now, after making the change in /etc/fstab and rebooting, the /var/log
*FOLDER* is part of the SD card root filesystem, which is 56% full.

Note that HamVoIP, by default, only uses 4GB of the available SD card
space.  If you've got a 32GB card, about 26GB (or so) is still free and
not part of any used filesystem--it's spare, unused space.  You can
utilize this extra space, of course, if needed.

73, David K4FXC

On Thu, 16 Mar 2023, Mark VE3JMR via ARM-allstar wrote:

Hi David;

That works great! I'm not that concerned about the log files getting too
big. 1. I have a script that is triggered by a daily cronjob that trims
all of the logs to the maximum size (number of lines) that I specify; 2.
Supermon2 shows the size of the logs and how much of the max size has
been used. IF it maxes out I know to adjust the trimlog cronjob.

Logs file size brings up an interesting observation. Before I modified
the two files for persistent logging, Supermon always reported that 2%,
and if I ran it for many days up to 4%, of the max file size was used.
After I modified the files and rebooted, Supermon now reports that 56%
of the log file max has been used. Really? I did not expect this. FYI, I
use a 32G microSD in my Shari hotspot.

Thanks again.

Date: Wed, 15 Mar 2023 09:29:43 -0400 (EDT)

Hi Mark,

Okay, persistent logging to the SD card is easy to setup, there are 2
steps.

First, edit the /etc/systemd/journald.conf file and change:

[Journal]
Storage=volatile

...to...

[Journal]
#Storage=volatile
Storage=persistent

...and save the file.

Second, edit the /etc/fstab file and comment out the entry for the
/var/log tmpfs, like:

#
# /etc/fstab: static file system information
#
# <file system> <dir>   <type>  <options>       <dump>  <pass>
/dev/mmcblk0p1  /boot   vfat    defaults        0       0
#tmpfs          /var/log        tmpfs   nodev,nosuid,size=50M   0
0

....Save the /etc/fstab file and reboot.   That's it!  Now, the
logfiles
will all be in /var/log and that folder will be persistent across
reboots.

NOTE:  Now /var/log is part of the system "root" filesystem. If the
logfiles get too big, they could leave the root filesystem full,
impairing
system operation until they get cleaned up!!!  So, be careful!

If you decide to go back to volatile log files, just reverse the
changes,
above, and reboot.

73, David K4FXC
***************************************

  [3]    [4]    [5]
     Ottawa ARC [3]                                           Burlington 
ARC [4]                                       Radio Amateur of Canada 
[5]

LIFE has an expiry date.
<if trumpet=%true then exit function>

Links:
------
[1] http://stats.allstarlink.org/stats/531320
[2] 
https://www.echolink.org/links.jsp?lat_deg=42&lat_min=52.997999999999905&lat_NS=North&lon_deg=79&lon_min=13.99799999999999&lon_EW=West&gs=FN02jv&sel=city&city=Port+Colborne&state=ON&country=CA&d=1
[3] https://oarc.net
[4] https://www.barc.ca
[5] https://www.rac.ca


More information about the ARM-allstar mailing list