Results 1 to 15 of 15
  1. #1
    Join Date
    Feb 2007
    Posts
    84

    Unanswered: 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

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Make sure you FLUSH EVENT MONITOR, otherwise recent events may not be present in the file.
    ---
    "It does not work" is not a valid problem statement.

  4. #4
    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

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    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?

  6. #6
    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

  7. #7
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    try db2evmon with -file parameter:
    db2evmon -path <path> -file <number>

    where <number> is the evt file number

  8. #8
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    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.

  9. #9
    Join Date
    Jun 2010
    Posts
    3
    Thanks db2girl the -file option worked!

  10. #10
    Join Date
    Sep 2012
    Posts
    177
    Hi all,

    I tried to create event monitor for statements but i can't.

    [db2inst1@XXXX ~]$ db2 create EVENT MONITOR evmon1 FOR STATEMENTS WRITE TO FILE "'/tistest/data'"
    DB20000I The SQL command completed successfully.

    [db2inst1@xxxx ~]$ db2evmon -db TIS_DWHD -evm evmon1 > evmon1.out
    Cannot open Event Monitor file "/tistest/data/00000000.evt."

    I can't able to get the output file.

    How to sort out this issue?

    Thanks,
    laxman.

  11. #11
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    You didn't activate it, so there is no 00000000.evt

  12. #12
    Join Date
    Sep 2012
    Posts
    177
    Hi db2girl,

    Thanks for your reply.

    I am not aware of this could you please explain briefly.

    How to activate it?

    Thanks,
    laxman.

  13. #13
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2
    db2 set event monitor evmon1 state = 1
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

  14. #14
    Join Date
    Sep 2012
    Posts
    177
    Thanks aflorin It's works fine.

    Regards,
    laxman.

  15. #15
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    Mr Laxman : why do you start a new question in an existing converstation ? you should always start a new one. At IBM there is something like infocenter where you immediately can find all info without having to wait for volunteers to reply in the forum.
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •