Bananian Linux - Bananian Linux
View Issue Details
0000045Bananian Linux[All Projects] Generalpublic2014-09-30 13:402015-03-09 19:54
guest 
Nico 
normalfeaturehave not tried
resolvedfixed 
 
14.09 
15.0415.04 
0000045: rsyslog: do not sync to the disk immediately
see comment 2 https://dev.bananian.org/view.php?id=45#c47 [^]
No tags attached.
Issue History
2014-09-30 13:40guestNew Issue
2014-10-04 11:32NicoAssigned To => Nico
2014-10-04 11:32NicoStatusnew => assigned
2014-10-04 11:32NicoTarget Version => later
2014-10-05 16:14gtzNote Added: 0000046
2014-10-06 07:25guestNote Added: 0000047
2014-11-05 13:58NicoTarget Versionlater => 15.04
2015-01-02 14:30NicoSummaryuse ramlog to store logfiles in ramdisk => rsyslog: not synced to the disk immediately (was: use ramlog to store logfiles in ramdisk)
2015-01-02 14:30NicoDescription Updatedbug_revision_view_page.php?rev_id=58#r58
2015-01-02 14:30NicoAdditional Information Updatedbug_revision_view_page.php?rev_id=60#r60
2015-01-02 14:30NicoNote Added: 0000127
2015-01-02 14:34NicoSummaryrsyslog: not synced to the disk immediately (was: use ramlog to store logfiles in ramdisk) => rsyslog: do not sync to the disk immediately (was: use ramlog to store logfiles in ramdisk)
2015-02-01 09:07NicoSummaryrsyslog: do not sync to the disk immediately (was: use ramlog to store logfiles in ramdisk) => rsyslog: do not sync to the disk immediately
2015-03-09 19:35NicoNote Added: 0000174
2015-03-09 19:53NicoNote Edited: 0000174bug_revision_view_page.php?bugnote_id=174#r79
2015-03-09 19:53NicoNote Revision Dropped: 174: 0000078
2015-03-09 19:54NicoStatusassigned => resolved
2015-03-09 19:54NicoFixed in Version => 15.04
2015-03-09 19:54NicoResolutionopen => fixed

Notes
(0000046)
gtz   
2014-10-05 16:14   
Instead of adding a new package, that's not in the Debian repository, why not switch to busybox-syslogd instead.
You get a circular buffer for the syslog messages, that's 128k in size (default) and no writes to the SD card.
(0000047)
guest   
2014-10-06 07:25   
I see why some people want this. But storing logs in a ramdisk essentially means if your system his down due to a power outage etc, you lose all your logs.  The smarter way to increase the life time of the sd card in my opinion is to change the default rsyslog configuration and add a minus  sign at the beginning of each path which means all changes to the log file are not synced to the disk immediately but during the sync intervals of your filesystem. If you wish you can increase the sync interval too. This way you only lose the last seconds or minutes of a log depending on your sync interval. Plus, you don't need any additional packages.
(0000127)
Nico   
2015-01-02 14:30   
Thank you guest for suggesting this. Sound fine for me and will be in the next release.
(0000174)
Nico   
2015-03-09 19:35   
(edited on: 2015-03-09 19:53)
diff --git a/rsyslog.conf-old b/rsyslog.conf-new
index 0e33f48..82de57c 100644
--- a/rsyslog.conf-old
+++ b/rsyslog.conf-new
@@ -58,9 +58,9 @@ $IncludeConfig /etc/rsyslog.d/*.conf
 #
 # First some standard log files. Log by facility.
 #
-auth,authpriv.* /var/log/auth.log
+auth,authpriv.* -/var/log/auth.log
 *.*;auth,authpriv.none -/var/log/syslog
-#cron.* /var/log/cron.log
+#cron.* -/var/log/cron.log
 daemon.* -/var/log/daemon.log
 kern.* -/var/log/kern.log
 lpr.* -/var/log/lpr.log
@@ -73,13 +73,13 @@ user.* -/var/log/user.log
 #
 mail.info -/var/log/mail.info
 mail.warn -/var/log/mail.warn
-mail.err /var/log/mail.err
+mail.err -/var/log/mail.err
 
 #
 # Logging for INN news system.
 #
-news.crit /var/log/news/news.crit
-news.err /var/log/news/news.err
+news.crit -/var/log/news/news.crit
+news.err -/var/log/news/news.err
 news.notice -/var/log/news/news.notice
 
 #