oh yeah .. there are definitely a ton of ways to obtain that information. Lots of db2 utilities which will be able to determine if a status is running. I will modify the code later when i have a moment and post to the list for comment.
Tim On Fri, Aug 14, 2009 at 5:11 PM, Dejan Muhamedagic <[email protected]>wrote: > Hi, > > On Fri, Aug 14, 2009 at 03:56:07PM +0200, Timothy Carr wrote: > > Hi > > > > Node 0 > > UID PID PPID C STIME TTY TIME CMD > > db2poc 7072 7070 6 15:55 pts/0 00:00:00 db2sysc 0 > > root 7073 7072 0 15:55 pts/0 00:00:00 db2ckpwd 0 > > root 7074 7072 0 15:55 pts/0 00:00:00 db2ckpwd 0 > > root 7075 7072 0 15:55 pts/0 00:00:00 db2ckpwd 0 > > > > Thats the output from db2_local_ps > > That looks like as if at times there could be just two processes, > perhaps depending on the database configuration. Isn't there a > more straightforward way to find out if an instance is running? > Just searched on Internet and couldn't find nothing good. Sigh. > > Thanks, > > Dejan > > > > > On Fri, Aug 14, 2009 at 3:29 PM, Dejan Muhamedagic <[email protected] > >wrote: > > > > > Hi, > > > > > > On Fri, Aug 14, 2009 at 02:42:32PM +0200, Timothy Carr wrote: > > > > Heh, > > > > > > > > thanks for putting me on the correct path. You are 100% correct. > > > > > > The other poster actually figured out what was going on. > > > > > > > the pscount code which is being returned is a value of 5. This is > > > > unfortunately too much. The amount of processes returned from DB2 9.5 > are > > > > actually 4 and therefore the db2 resource script will fail because > the " > > > > test $pscount -ge 5 " looks for the amount of db2 processess greater > and > > > > equal to 5. Set the value to 3 and you will be set :) > > > > > > I guess you meant 4? > > > > > > I just wonder whether that would introduce a regression. > > > Can you show a sample of the output of db2_local_ps? > > > > > > Thanks, > > > > > > Dejan > > > > > > > Thanks > > > > > > > > > > > > On Fri, Aug 14, 2009 at 1:54 PM, Dejan Muhamedagic < > [email protected] > > > >wrote: > > > > > > > > > Hi, > > > > > > > > > > On Fri, Aug 14, 2009 at 01:32:22PM +0200, Timothy Carr wrote: > > > > > > Hi All, > > > > > > > > > > > > I've setup linux HA and its working pretty well with my disks > being > > > > > migrated > > > > > > when i need it to and VIP working nicely. > > > > > > The problem I seem to have is getting DB2 to startup with the OCF > > > > > resource > > > > > > agent. > > > > > > > > > > > > > > > > > > crmd[6031]: 2009/08/14_13:06:51 info: do_lrm_rsc_op: Performing > > > > > > op=db2poc_monitor_0 > > > key=5:27162:7:596c511b-85e0-40b6-b1df-2ef28e41fa94) > > > > > > lrmd[6028]: 2009/08/14_13:06:51 info: rsc:db2poc: monitor > > > > > > crmd[6031]: 2009/08/14_13:06:52 info: process_lrm_event: LRM > > > operation > > > > > > db2poc_monitor_0 (call=47, rc=7) complete > > > > > > crmd[6031]: 2009/08/14_13:06:55 info: do_lrm_rsc_op: Performing > > > > > > op=db2poc_start_0 > > > key=19:27162:0:596c511b-85e0-40b6-b1df-2ef28e41fa94) > > > > > > lrmd[6028]: 2009/08/14_13:06:55 info: rsc:db2poc: start > > > > > > db2[20759]: 2009/08/14_13:07:02 INFO: DB2 UDB instance db2poc > > > started: > > > > > > 08/14/2009 13:07:02 0 0 SQL1063N DB2START processing was > > > > > > successful. > > > > > > SQL1063N DB2START processing was successful. > > > > > > db2[20759]: 2009/08/14_13:07:02 ERROR: DB2 UDB instance db2poc > not > > > > > > active! > > > > > > crmd[6031]: 2009/08/14_13:07:02 info: process_lrm_event: LRM > > > operation > > > > > > db2poc_start_0 (call=48, rc=1) complete > > > > > > crmd[6031]: 2009/08/14_13:07:03 info: do_lrm_rsc_op: Performing > > > > > > op=db2poc_stop_0 > key=1:27163:0:596c511b-85e0-40b6-b1df-2ef28e41fa94) > > > > > > lrmd[6028]: 2009/08/14_13:07:03 info: rsc:db2poc: stop > > > > > > db2[21059]: 2009/08/14_13:07:05 INFO: DB2 UDB instance db2poc > > > stopped: > > > > > > 08/14/2009 13:07:05 0 0 SQL1064N DB2STOP processing was > > > > > successful. > > > > > > SQL1064N DB2STOP processing was successful. > > > > > > db2[21059]: 2009/08/14_13:07:06 INFO: DB20000I The TERMINATE > > > command > > > > > > completed successfully. > > > > > > db2[21059]: 2009/08/14_13:07:07 INFO: ipclean: Removing DB2 > engine > > > and > > > > > > client's IPC resources for db2poc. > > > > > > crmd[6031]: 2009/08/14_13:07:07 info: process_lrm_event: LRM > > > operation > > > > > > db2poc_stop_0 (call=49, rc=0) complete > > > > > > cib[6027]: 2009/08/14_13:16:44 info: cib_stats: Processed 32 > > > operations > > > > > > (312.00us average, 0% utilization) in the last 10min > > > > > > > > > > > > > > > > > > The folllowing is an extract from the ha-log file. It starts up > the > > > > > instance > > > > > > but then somehow detects that the instance is not active then > shuts > > > down > > > > > DB2 > > > > > > again. > > > > > > > > > > It looks like the db2 resource agent can't handle newer db2 > > > > > releases. In particular, the monitor operation fails since db2 > > > > > started using threads. Somebody reported it two-three weeks ago > > > > > on this list. The problem is here: > > > > > > > > > > pscount=`runasdb2 $db2bin/db2_local_ps | cut -c9- | grep ' db2[^ > ]' | > > > wc > > > > > -l` > > > > > test $pscount -ge 5 > > > > > > > > > > We need to find out a db2 release running and then implement > > > > > a proper test. > > > > > > > > > > Unfortunately I don't have a db2 instance for testing. > > > > > > > > > > Thanks, > > > > > > > > > > Dejan > > > > > > > > > > > > > > > > > -- > > > > > > Timothy Carr > > > > > > Technical > > > > > > Gtalk: [email protected] > > > > > > Skype: timothy.carr.foxtrail > > > > > > _______________________________________________ > > > > > > Linux-HA mailing list > > > > > > [email protected] > > > > > > http://lists.linux-ha.org/mailman/listinfo/linux-ha > > > > > > See also: http://linux-ha.org/ReportingProblems > > > > > _______________________________________________ > > > > > Linux-HA mailing list > > > > > [email protected] > > > > > http://lists.linux-ha.org/mailman/listinfo/linux-ha > > > > > See also: http://linux-ha.org/ReportingProblems > > > > > > > > > > > > > > > > > > > > > -- > > > > Timothy Carr > > > > Technical Specialist > > > > University of Cape Town > > > > Cell: +27834572568 > > > > Fax: +27865472190 > > > > Gtalk: [email protected] > > > > Skype: timothy.carr.foxtrail > > > > _______________________________________________ > > > > Linux-HA mailing list > > > > [email protected] > > > > http://lists.linux-ha.org/mailman/listinfo/linux-ha > > > > See also: http://linux-ha.org/ReportingProblems > > > _______________________________________________ > > > Linux-HA mailing list > > > [email protected] > > > http://lists.linux-ha.org/mailman/listinfo/linux-ha > > > See also: http://linux-ha.org/ReportingProblems > > > > > > > > > > > -- > > Timothy Carr > > Technical Specialist > > University of Cape Town > > Cell: +27834572568 > > Fax: +27865472190 > > Gtalk: [email protected] > > Skype: timothy.carr.foxtrail > > _______________________________________________ > > Linux-HA mailing list > > [email protected] > > http://lists.linux-ha.org/mailman/listinfo/linux-ha > > See also: http://linux-ha.org/ReportingProblems > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems > -- Timothy Carr Technical Specialist University of Cape Town Cell: +27834572568 Fax: +27865472190 Gtalk: [email protected] Skype: timothy.carr.foxtrail _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
