[Piuparts-commits] [piuparts] 01/01: archive_old_logs: also use xargs -n 1 when compressing logs in parallel

Holger Levsen holger at layer-acht.org
Sun Mar 5 13:27:36 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 264b1dc04e95d04658d36bee4f10f87c5a81e962
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sun Mar 5 14:27:33 2017 +0100

    archive_old_logs: also use xargs -n 1 when compressing logs in parallel
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 debian/changelog               | 3 ++-
 master-bin/archive_old_logs.in | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 6ecf287..23b58cd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -36,7 +36,8 @@ piuparts (0.76) UNRELEASED; urgency=medium
   * htdocs/index.tpl:
     - Announce 2nd piuparts-slave and explain this is a three host setup now.
     - Make "contribute" a link.
-  * archive_old_logs: use xargs -P to compress old logs in parallel.
+  * archive_old_logs: use xargs -P $NUM_CPU and -n 1 to compress old logs in
+    parallel.
 
   [ Michael Stapelberg ]
   * Add support for logging update-alternatives calls using optional
diff --git a/master-bin/archive_old_logs.in b/master-bin/archive_old_logs.in
index 18c56d0..a079759 100755
--- a/master-bin/archive_old_logs.in
+++ b/master-bin/archive_old_logs.in
@@ -53,7 +53,7 @@ for SECTION in $SECTIONS ; do
 		fi
 	done
 	NUM_CPU=$(grep -c ^processor /proc/cpuinfo)
-	find archive/ -name '*.log' | xargs -P $NUM_CPU -r xz -f
+	find archive/ -name '*.log' | xargs -P $NUM_CPU -n 1 -r xz -f
 	if [ -n "$OUTPUT" ] ; then
 		echo
 		echo

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list