Bananian Linux

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000045Bananian Linux[All Projects] Generalpublic2014-09-30 13:402015-03-09 19:54
Reporterguest 
Assigned ToNico 
PrioritynormalSeverityfeatureReproducibilityhave not tried
StatusresolvedResolutionfixed 
Product Version14.09 
Target Version15.04Fixed in Version15.04 
Summary0000045: rsyslog: do not sync to the disk immediately
Descriptionsee comment 2 https://dev.bananian.org/view.php?id=45#c47 [^]
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000046)
gtz (reporter)
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 (viewer)
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 (manager)
2015-01-02 14:30

Thank you guest for suggesting this. Sound fine for me and will be in the next release.
(0000174)
Nico (manager)
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
 
 #


- Issue History
Date Modified Username Field Change
2014-09-30 13:40 guest New Issue
2014-10-04 11:32 Nico Assigned To => Nico
2014-10-04 11:32 Nico Status new => assigned
2014-10-04 11:32 Nico Target Version => later
2014-10-05 16:14 gtz Note Added: 0000046
2014-10-06 07:25 guest Note Added: 0000047
2014-11-05 13:58 Nico Target Version later => 15.04
2015-01-02 14:30 Nico Summary use 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:30 Nico Description Updated View Revisions
2015-01-02 14:30 Nico Additional Information Updated View Revisions
2015-01-02 14:30 Nico Note Added: 0000127
2015-01-02 14:34 Nico Summary rsyslog: 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:07 Nico Summary rsyslog: 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:35 Nico Note Added: 0000174
2015-03-09 19:53 Nico Note Edited: 0000174 View Revisions
2015-03-09 19:53 Nico Note Revision Dropped: 174: 0000078
2015-03-09 19:54 Nico Status assigned => resolved
2015-03-09 19:54 Nico Fixed in Version => 15.04
2015-03-09 19:54 Nico Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker