From e2b9185db2c85f293c4829fab73bb8ed330524d1 Mon Sep 17 00:00:00 2001
From: grev <grev>
Date: Wed, 3 Sep 2008 15:58:30 +0000
Subject: [PATCH] b=14471 i=Adilger i=grev replace proc with lctl
 [set|get]_param

---
 lustre/tests/acceptance-metadata-double.sh | 4 ++--
 lustre/tests/acceptance-metadata-single.sh | 4 ++--
 lustre/tests/acceptance-small.sh           | 8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/lustre/tests/acceptance-metadata-double.sh b/lustre/tests/acceptance-metadata-double.sh
index 9c9df63b17..6027db7bc3 100644
--- a/lustre/tests/acceptance-metadata-double.sh
+++ b/lustre/tests/acceptance-metadata-double.sh
@@ -26,12 +26,12 @@ display_elapsed_time() {
 
 debug_client_on()
 {
-	echo -1 > /proc/sys/lnet/debug
+	lctl set_param -n debug=-1
 }
 
 debug_client_off()
 {
-	echo 0x3f0400 > /proc/sys/lnet/debug
+	lctl set_param -n debug=0x3f0400
 }
 
 MNT=${MNT:-/mnt/lustre}
diff --git a/lustre/tests/acceptance-metadata-single.sh b/lustre/tests/acceptance-metadata-single.sh
index ad927fab5d..685f9f4c7d 100644
--- a/lustre/tests/acceptance-metadata-single.sh
+++ b/lustre/tests/acceptance-metadata-single.sh
@@ -26,12 +26,12 @@ display_elapsed_time() {
 
 debug_client_on()
 {
-	echo -1 > /proc/sys/lnet/debug
+	lctl set_param -n debug=-1
 }
 
 debug_client_off()
 {
-	echo 0x3f0400 > /proc/sys/lnet/debug
+	lctl set_param -n debug=0x3f0400
 }
 
 MNT=${MNT:-/mnt/lustre}
diff --git a/lustre/tests/acceptance-small.sh b/lustre/tests/acceptance-small.sh
index 7214e22db9..588efefd1b 100755
--- a/lustre/tests/acceptance-small.sh
+++ b/lustre/tests/acceptance-small.sh
@@ -149,7 +149,7 @@ for NAME in $CONFIGS; do
 		mkdir -p $BONDIR
 		$LFS setstripe -c -1 $BONDIR
 		sync
-		MIN=`cat /proc/fs/lustre/osc/*/kbytesavail | sort -n | head -n1`
+		MIN=`lctl get_param -n osc.*.kbytesavail | sort -n | head -n1`
 		SPACE=$(( OSTCOUNT * MIN ))
 		[ $SPACE -lt $SIZE ] && SIZE=$((SPACE * 3 / 4))
 		log "min OST has ${MIN}kB available, using ${SIZE}kB file size"
@@ -175,7 +175,7 @@ for NAME in $CONFIGS; do
 		mkdir -p $IOZDIR
 		$LFS setstripe -c -1 $IOZDIR
 		sync
-		MIN=`cat /proc/fs/lustre/osc/*/kbytesavail | sort -n | head -n1`
+		MIN=`lctl get_param -n osc.*.kbytesavail | sort -n | head -n1`
 		SPACE=$(( OSTCOUNT * MIN ))
 		[ $SPACE -lt $SIZE ] && SIZE=$((SPACE * 3 / 4))
 		log "min OST has ${MIN}kB available, using ${SIZE}kB file size"
@@ -307,8 +307,8 @@ for NAME in $CONFIGS; do
 			$SETUP
 		export LIBLUSTRE_MOUNT_POINT=$MOUNT2
 		export LIBLUSTRE_MOUNT_TARGET=$MGSNID:/$FSNAME
-		export LIBLUSTRE_TIMEOUT=`cat /proc/sys/lustre/timeout`
-		#export LIBLUSTRE_DEBUG_MASK=`cat /proc/sys/lnet/debug`
+		export LIBLUSTRE_TIMEOUT=`lctl get_param -n timeout`
+		#export LIBLUSTRE_DEBUG_MASK=`lctl get_param -n debug`
 		if [ -x $LIBLUSTRETESTS/sanity ]; then
 			mkdir -p $MOUNT2
 			echo $LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET
-- 
GitLab