1
0
mirror of https://github.com/azlux/log2ram.git synced 2023-10-10 13:37:24 +02:00

Resolved conflict

This commit is contained in:
Nathan Huizinga 2017-12-28 17:41:49 +01:00
commit a66120b94a
3 changed files with 19 additions and 17 deletions

View File

@ -1,7 +1,7 @@
# Log2Ram # Log2Ram
Like ramlog for systemd (on debian 8 jessie for example). Like ramlog for systemd (on debian 8 jessie for example).
Usefull for **Raspberry** for not writing all the time on the SD card. You need it because your SD card don't want to suffer anymore ! Usefull for **RaspberryPi** for not writing on the SD card all the time. You need it because your SD card doesn't want to suffer anymore!
The script [log2ram](https://github.com/azlux/log2ram) can work on every linux system. So you can use it with your own daemon manager if you don't have systemd. The script [log2ram](https://github.com/azlux/log2ram) can work on every linux system. So you can use it with your own daemon manager if you don't have systemd.
@ -18,14 +18,14 @@ sudo ./install.sh
## Customize ## Customize
#### variables : #### variables :
Into the file `/etc/log2ram.conf`, there are three variables : In the file `/etc/log2ram.conf`, there are three variables:
- The first variable define the size the log folder will reserve into the RAM. - `SIZE`: defines the size the log folder will reserve into the RAM.
- The second variable can be set to `true` if you prefer "rsync" than "cp". I use the command `cp -u` and `rsync -X`, I don't copy the all folder every time for optimization. - `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.
- The last varibale disable the error system mail if there are no enought place on RAM (if set on false) - `MAIL`: Disables the error system mail if there is not enough place on RAM (if set to `false`)
#### refresh time: #### refresh time:
The default is to write log into the HardDisk every hour. If you think this is too much, you can make the write every day by moving the cron file : `sudo mv /etc/cron.hourly/log2ram /etc/cron.daily/log2ram`. By default Log2Ram writes to the HardDisk every hour. If you think this is too much, you can make the write every day by moving the cron file to daily: `sudo mv /etc/cron.hourly/log2ram /etc/cron.daily/log2ram`.
### It is working? ### It is working?
You can now check the mount folder in ram with (You will see lines with log2ram if working) You can now check the mount folder in ram with (You will see lines with log2ram if working)
@ -34,9 +34,9 @@ df -h
mount mount
``` ```
If you have issue with apache2 , you can try to add `apache2.service` next to other services on the `Before` parameter into /etc/systemd/system/log2ram.service it will solve the pb If you have issue with apache2, you can try to add `apache2.service` next to other services on the `Before` parameter in `/etc/systemd/system/log2ram.service` it will solve the pb
The log for log2ram will be write here : `/var/log/log2ram.log` The log for log2ram will be written at: `/var/log/log2ram.log`
###### Now, muffins for everyone! ###### Now, muffins for everyone!

View File

@ -1,15 +1,17 @@
# Configuration file for Log2Ram (https://github.com/azlux/log2ram) under MIT license. # Configuration file for Log2Ram (https://github.com/azlux/log2ram) under MIT license.
# This configuration file is read by the log2ram service # This configuration file is read by the log2ram service
# Size for the ram folder, it's define 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 application. You will need to increase it if you have a server and a lot of log for example.
# 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=40M SIZE=40M
# This variable can be set to true if you prefer "rsync" than "cp". I use the command cp -u and rsync -X, so I don't copy the all folder every time for optimization. # 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. # You can choose which one you want. Be sure rsync is installed if you use it.
USE_RSYNC=false USE_RSYNC=false
# If there are some error with available RAM space, a system mail will be send # If there are some errors with available RAM space, a system mail will be send
# Change it to false, and you will have only log if there are no place on RAM anymore. # Change it to false and you will have only a log if there is no place on RAM anymore.
MAIL=true MAIL=true