Mailinglist Archive: opensuse-buildservice (348 mails)

< Previous Next >
[opensuse-buildservice] [PATCH 2/6] obsworker: use sysfs instead to get number of CPUs
  • From: Jan Engelhardt <jengelh@xxxxxxxxxx>
  • Date: Mon, 12 Apr 2010 22:27:51 +0200
  • Message-id: <1271104076-17164-3-git-send-email-jengelh@xxxxxxxxxx>
Grepping for ^processor in /proc/cpuinfo produces a zero result on
sparc64, so don't do it. Use sysfs instead.

Signed-off-by: Jan Engelhardt <jengelh@xxxxxxxxxx>
---
dist/obsworker | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dist/obsworker b/dist/obsworker
index d7a77c2..295f19c 100755
--- a/dist/obsworker
+++ b/dist/obsworker
@@ -151,7 +151,7 @@ case "$1" in
NUM="$OBS_WORKER_INSTANCES"
else
# start one build backend per CPU
- NUM=`grep -i ^processor /proc/cpuinfo | wc -l`
+ NUM=$(ls /sys/devices/system/cpu/cpu* | wc -l)
fi
I=0
ROOT="/tmp"
--
1.7.0.4

--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
References