Querying Log Files Within a Time Interval
Use the following procedure to search log files created within a specific time interval. For other options of the Log File Analyzer (LFA) query command, see Creating and Saving LFA Queries.
To query events logged within a certain time interval
Enter:
query query_name where time from "YYYY-MM-DD HH:MM:SS" to "YYYY-MM-DD HH:MM:SS"where:
query_name is the query command output stored in memory under this name.
"YYYY-MM-DD HH:MM:SS" is the date and time of interest.
Note: The exact time portion of the date and time parameter,HH:MM:SS, can be omitted. In this case, the date’s from-time defaults to00:00:00and the to-time defaults to23:59:59.
An example of this query command is as follows:
query timeintqry where time from "2017-05-01 16:30:00" to "2017-05-05"
This command queries log files created between May
1, 2017 at 4:30 PM and May 5, 2017 at 11:59 PM, and saves the output
to memory under the name timeintqry.
This command is useful in combination with other parameters to filter results. For more information, see Querying Log Files Using Multiple Conditions.