Page MenuHomeClusterLabs Projects

shm_leak_audit.sh.in
No OneTemporary

shm_leak_audit.sh.in

#!@BASHPATH@
service corosync status >/dev/null
CS_STATUS=$?
if [ $CS_STATUS -eq 0 ]
then
# 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
elif [[ "$f" =~ "blackbox" ]]
then
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
fi
exit 0

File Metadata

Mime Type
text/plain
Expires
Wed, Feb 26, 7:40 AM (22 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1462659
Default Alt Text
shm_leak_audit.sh.in (1 KB)

Event Timeline