Skip to content
Snippets Groups Projects
Commit d58b0b01 authored by Elena Gryaznova's avatar Elena Gryaznova
Browse files

b=14471

i=Adilger
replace lustre proc by lctl [set|get]_param
parent 48741737
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,7 @@ if [ "$WAS_MOUNTED" ]; then ...@@ -45,7 +45,7 @@ if [ "$WAS_MOUNTED" ]; then
fi fi
get_mnt_devs() { get_mnt_devs() {
DEVS=`cat /proc/fs/lustre/$1/*/mntdev` DEVS=`lctl get_param -n $1.*.mntdev`
for DEV in $DEVS; do for DEV in $DEVS; do
case $DEV in case $DEV in
*loop*) losetup $DEV | sed -e "s/.*(//" -e "s/).*//" ;; *loop*) losetup $DEV | sed -e "s/.*(//" -e "s/).*//" ;;
......
...@@ -118,7 +118,7 @@ test_5() { ...@@ -118,7 +118,7 @@ test_5() {
run_test 5 "Fail OST during iozone" run_test 5 "Fail OST during iozone"
kbytesfree() { kbytesfree() {
awk '{total+=$1} END {print total}' /proc/fs/lustre/osc/*-osc-*/kbytesfree calc_osc_kbytes kbytesfree
} }
test_6() { test_6() {
......
...@@ -1713,6 +1713,14 @@ calc_llite_stats() { ...@@ -1713,6 +1713,14 @@ calc_llite_stats() {
echo $res echo $res
} }
calc_sum () {
awk 'BEGIN {s = 0}; {s += $1}; END {print s}'
}
calc_osc_kbytes () {
$LCTL get_param -n osc.*[oO][sS][cC][-_]*.$1 | calc_sum
}
# save_lustre_params(node, parameter_mask) # save_lustre_params(node, parameter_mask)
# generate a stream of formatted strings (<node> <param name>=<param value>) # generate a stream of formatted strings (<node> <param name>=<param value>)
save_lustre_params() { save_lustre_params() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment