Skip to content

oxlog: want a way to list N most recent log files #6946

Open
@hawkw

Description

@hawkw

When debugging, log rotation may have occurred at some point during the event of interest. In that case, it's often useful to be able to inspect the current log file for a service plus the archived log file immediately prior to the current one. Doing this with oxlog is presently somewhat difficult, because archived log files may exist across multiple datasets, and piping oxlog into sort(1) will not output the log files in chronological order, since they are sorted by the UUID of the dataset before sorting chronologically. This is unfortunate.

It would be nice if oxlog logs --archived had a way to select the N most recent archived logs. That way, a user who wishes to use grep or looker to search for an event in the current and most-recent-archived log files could run something like:

$ oxlog logs <SVC> --current --last 1 | xargs -L 1 cat | looker

or whatever.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DebuggingFor when you want better data in debugging an issue (log messages, post mortem debugging, and more)developmentBugs, paper cuts, feature requests, or other thoughts on making omicron development better

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions