You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[storyteller] sort output by time and improve lag support (sonic-net#1430)
What I did
sort output by time
improve lag support according to event format changes
add an option to sort the log files by a field of file name (after log files got moved or copied, sorting by timestamp is no longer reliable).
Signed-off-by: Ying Xie [email protected]
How to verify it
run 'sudo storyteller --since "2021-2-10" -c lag' on a dut
parser.add_argument('-C', '--context', help='Show N lines before and after match',
94
98
type=int, required=False, default=0)
95
-
parser.add_argument('-S', '--since', help='Filter logs since the given date',
99
+
parser.add_argument('-s', '--since', help='Filter logs since the given date',
96
100
type=str, required=False, default="@0")
101
+
parser.add_argument('-f', '--sortfield', help='Use Nth field separted by "." in file name to sort. e.g. syslog.1.gz: -f 2, swss.rec.2.gz: -f 3, default 0: sort by timestamp',
0 commit comments