Lnav Stable Numbers
Lnav Stable Numbers lock row numbers in place, even as your logs update in real time. Without them, a live tail will reorder when older entries arrive late, breaking your mental map. With stable numbers enabled, each log line gets a fixed, consistent position for the session. This makes it possible to track events, compare offsets, and bookmark exact rows without losing context.
In Lnav, stable numbers solve a common pain: real-world logs are messy. Distributed systems generate entries out of order. Clock drift skews timestamps. Network delays shuffle delivery. Normally, this forces you to hunt for the same line again and again. Stable numbers eliminate that search. You can scroll, filter, or jump based on the permanent index. The numbering is tied to the input sequence, not the order of display sorting.
To use Lnav Stable Numbers, launch Lnav with your log source, then enable the feature with the :set-display command set to line-wrap off (for cleaner alignment) and :set-sn on for stable numbering. The # column will show the immutable index assigned to each message. You can then run searches like /error and move between matches knowing their positions won’t shift if new lines arrive. This is critical when analyzing logs during an ongoing incident or when correlating across multiple files.
Stable numbers also improve scripting with Lnav. Since the index does not change, automated queries and batch processes can mark exact rows to extract, archive, or compare later. Engineers debugging high-frequency events or tailing multi-gigabyte logs gain speed and confidence.
If you want to see Lnav Stable Numbers in action without wasting setup time, run it instantly in your browser at hoop.dev and start exploring real logs with stable, trustworthy indexes in minutes.