How to use db2diag command line option for time

27 April,2017 by Jack Vamvas

Question: A vendor has requested a snippet from db2diag log. The file needs to include all the db2diag log entries between 00:00:00 and 01:10  from 1 week ago.   I checked the file and the timeframe is available – but there are thousands of entries around that time , and so it is time consuming to extract the details.

Is there a way with db2diag command line option to extract between a start and finis time?

Answer: db2diag command line options offers a wider range of methods to interrogate and extract details. 

There is a command line option –time , which will satisfy your requirements. Let’s check an example.

db2diag -time 2016-04-16-00.00:2016-04-16-01.10

This example will extract all entries between midnight and 01:10 for the date 2016-04-16.

The IBM DB2 documentation has a full comprehensive details for  db2diag - db2diag logs analysis tool command

 

Author: Jack Vamvas(http://www.dba-db2.com)

Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on How to use db2diag command line option for time

Comments are moderated, and will not appear until the author has approved them.


dba-db2.com | DB2 Performance Tuning | DBA DB2:Everything | FAQ | Contact | Copyright