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 > DB2 Event Monitor reading 0000000.evt files

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-15-10, 15:34
rockycj rockycj is offline
Registered User
 
Join Date: Feb 2007
Posts: 73
DB2 Event Monitor reading 0000000.evt files

I'm using DB2 v9.1.4 LUW. I want to read the event monitor logs for deadlocks. I'm not that familiar with this.

For example there are two files out in:
/db2syscat/db2inst1/NODE0000/SQL00001/db2event/db2detaildeadlock/

00000000.evt
db2event.ctl

Then I used the db2evmon command like this, to copy to a readable format:
db2evmon -path /db2syscat/db2inst1/NODE0000/SQL00001/db2event/db2detaildeadlock/ > /source/00000000.txt

Here is what is in the file:
--------------------------------------------------------------------------
EVENT LOG HEADER
Event Monitor name: DEADLOCK
Server Product ID: SQL09014
Version of event monitor data: 8
Byte order: BIG ENDIAN
Number of nodes in db2 instance: 1
Codepage of database: 1208
Territory code of database: 1
Server instance name: db2inst1
--------------------------------------------------------------------------

--------------------------------------------------------------------------
Database Name: PSFTPROD
Database Path: /db2_data/db2inst1/NODE0000/SQL00001/
First connection timestamp: 01/17/2010 19:19:20.120504
Event Monitor Start time: 01/21/2010 08:18:51.899592
--------------------------------------------------------------------------


I expected to see more information and details here.
I see this is a Header file, is there details or how to a view the details?
Or is there something I'm missing or need to do?

Could someone who is experienced with DB2 Event Monitors explain how this works and give me any information.

Thank you.


Carla Clark
Reply With Quote
  #2 (permalink)  
Old 02-15-10, 15:46
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Maybe you did not encounter any deadlocks?
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 02-16-10, 07:02
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Make sure you FLUSH EVENT MONITOR, otherwise recent events may not be present in the file.
Reply With Quote
  #4 (permalink)  
Old 06-21-10, 11:22
mprocak mprocak is offline
Registered User
 
Join Date: Jun 2010
Posts: 3
Hi, we have a bunch of .evt files, it seems that the command db2evmon looks for the file named 00000000.EVT
How can I issue this command and have it point to a .evt file other than the 00000000.EVT file? If I specify a filename, It automatically appends the 00000000.EVT filename.

Thanks
Reply With Quote
  #5 (permalink)  
Old 06-21-10, 15:23
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by mprocak View Post
the command db2evmon looks for the file named 00000000.EVT
How can I issue this command and have it point to a .evt file other than the 00000000.EVT file? If I specify a filename, It automatically appends the 00000000.EVT filename.
db2evmon cannot read the event stream in the middle of it; it has to start from the beginning and will read all event files in sequence. Why do you think you need to read a file other than 00000000.EVT?
Reply With Quote
  #6 (permalink)  
Old 06-21-10, 15:55
mprocak mprocak is offline
Registered User
 
Join Date: Jun 2010
Posts: 3
Quote:
Originally Posted by n_i View Post
db2evmon cannot read the event stream in the middle of it; it has to start from the beginning and will read all event files in sequence. Why do you think you need to read a file other than 00000000.EVT?
We will eventually see the following message
ADM2017C The Event Monitor "DB2DETAILDEADLOCK" has reached its file capacity.
Delete the files in the target directory
"G:\DB2QREP\NODE0000\SQL00002\DB2EVENT\db2detailde adlock" or move them to
another directory.

therefore we need to periodically remove .evt files from the directory.
This is why we are not starting at 0000
Reply With Quote
  #7 (permalink)  
Old 06-21-10, 16:52
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
try db2evmon with -file parameter:
db2evmon -path <path> -file <number>

where <number> is the evt file number
Reply With Quote
  #8 (permalink)  
Old 06-21-10, 23:32
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by mprocak View Post
therefore we need to periodically remove .evt files from the directory.
This is why we are not starting at 0000
Stop the event monitor before moving the files, restart it afterwards to begin a new set of files.
Reply With Quote
  #9 (permalink)  
Old 06-22-10, 09:02
mprocak mprocak is offline
Registered User
 
Join Date: Jun 2010
Posts: 3
Thanks db2girl the -file option worked!
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