From 28598e66c3682bbe93f10c30c203a79b16232618 Mon Sep 17 00:00:00 2001 From: cliffw Date: Wed, 3 Aug 2005 19:18:30 +0000 Subject: [PATCH] added test of /proc/fs/lustre/health_check --- lustre/scripts/lustre | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lustre/scripts/lustre b/lustre/scripts/lustre index 24061bc..72a744d 100755 --- a/lustre/scripts/lustre +++ b/lustre/scripts/lustre @@ -131,7 +131,12 @@ status() { # check for servers in recovery [ "$MDS$OST" ] && grep -q RECOV $MDS $OST && STATE="recovery" - [ "`dmesg | grep LBUG`" ] && STATE="LBUG" + # check for error in health_check + HEALTH="/proc/fs/lustre/health_check" + [ -f "$HEALTH" ] && grep -q "NOT HEALTHY" $HEALTH && STATE="unhealthy" + + # check for LBUG + [ -f "$HEALTH" ] && grep -q "LBUG" $HEALTH && STATE="LBUG" echo $STATE } -- 1.8.3.1