To gather all inforamtion by  using the MQSC command

To display real-time monitoring information for a queue or channel, use either the IBM® MQ Explorer or the appropriate MQSC command. Some monitoring fields display a comma-separated pair of indicator values, which help you to monitor the operation of your queue manager.

for QM in `dspmq |awk -F”(” ‘{ print $2 }’ |awk -F”)” ‘{ print $1 }’`; do
runmqsc $QM  < display.msqsc

if [ $? -eq 0 ] ; then
echo “$QM QMGR is running “
else
echo “$QM QMGR is not running “
fi

done
[mqm@ip-172-31-14-154 ~]$

vi /etc/dispmq.msqsc
display q