[NEW PATCH] BZ#716962 Compress logs using the xz format (via gerrit-bot)

Federico Simoncelli fsimonce at redhat.com
Wed Jun 29 18:08:16 UTC 2011


New patch submitted by Federico Simoncelli (fsimonce at redhat.com)

You can review this change at: http://gerrit.usersys.redhat.com/632

commit 689e8967503786fbcc631705869e222cc816684a
Author: Federico Simoncelli <fsimonce at redhat.com>
Date:   Tue Jun 28 14:12:04 2011 +0000

    BZ#716962 Compress logs using the xz format
    
    Change-Id: I736c5e625e4d4fba8d5d7d220ee86df9f01cd7fb

diff --git a/vdsm/vdsm-logrotate b/vdsm/vdsm-logrotate
index 4c84d7e..efa9e09 100755
--- a/vdsm/vdsm-logrotate
+++ b/vdsm/vdsm-logrotate
@@ -7,7 +7,6 @@ if [ $EXITVALUE != 0 ]; then
     /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
 fi
 
-/usr/bin/find /var/log/core -type f -name '*gz' -mtime +7 -exec /bin/rm -f '{}' \;
 EXITVALUE=$?
 if [ $EXITVALUE != 0 ]; then
     /usr/bin/logger -t logrotate "ALERT clean old core files exited abnormally with [$EXITVALUE]"
diff --git a/vdsm/vdsm-logrotate.conf b/vdsm/vdsm-logrotate.conf
index 2962ce3..ef6c37c 100644
--- a/vdsm/vdsm-logrotate.conf
+++ b/vdsm/vdsm-logrotate.conf
@@ -4,12 +4,18 @@
     copytruncate
     size 15M
     compress
+    compresscmd /usr/bin/xz
+    uncompresscmd /usr/bin/unxz
+    compressext .xz
 }
 /var/log/core/*.dump {
     rotate 1
     missingok
     size 0
     compress
+    compresscmd /usr/bin/xz
+    uncompresscmd /usr/bin/unxz
+    compressext .xz
 }
 /var/log/libvirtd*.log {
     rotate 100
@@ -17,4 +23,7 @@
     copytruncate
     size 15M
     compress
+    compresscmd /usr/bin/xz
+    uncompresscmd /usr/bin/unxz
+    compressext .xz
 }




More information about the vdsm-patches mailing list