Skip to content

Display must-gather collection timestamp on omc use #255

Description

@kanekoh

Show must-gather collection timestamp in omc use output

Is your feature request related to a problem?

When inspecting several must-gathers, it's easy to lose track of when the data I'm currently looking at was actually collected. The omc use summary already shows useful context (ClusterID, ClusterVersion, etc.), but not the collection time of the must-gather itself. Today I confirm it manually with cat <must-gather>/timestamp.

Describe the solution you'd like

Add the must-gather collection date/time as one more line in the existing omc use summary. oc adm must-gather writes a timestamp file at the root of the collection, so the value is already available.

Current output:

Must-Gather    : /Users/.../must-gather.local.6388275003353351846/quay-io-...
Project        : default
ApiServerURL   : https://api.ocp.example.com:6443
Platform       : BareMetal
ClusterID      : d74a3cc8-f3f9-4981-bbd6-xxxxxxxxx
ClusterVersion : 4.18.3
ClientVersion  : 4.18.3
Image          : quay-io-openshift-release-dev-ocp-v4-0-art-dev

Proposed (one added line, e.g. near the top):

Must-Gather    : /Users/.../must-gather.local.6388275003353351846/quay-io-...
Collected      : 2026-02-16 18:02:44
Project        : default
ApiServerURL   : https://api.ocp.example.com:6443
...

Date + time would be ideal (the timestamp file already includes both).

Why this is non-breaking

This only appends one line to the existing aligned key-value summary and changes no command behavior or other output, so it should be fully backward compatible.

If the timestamp file is absent (e.g. namespace-inspect output or a non-standard layout), the Collected line can simply be omitted.

Additional context

Related to #17 (surfacing cluster context after use). Happy to submit a PR if this sounds reasonable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions