I am currently implementing BF Server Automation in my environment, focusing primarily system application shutdown and start-ups (SAP, DB2 and Oracle). Working with some great IBM folks on on this project....we've recently been working on writing relevance and have hit a slight roadblock on AIX where we are trying to add a custom success criteria to my DB2 start/stop tasks where by the relevance needs to check if the DB is up or down at the end of execution of the task.
I have developed the following relevance to check for key DB2 processes and the db's associated user after starting DB2, if the processes did not start, the relevance should cause the action/task to fail and stop (preventing the application from starting without the database) and my automation plan should continue with whatever other tasks assigned to it:
not exists processes whose (name of it contains "db2sysc") AND not exists processes whose (name of user of it contains "(")
After testing a DB2 start (forcing a failed start with a bad command) the task continued to execute anyway because some a couple of defunct processes after the DB stop associated with the db2user.
Reason why I am requiring the user into the relevance is because my environment has systems with multiple DB2's running (5 or more DB2's/instances running on a given host). And for each task I am running in my automation plan(s) (in a parallel fashion), I need to ensure the relevance is checking the status of the system (DB2) they're being executed against. So if one particular database fails to start/stop... the relevance in that action should identify this and stop (the action) for that DB2 system only...allowing all other parallel tasks to continue.
An example of one of my AIX hosts with multi DB2's running:
$ ps -ef|grep db2sysc
db2cfd 19071108 51314698 1 Feb 15 - 440:32 db2sysc 0
db2smm 24182808 46727456 5 Jun 16 - 3805:40 db2sysc 0
db2cjd 28115152 35127496 0 May 20 - 76:34 db2sysc 0
db2dfd 32178284 31326214 0 Feb 15 - 278:13 db2sysc 0
db2mcd 42401870 42598432 5 Feb 16 - 1796:01 db2sysc 0
db2ac2 50921680 41353316 0 Apr 17 - 5616:20 db2sysc 0
db2irs 51118186 35717196 0 Apr 03 - 1742:26 db2sysc 0
db2hc3 57081948 64028840 0 Feb 15 - 349:50 db2sysc 0
db2ehd 62521568 56492092 0 Feb 15 - 1275:41 db2sysc 0
db2insv 10289572 9044406 0 Feb 16 - 456:02 db2sysc 0
usdbk00 26476830 23527702 0 09:47:29 pts/1 0:00 grep db2sysc
db2ums 29426070 28901474 0 May 21 - 160:18 db2sysc 0
db2ccx 39846334 43778484 7 Jun 16 - 2450:07 db2sysc 0
What was proposed yesterday with my team was to include the pathname in the relevance for the db2sysc process to ensure relevance is looking for the system that we expect it to. Example:
exists process whose ((name of it contains "db2sysc") and (name of user of it contains "db2prx") and (pathname of image file of it contains "/db2/db2prx/sqllib/adm"))
Seems AIX does not like the 'pathname'...trying to figure out some solution to do what I have stated (above).
Long winded, sorry about that.
Hoping someone has some experience with what I am trying to do (and on AIX).