I have noticed while viewing the conn.log file, that some of the timestamp fields in the entries are not in chronological order. For example, viewing a section of this file I see:
yes, this is indeed normal. The timestamp that is, e.g., given in conn.log is the timestamp at which the connection was created (timestamp of first packet). However, the log line is written after the connection terminates. Thus, it is expected, and completely normal, that the the timestamps will not be ordered chronologically.
I have noticed while viewing the conn.log file, that some of the timestamp
fields in the entries are not in chronological order.
This is routine. It happens because generating the log entry occurs upon completion of the connection (or in some cases a timeout), but the timestamp at the beginning is when the connection started, not when it was logged. Because connections have varying lengths, this leads to out-of-order start timestamps.
Can we change that to create a log using connection completion time ?
Even if you did that (which doesn’t seem as useful as knowing the start time), logs would still likely be out-of-order, since some of the entries are driven off of network activity (i.e., right at the end of the connection) and others off of timeouts (in which case the actual end was in the past).
If you need the logs to be in order, the usual approach is simply to sort them on timestamp.