Friday, 5 July 2024

Shell Script To Retrieve IBM ACE Resource/Flow details

 

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

Sending file as multi-part MIME over http in ACE - esql

  How to send a file over http as a multipart mime? Below are the steps to do that - 1. Make sure you have the data encryption in place for ...