#
# 消息队列监控,参数为消息队列中的消息个数阀值
#
rm $TMPDIR/monipc > /dev/null 2>&1
ipcs -qa | grep -v TAIST | grep -v QNUM | grep -v IPC | awk '{
if ($10 > limit)
{
printf "消息队列异常\tID:%s\tOWNER:%s\tQNUM:%s\n",$2,$5,$10
system("> $TMPDIR/monipc")
}
}'
if [ -f $TMPDIR/monipc ]
then
exit 1
else
echo "IPC无异常"
exit 0
fi
阅读(1013) | 评论(0) | 转发(0) |