You can copy below script and save as .sh extension, replace the node name and execute it.
Note: make sure you are running the script with correct user privilege.
------------------------------- Start of script ---------------------------------------
#!/bin/sh
RESFILE="/tmp/ACE_Flow_Details.txt"
WORKDIR="/tmp/"
CURDATE=`date +"%Y-%m-%d-%H:%M:%S"`
echo "Starting mqsilist for all flows: " $CURDATE
mqsilist ACE-Node >> $WORKDIR/ACE_Node_list.txt
grep -i "Integration server" $WORKDIR/ACE_Node_list.txt >> $WORKDIR/ACE_EG_list.txt
while read line; do
EGname=`echo $line |cut -d"'" -f2 | cut -d"'" -f1`
mqsilist ACE-Node -e $EGname >> $WORKDIR/ACE_AppTemp_list.txt
grep -i ": Application" $WORKDIR/ACE_AppTemp_list.txt >> $WORKDIR/ACE_App_list.txt
while read templine; do
AppName=`echo $templine | cut -d":" -f2 | cut -d"'" -f2`
echo "running mqsilist for EG: " $EGname " and App: " $AppName
mqsilist ACE-Node -e $EGname -k $AppName -d2 >> $RESFILE
done < $WORKDIR/ACE_App_list.txt
rm $WORKDIR/ACE_App_list.txt
rm $WORKDIR/ACE_AppTemp_list.txt
done < $WORKDIR/ACE_EG_list.txt
rm $WORKDIR/ACE_EG_list.txt
rm $WORKDIR/ACE_Node_list.txt
echo "End of mqsilist, please check the file: " $RESFILE
echo "Please Remove the files: " $RESFILE " after use."
------------------------------- End of script ---------------------------------------
No comments:
Post a Comment