Description

On all Junos OS and Junos OS Evolved platforms, using the | match <pattern> and | last <N> CLI filters together on large log files returns fewer matching entries than requested.


Solution

This is Day-1 issue applicable for both EVO and classic Junos. 

 

On all Junos OS and Junos OS Evolved platforms, when the CLI filters "match" <pattern> and "last" <N> are used together while viewing large log files, the command returns fewer matching log entries than requested.For example, the command:show log <file> | match <pattern> | last 30 , displays fewer than 30 matching entries, although the log file contains enough matches. The issue is observed on large log files. The number of entries returned by the last filter vary depending on the characteristics of the log content, such as line length and display formatting. As a result, users will receive an incomplete view of the most recent matching log entries and could incorrectly assume that fewer matching events exist in the log than are actually present. As a workaround customers can use 'grep' , 'tail' filters in shell mode. Issue is addressed in PR1973132.

Modification History

2026-09-14 : Article Created