mirror of
https://github.com/azlux/log2ram.git
synced 2023-10-10 13:37:24 +02:00
bf8f16bba6
* Reformatted and refactored some files * Added awareness of systemd-journald - Added dependency for bash in debian control file, because this implementation uses bash arrays - Changed in all shell scripts the interpreter to bash - Replaced "service log2ram stop" with "systemctl stop log2ram" - Replaced "-a" with "] && [" - Increased SIZE and LOG_DISK_SIZE to 128M and 256M because journald can use a lot of space - Introduced a new switch JOURNALD_AWARE
45 lines
2.6 KiB
Plaintext
45 lines
2.6 KiB
Plaintext
# Configuration file for Log2Ram (https://github.com/azlux/log2ram) under MIT license.
|
|
# This configuration file is read by the log2ram service
|
|
|
|
# Size for the ram folder, it defines the size the log folder will reserve into the RAM.
|
|
# If it's not enough, log2ram will not be able to use ram. Check you /var/log size folder.
|
|
# The default is 40M and is basically enough for a lot of applications.
|
|
# You will need to increase it if you have a server and a lot of log for example.
|
|
SIZE=128M
|
|
|
|
# Select the log syncing method between the log directory on disk and in the RAM.
|
|
# The variable may be uncommented out, setting it to false, if "cp" is preferred over "rsync".
|
|
# Currently, this option needs to be unset or set to true for "rsync" to run,
|
|
# with "cp" available for fallback when "rsync" is missing.
|
|
# In all other cases, setting USE_RSYNC to anything other than true will default to "cp".
|
|
#USE_RSYNC=false
|
|
|
|
# If there are some errors with available RAM space, a system mail will be send
|
|
# Change it to false and you will have only a log if there is no place on RAM anymore.
|
|
MAIL=true
|
|
|
|
# Variable for folders to put in RAM. You need to specify the real folder `/path/folder` , the `/path/hdd.folder` will
|
|
# be automatically created. Multiple path can be separeted by `;`. Do not add the final `/` !
|
|
# example : PATH_DISK="/var/log;/home/test/FolderInRam"
|
|
PATH_DISK="/var/log"
|
|
|
|
# Should log2ram consider journald and do a log rotate before copying the log files back? Please note that for this
|
|
# rsync is mandatory. Also make sure that you have configured SystemMaxUse in journald.conf, because the size of this
|
|
# ram folder is will probably not be as large as journald will use by default
|
|
JOURNALD_AWARE=true
|
|
|
|
# **************** Zram backing conf *************************************************
|
|
|
|
# ZL2R Zram Log 2 Ram enables a zram drive when ZL2R=true ZL2R=false is mem only tmpfs
|
|
ZL2R=false
|
|
# COMP_ALG this is any compression algorithm listed in /proc/crypto
|
|
# lz4 is fastest with lightest load but deflate (zlib) and Zstandard (zstd) give far better compression ratios
|
|
# lzo is very close to lz4 and may with some binaries have better optimisation
|
|
# COMP_ALG=lz4 for speed or Zstd for compression, lzo or zlib if optimisation or availabilty is a problem
|
|
COMP_ALG=lz4
|
|
# LOG_DISK_SIZE is the uncompressed disk size. Note zram uses about 0.1% of the size of the disk when not in use
|
|
# LOG_DISK_SIZE is expected compression ratio of alg chosen multiplied by log SIZE
|
|
# lzo/lz4=2.1:1 compression ratio zlib=2.7:1 zstandard=2.9:1
|
|
# Really a guestimate of a bit bigger than compression ratio whilst minimising 0.1% mem usage of disk size
|
|
LOG_DISK_SIZE=256M
|