Browse Source

Update README.md

pull/68/head
StuartIanNaylor 5 years ago
committed by GitHub
parent
commit
edb9129fce
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 42 additions and 8 deletions
  1. +42
    -8
      README.md

+ 42
- 8
README.md View File

@@ -11,10 +11,9 @@ If the extremely unlikely event of a system crash is not a major concern then L2
_____ _____
## Menu ## Menu
1. [Install](#install) 1. [Install](#install)
2. [Upgrade](#upgrade)
3. [Customize](#customize)
4. [It is working ?](#it-is-working)
5. [Uninstall](#uninstall-)
2. [Config](#config)
3. [It is working ?](#it-is-working)
4. [Uninstall](#uninstall-)


## Install ## Install
sudo apt-get install git rsync sudo apt-get install git rsync
@@ -25,11 +24,46 @@ _____


## Customize ## Customize
#### variables : #### variables :
In the file `/etc/log2ram.conf`, there are three variables:
In the file `/etc/log2zram.conf` sudo nano /etc/log2zram.conf to edit:
```
# 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=20M

# This variable can be set to true if you prefer "rsync" rather than "cp".
# I use the command cp -u and rsync -X, so I don't copy the all folder every time for optimization.
# You can choose which one you want. Be sure rsync is installed if you use it.
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=false

# **************** Zram backing conf *************************************************


- `SIZE`: defines the size the log folder will reserve into the RAM (default is 40M).
- `USE_RSYNC`: Can be set to `true` if you prefer ´rsync´ rather than ´cp´. I use the command `cp -u` and `rsync -X`, I don't copy the all folder every time for optimization.
- `MAIL`: Disables the error system mail if there is not enough place on RAM (if set to `false`)
# ZL2R Zram Log 2 Ram enables a zram drive when ZL2R=true ZL2R=false is mem only tmpfs
ZL2R=true
# 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=60M
# PRUNE_LEVEL if log size is below this level then old logs will be moved to hdd.log enter as %
# Moving the old logs will restart log rotation as old logs will no longer exist in /var/log/oldlog
# In normal operation hitting 50% or above can take many hourly cycles so a higher prune level is a balance
# 55-60% is probably a good level as too high will restart logrotation and create less history
PRUNE_LEVEL=60
``


#### refresh time: #### refresh time:
By default Log2Zram checks available log space every hour. It them makes a comparison of the percentage set via Prune_Level and only writes out old logs to disk when triggered and then removes the collected old logs from zram space. By default Log2Zram checks available log space every hour. It them makes a comparison of the percentage set via Prune_Level and only writes out old logs to disk when triggered and then removes the collected old logs from zram space.


Loading…
Cancel
Save