If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to execute specific db2pd command when a certain function is seen in db2diag.log?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-08-12, 23:21
Jenny86 Jenny86 is offline
Registered User
 
Join Date: Aug 2010
Location: Sweden
Posts: 7
How to execute specific db2pd command when a certain function is seen in db2diag.log?

Hello DB2 Experts,

Here is an example...

I want to execute "db2pd -eve" and "db2pd -db TEST -dpsdbcb 3" when I see probe point sqlerFmpListener, probe:999 in db2diag.log. Like...


2012-01-01-01.05.02.328002-660 I154143A452 LEVEL: Error
PID : 2302160 TID : 772 PROC : db2fmp (C) 0
INSTANCE: db2inst2 NODE : 000
EDUID : 772 EDUNAME: db2fmp (C) 0
FUNCTION: DB2 UDB, routine_infrastructure, sqlerFmpListener, probe:999
MESSAGE : FMP exiting with error. Last agent registered:
DATA #1 : Hexdump, 4 bytes
0x00000001102C7EE8 : 0000 0000 ....

Please let me know how to capture these db2pd outputs as soon as we see this above probe point? Appreciate if you can share the details.

Thanks,
Jenny
Reply With Quote
  #2 (permalink)  
Old 01-08-12, 23:56
amitrai4 amitrai4 is offline
Registered User
 
Join Date: Aug 2011
Posts: 46
db2pdcfg , take a look.
Reply With Quote
  #3 (permalink)  
Old 01-09-12, 00:35
fengsun2 fengsun2 is offline
Registered User
 
Join Date: Nov 2011
Posts: 124
i think this probe point is used for db2 code developer to do some trace analysis。。。。
We can't add or change this probe point .
Why do you think the probe point has any relationship with the db2pd command?????
Reply With Quote
  #4 (permalink)  
Old 01-09-12, 00:55
Jenny86 Jenny86 is offline
Registered User
 
Join Date: Aug 2010
Location: Sweden
Posts: 7
Quote:
Originally Posted by amitrai4 View Post
db2pdcfg , take a look.
>>> db2pdcfg only works for SQL errors so wont work in this case.
Reply With Quote
  #5 (permalink)  
Old 01-09-12, 00:56
Jenny86 Jenny86 is offline
Registered User
 
Join Date: Aug 2010
Location: Sweden
Posts: 7
Quote:
Originally Posted by fengsun2 View Post
i think this probe point is used for db2 code developer to do some trace analysis。。。。
We can't add or change this probe point .
Why do you think the probe point has any relationship with the db2pd command?????
Lets say instead of looking for probe points...we focus on MESSAGE FMP exiting with error. Last agent registered:

How to do that?
Reply With Quote
  #6 (permalink)  
Old 01-09-12, 01:38
fengsun2 fengsun2 is offline
Registered User
 
Join Date: Nov 2011
Posts: 124
Can you explain your requirement more specificly?
I cannt get what do you want?
Reply With Quote
  #7 (permalink)  
Old 01-09-12, 02:07
amitrai4 amitrai4 is offline
Registered User
 
Join Date: Aug 2011
Posts: 46
On v9.7:

C:\Documents and Settings\Administrator>db2pdcfg -catch diagstr="FMP exiting with error"
Error Catch #1
Sqlcode: 0
ReasonCode: 0
ADMCode: 0
DiagText: FMP exiting with error
ZRC: 0
ECF: 0
Component ID: 0
LockName: Not Set
LockType: Not Set
Current Count: 0
Max Count: 255
Bitmap: 0x8421
Action: Error code catch flag enabled
Action: Execute C:\PROGRA~1\IBM\SQLLIB\bin\db2cos.bat callout script
Action: Produce stack trace in db2diag.log

for prior versions you can use ZRC or ECF code.
Reply With Quote
  #8 (permalink)  
Old 01-09-12, 02:08
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
schedule a script that will execute db2diag with a specific timeframe
eg 10 min interval schedule and execute db2diag for last 10 minutes
when you get the message - execute the command (with some delay)
or you check the diag.log all the time and act when error occures
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On