This commit is contained in:
azlux 2017-04-27 11:24:05 +02:00 committed by GitHub
parent c7870156ec
commit 931054c8d9
1 changed files with 8 additions and 4 deletions

View File

@ -3,7 +3,7 @@ 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 !
The script [log2ram](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.
Log2Ram is based on transient log for Systemd here : [A transient /var/log](https://www.debian-administration.org/article/661/A_transient_/var/log)
@ -26,14 +26,18 @@ Into the file `log2ram` (or `/usr/local/bin/log2ram` if you have already install
The first variable define the size the log folder will reserve into the RAM.
The second variable can be set to `true` if you prefer "rsync" than "cp".
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.
#### 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`.
### It is working ?
You can now check the mount folder in ram with
You can now check the mount folder in ram with (You will see lines with log2ram if working)
```
df -h
mount
```
By default, the program will write log into the HardDisk every hour and the log for log2ram will be write here : `/var/log.hdd/log2ram.log`
The log for log2ram will be write here : `/var/log.hdd/log2ram.log`
###### Now, muffins for everyone !