home

Supported platforms

Vyatta documentation

Learn how to install, configure, and operate the Vyatta Network Operating System (Vyatta NOS) and Orchestrator, which help drive our virtual networking and physical platforms portfolio.

show journal

Vyatta provides system logs in a number of different formats. In combination with standard UNIX-like core utilities, the show journal command can help you to quickly find the most relevant log entries for the problem that you wish to troubleshoot.

Example: show journal

$OS_PROMPT$ show journal | wc -l
5580
$OS_PROMPT$ show journal since yesterday | wc -l
5586
$OS_PROMPT$ show journal since "1h ago" | wc -l
5627
$OS_PROMPT$ show journal since "5m ago" | wc -l
516
$OS_PROMPT$ show journal since "5m ago" | head -1
-- Logs begin at Fri 2021-02-26 12:47:45 GMT, end at Fri 2021-02-26 13:13:13 GMT. --
$OS_PROMPT$ show journal since yesterday | grep "Linux version"
Feb 26 12:47:45 localhost.localdomain kernel: Linux version 5.4.0-trunk-vyatta-amd64 (DL-vyatta-help@att.com)
(gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP PREEMPT Debian 5.4.70-0vyatta3 (2020-12-03)

The word count command wc -l provides the count of the number of log entries that exist in the journal.

The journal CLI options since and until allow you to limit the entries that will be displayed to the time frame that you specify. You can use keywords or short-hand expressions such as:

  • yesterday — messages produced in the whole of the previous day
  • 1h ago — messages produced in the last hour
  • 5m ago — messages produced in the last five minutes

The head -1 core utility displays the first line of output. In this example it demonstrates that the first line of the journal always contains the time frame of the captured log entries. This helps you to understand whether or not the log entries for the time frame that you care about are still present in the system logs.

With the grep command you can use regular expression syntax to filter and display entries to match your criteria.