[PATCH 3/9] CTS: ignore blackbox shm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(only whilst running as it is still visable)

Signed-off-by: Angus Salkeld <asalkeld@xxxxxxxxxx>
---
 cts/agents/shm_leak_audit.sh |   73 +++++++++++++++++++++++-------------------
 1 files changed, 40 insertions(+), 33 deletions(-)

diff --git a/cts/agents/shm_leak_audit.sh b/cts/agents/shm_leak_audit.sh
index 4b59331..81f0409 100755
--- a/cts/agents/shm_leak_audit.sh
+++ b/cts/agents/shm_leak_audit.sh
@@ -6,41 +6,48 @@ CS_STATUS=$?
 
 if [ $CS_STATUS -eq 0 ]
 then
-	# corosync running
-	active=$(corosync-cmapctl runtime.connections. | grep active | cut -d= -f2)
-	if [ $active -lt 2 ]
-	then
-		FILES=$(ls /dev/shm/qb-*)
-		for f in $FILES
-		do
-			echo $f
-		done
-	else
-		pids=$(corosync-cmapctl runtime.connections. | grep client_pid | cut -d= -f2)
+    # corosync running
+    active=$(corosync-cmapctl runtime.connections.active | cut -d= -f2)
+    if [ $active -lt 2 ]
+    then
+        FILES=$(ls /dev/shm/qb-*)
+        for f in $FILES
+        do
+            if [[ "$f" =~ "blackbox" ]]
+            then
+                true
+            else
+                echo $f
+            fi
+        done
+    else
+        pids=$(corosync-cmapctl runtime.connections. | grep client_pid | cut -d= -f2)
 
-		FILES=$(ls /dev/shm/qb-*)
-		for f in $FILES
-		do
-			found=0
-			for p in $pids
-			do
-				if [[ "$f" =~ "$p" ]]
-				then
-					found=1
-				fi
-			done
-			if [ $found -eq 0 ]
-			then
-				echo $f
-			fi
-		done	
-	fi
+        FILES=$(ls /dev/shm/qb-*)
+        for f in $FILES
+        do
+            found=0
+            for p in $pids
+            do
+                if [[ "$f" =~ "$p" ]]
+                then
+                    found=1
+                elif [[ "$f" =~ "blackbox" ]]
+                    found=1
+                fi
+            done
+            if [ $found -eq 0 ]
+            then
+                echo $f
+            fi
+        done
+    fi
 else
-	FILES=$(ls /dev/shm/qb-*)
-	for f in $FILES
-	do
-		echo $f
-	done
+    FILES=$(ls /dev/shm/qb-*)
+    for f in $FILES
+    do
+        echo $f
+    done
 fi
 
 exit 0
-- 
1.7.7.5

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux