Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


admin_grundlagen:logrotate

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu der Vergleichsansicht

Nächste Überarbeitung
Vorherige Überarbeitung
Nächste Überarbeitung Beide Seiten, nächste Überarbeitung
admin_grundlagen:logrotate [2010/11/26 13:31]
127.0.0.1 Externe Bearbeitung
admin_grundlagen:logrotate [2013/04/18 09:53]
ingo_wichmann
Zeile 5: Zeile 5:
 ===== Neue Logdatei zu logrotate hinzufügen ===== ===== Neue Logdatei zu logrotate hinzufügen =====
 === Debian 5.0 === === Debian 5.0 ===
-''/​etc/​logrotate.d/​ingo.log''​ :+''/​etc/​logrotate.d/​ingo''​ :
 <​file>​ <​file>​
 /​var/​log/​ingo.log { /​var/​log/​ingo.log {
Zeile 12: Zeile 12:
     postrotate     postrotate
         /​etc/​init.d/​rsyslog reload > /dev/null         /​etc/​init.d/​rsyslog reload > /dev/null
 +    endscript
 +}
 +</​file>​
 +=== Ubuntu 12.04 ===
 +''/​etc/​logrotate.d/​ingo''​ :
 +<​file>​
 +/​var/​log/​ingo.log {
 +    compress
 +    size=+10
 +    postrotate
 +      reload rsyslog >/​dev/​null 2>&1 || true
     endscript     endscript
 } }
 </​file>​ </​file>​
 === SuSE === === SuSE ===
-''/​etc/​logrotate.d/​ingo.log''​ :+''/​etc/​logrotate.d/​ingo''​ :
 <​file>​ <​file>​
 /​var/​log/​ingo.log { /​var/​log/​ingo.log {
     compress     compress
     size=+10     size=+10
 +    nodateext
     postrotate     postrotate
-        /​etc/​init.d/​syslog ​reload ​> /dev/null+        /​etc/​init.d/​syslog ​restart ​> /dev/null
     endscript     endscript
 } }
 </​file>​ </​file>​
  
 +=== CentOS 6 ===
 +''/​etc/​logrotate.d/​ingo''​ :
 +<​file>​
 +/​var/​log/​ingo.log {
 +  size=+10
 +  dateformat %Y%m%d-%s
 +  sharedscripts
 +  postrotate
 +    /bin/kill -HUP `cat /​var/​run/​syslogd.pid 2> /dev/null` 2> /dev/null || true
 +  endscript
 +}
 +</​file>​
  
 ==== testen ==== ==== testen ====
admin_grundlagen/logrotate.txt · Zuletzt geändert: 2018/10/09 19:16 (Externe Bearbeitung)