Viewing Status Information

Status information can be viewed using the show command from either basic or configuration mode.

For a full list of possible show commands, enter show ?:

tnsr# show ?
  acl                    Access Control Lists
  acl-based-forwarding   ACL Based Forwarding (ABF)
  bfd                    Bidirectional Forwarding Detection
  cli                    State of per-session CLI options
  clock                  Show the current system date and time
  configuration          Config DB configuration state
  dataplane              Dataplane
  documentation          Documentation URLs
  gre                    GRE tunnels
  history-config         Show history configuration
  host                   Host information
  interface              Interface details
  ip                     Internet protocol
  ipsec                  IPsec
  kea                    Kea/DHCP
  ldap                   LDAP
  logging                Journal messages
  macip                  MACIP Access Control Lists
  map                    MAP-E/MAP-T
  nacm                   NACM data
  nat                    Network Address Translation
  neighbor               Neighbors (ARP/NDP)
  vpf                    VPF Packet Filter
  ntp                    NTP
  packet-counters        Packet statistic and error counters
  prometheus
  radius                 Radius
  route                  Show routing information
  running-configuration  Running DB CLI configuration state
  span                   SPAN mirrors
  sysctl                 Sysctl parameters
  system                 System information
  trace                  Packet trace
  tunnel                 VPN Tunnel
  unbound                Unbound DNS
  version                Show version of system components
  vxlan                  VXLAN tunnels
  wireguard              Wireguard

Example:

tnsr# show version

Version: tnsr-v21.03-2
Build timestamp: Thu Mar  4 10:24:34 2021 CST

Each show command may also take additional parameters to change the output, filter the output, increase verboseness, etc. Use ? after each keyword in a command to find out what, if any, parameters are available for each command:

tnsr# show version ?
  <cr>
  all                   Show full information of system components
  |

The <cr> line indicates that the command can execute as-is by pressing the Enter key (carriage return). The | line indicates that this command supports output modifiers (See the next section, Output Modifiers). Other keywords or parameters have a description declaring their purpose.

In this example, the only available optional parameter is all, which displays more detail about system components:

tnsr(config)# show version all
                tnsr-release 24.06-4+75+g1094a2d9-b6386
                      cligen 7.1.0-3+tnsr-v24.06-4+jammy+g8a593b8-b6348
                      clixon 7.1.0-12+tnsr-v24.06-4+jammy+geb8e33ab-b6367
                      davici 1.4-36+tnsr-v24.06-4+jammy+g2cc0248-b6304
                  libikemgmt 1.2.1-39+tnsr-v24.06-4+jammy+gc912980-b6304
                   libnfmgmt 1.0.1-60+tnsr-v24.06-4+jammy+geeff99c-b6304
                   libnlmgmt 1.0.1-66+tnsr-v24.06-4+jammy+gd05671f-b6304
                  libntpmgmt 1.0.1-36+tnsr-v24.06-4+jammy+g51a31d8-b6386
                libtnsrinfra 0.0.1-80+tnsr-v24.06-4+jammy+g23e375e-b6304
                  libvppmgmt 1.2.1-727+tnsr-v24.06-4+jammy+ged608d3-b6386
          netgate-dpdk-kmods 21.06-45+tnsr-v24.06-4+jammy+g6dafed1-b6304
                 netgate-frr 9.1-156+tnsr-v24.06-4+jammy+gcf2dcbc87-b6386
    netgate-kea-dhcp4-server 2.4.1-4+tnsr-v24.06-4+jammy+ga0b38ae2f5-b6304
               netgate-snmpd 5.8-26+tnsr-v24.06-4+jammy+gbd64294a6-b6304
          netgate-strongswan 5.9.14-43+tnsr-v24.06-4+jammy+gd2489b56c-b6386
               snmp-subagent 1.0.2-45+tnsr-v24.06-4+jammy+g81fb233-b6386
                        tnsr 24.06-4+75+g1094a2d9-b6386
                 tnsr-config 0.1-210+tnsr-v24.06-4+jammy+g267735f-b6304
                    tnsr-gui 0.0.1-522+tnsr-v24.06-4+jammy+g53bff0c-b6384
                         vpp 24.06-90+tnsr-v24.06-4+jammy+g0eebd6ce8-b6386+D24.03

The behavior of each show command is covered in relevant sections of the documentation.

Output Modifiers

show commands support a limited set of output modifiers which are invoked by adding a pipe character (|) after the command followed by one of the supported modifiers and its arguments. These include:

  • | match <pattern>

  • | exclude <pattern>

  • | tail <num>

  • | count

Warning

When using output modifiers there must be a space before and after the pipe character (|). For example, a | b is valid, but a|b is invalid.

Match

The | match <pattern> modifier filters the output to lines matching the given pattern. The pattern supports some regular expression conventions such as using . to match any single character, .* to match any string, and | between multiple patters to match any of the given patterns.

Tip

Some pattern components may need a leading backslash, such as \. to match a literal period character. The \ must be typed twice as the first press escapes the second.

Example:

tnsr# show route table default | match 10\.30\.
10.30.0.1/24       via                    LAN weight 1 preference 0
10.30.0.1/32       via 10.30.0.1          local LAN weight 1 preference 0
10.30.1.1/24       via                    DMZ weight 1 preference 0
10.30.1.1/32       via 10.30.1.1          local DMZ weight 1 preference 0

Exclude

The | exclude <pattern> modifier filters the output such that it excludes lines matching the given pattern.

Example:

tnsr# show route table default | exclude 10\.30\.

Route Table default  AF: ipv4  ID: 0
-----------------------------------------
0.0.0.0/0          via 203.0.113.1        WAN weight 1 preference 0
10.15.30.2/24      via                    FIBER weight 1 preference 0
10.15.30.2/32      via 10.15.30.2         local FIBER weight 1 preference 0
203.0.113.30/24    via                    WAN weight 1 preference 0
203.0.113.30/32    via 203.0.113.30       local WAN weight 1 preference 0

Tail

The | tail <num> modifier filters the output so only the last <num> lines of the output are returned.

Example:

tnsr# show route table default | tail 2
203.0.113.30/24    via                    WAN weight 1 preference 0
203.0.113.30/32    via 203.0.113.30       local WAN weight 1 preference 0

Count

The | count modifier does not print any of the output, instead it prints a count indicating the number of lines in the output.

Example:

tnsr# show route table default | count
12

Note

The count also includes any leading or trailing blank lines in the output.