db2 - how to get list of all of the Db2 instances on computer
I have several Linux servers and on them may be one or more Db2 instances. Db2 instances can be from different Db2 versions.
For security audit I need to write some simple bash script to check for some "dbm cfg" settings on all Linux servers. I have some tool that allows me to connect to Linux servers with root access and then I am able to execute any bash command on remote Linux server.
QUESTION: What I am having a problem is, how to get the list of Db2 instances on Linux server with root user without knowing the Db2 instance owners or Db2 instance names?
When I get the owners I can "sudo" or "su" to that Db2 instance owner Linux user and execute "db2 get dbm cfg" command.
Use the https://www.ibm.com/docs/en/db2/11.5?topic=tools-db2greg :