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