Basic Config Commands

hostname HOSTNAME

The hostname command is used to assign a name to the router.

** HOSTNAME: the name to be assigned to the device.

The hostname can be any alphanumeric string of up to 64 characters, but it cannot contain spaces or special characters. The hostname is used in the system prompt, which appears on the command-line interface (CLI) of the device.

For example, the following command sets the hostname of a device to “RouterA”:

soodar(config)# hostname RouterA

After running this command, the system prompt of the device will change to:

RouterA(config)#

Note that the hostname command only sets the name of the device in the configuration, it does not change the device’s IP address or DNS name.

ip host NAME A.B.C.D

The ip host command is used to create an alias for a specific IP address. It allows you to assign a name to an IP address for easier configuration and management.

  • NAME: The alias or name you want to assign to the IP address.

  • A.B.C.D: The IP address you want to assign the name to.

For example, if you want to create an alias for the IP address 192.168.1.10 and name it “router1”, you would enter the following command:

soodar(config)# ip host router1 192.168.1.10

Once you have created the alias, you can use it instead of the IP address in other commands, making it easier to manage and configure your network devices.

ip name-server A.B.C.D

The command is used to configure the IP address of a DNS (Domain Name System) server on a Cisco device. The DNS server is used to resolve domain names to their corresponding IP addresses.

  • A.B.C.D: is the IP address of the DNS server.

Multiple DNS servers can be specified using multiple instances of the ip name-server command.

show clock [json]

The command displays the current date and time on the device. This command is used to verify the time settings on a device.

  • json: specifies to display the output of the command in JSON format, which can be useful for programmatic access to the output of the command.

Example:

soodar# show clock
               Local time: Thu 2020-09-24 10:15:37 +0330
           Universal time: Thu 2020-09-24 06:45:37 UTC
                 RTC time: Thu 2020-09-24 06:45:37
                Time zone: Asia/Tehran (+0330, +0330)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
soodar(config)# do show clock json
{
  "timezone":"Asia/Tehran",
  "local_rtc":"no",
  "can_ntp":"yes",
  "ntp":"yes",
  "ntp_synchronized":"yes",
  "time_usec":"Thu 2020-09-24 10:15:37 +0330",
  "rtc_time_usec":"Thu 2020-09-24 06:45:37"
}
clock timezone TIMEZONE

Set system timezone.

  • TIMEZONE: Specifies timezone’s long name based on IANA TZDatabase.

For example, to set the time zone to Paris time, the command would be:

soodar(config)# clock timezone Europe/Paris

This command affects how the device interprets and displays the time. The device’s clock uses Coordinated Universal Time (UTC) as its reference point, but the timezone setting is used to determine the time offset for the local time zone.

show daemons status

Show all daemons status on startup. Indicate whether they are enabled or disabled.

service cputime-stats

Collect CPU usage statistics for individual FRR event handlers and CLI commands. This is enabled by default and can be disabled if the extra overhead causes a noticeable slowdown on your system.

Disabling these statistics will also make the service cputime-warning (1-4294967295) limit non-functional.

service cputime-warning (1-4294967295)

Warn if the CPU usage of an event handler or CLI command exceeds the specified limit (in milliseconds.) Such warnings are generally indicative of some routine in FRR mistakenly blocking/hogging the processing loop and should be reported as a FRR bug.

Note

The default limit is 5 seconds (i.e. 5000).

This command has no effect if service cputime-stats is disabled.

service walltime-warning (1-4294967295)

Warn if the total wallclock time spent handling an event or executing a CLI command exceeds the specified limit (in milliseconds.) This includes time spent waiting for I/O or other tasks executing and may produce excessive warnings if the system is overloaded. (This may still be useful to provide an immediate sign that FRR is not operating correctly due to externally caused starvation.)

Note

The default limit is 5 seconds as above.

debug routemap [detail]

This command turns on debugging of routemaps. When detail is specified more data is provided to the operator about the reasoning about what is going on in the routemap code.

service password-encryption

Encrypt password.

Note

Enabled by default.

line vty

Enter vty configuration mode.

exec-timeout MINUTE [SECOND]

The command is used to configure the maximum amount of time a user session can be inactive before being disconnected from the device.

  • MINUTE: Specifies the number of minutes of inactivity before the session is terminated. The value can be from 0 to 35791.

  • SECOND (optional): Specifies the number of seconds of inactivity before the session is terminated. The value can be from 0 to 2147483647.

For example, to set the maximum timeout for a user session to 30 minutes, you would use the following command:

soodar(config)# exec-timeout 30

If you wanted to set a timeout of 10 minutes and 30 seconds, you would use the following command:

soodar(config)# exec-timeout 10 30

Note that if you omit the SECOND argument, it defaults to 0. Also, if you set the timeout to 0 minutes and 0 seconds, the session will never time out due to inactivity.

Note

Default timeout vaue is 0( timeout is disabled).

no exec-timeout

Do not perform timeout at all. This command is as same as exec-timeout 0 0.

allow-reserved-ranges

Allow using IPv4 reserved (Class E) IP ranges for daemons. E.g.: setting IPv4 addresses for interfaces or allowing reserved ranges in BGP next-hops.

If you need multiple FRR instances (or FRR + any other daemon) running in a single router and peering via 127.0.0.0/8, it’s also possible to use this knob if turned on.

Default: off.

show diagnostic

The command is used to show a brief overview of the system status. This overview consists of:

  • Interfaces states as seen by control-plane and data-plane.

  • System services status

  • Data-plane errors and stats

  • Subsystem crashes

Sample Configuration

Below is a sample configuration file .

n1(config)# hostname soodar
soodar(config)# enable password admin
soodar(config)# enable config password configadmin

Note

! and # are comment characters. If the first character of the word is one of the comment characters then from the rest of the line forward will be ignored as a comment.

soodar(config)# enable password admin!password

If a comment character is not the first character of the word, it’s a normal character. So in the above example ! will not be regarded as a comment and the password is set to admin!password.

Terminal Mode Commands

write terminal

The write terminal command is used to display the configuration of a device on the terminal screen. This command is often used to check the current configuration of a device, troubleshoot configuration issues, or to copy the configuration to another device.

This command is equivalent to the show running-config command, which displays the current configuration of the device similarly. The write terminal command can be used interchangeably with the show running-config command in most cases.

write file

Write current configuration to configuration file on storage.

write erase [A.B.C.D/M A.B.C.D]

Erase the startup configurations file and replace the default one or the provided one.

  • A.B.C.D/M: Specifies the IP address to set on ge0 interface.

  • A.B.C.D: Specifies the default gateway address.

Note

The default configuration is setting IP address of 192.168.1.55/24 on interface ge0.

configure [terminal]

Change to configuration mode. This command is the first step to configuration.

terminal colorize

Enable/disable color output for terminal

terminal length (0-4294967295)

Set terminal display length to (0-4294967295). If length is 0, no display control is performed.

list

List all available commands.

show version

Show the current version of SoodarOS and its host information.

soodar# show version
OS information
--------------
  System            : Linux
  Node Name         : soodar
  Kernel Version    : 5.4.209-intel-pk-standard
  Systemd Version   : 244.5-r4
  Processor         : x86_64
  Boot Time         : 2023/3/5 14:47:55
  Uptime            : 0:00:44.244257
  Release           : soo-23.04

Packages information
--------------------
  FRR Version       : 8.1+git0+46428baf74-r4
  VPP Version       : 22.06+git0+803ac2c2b0-r4
  StrongSwan Version: 5.9.8+git0+5b0e9486e9-r4
  Mender Version    : 2.6.1-r4
show command history

Show entered commands. The history is kept between sessions and is not cleared until an explicit demand of removing history

clear command history [(0-200)]

Clear history command and( if provided) keep the last N commands in history. If N is not provided or it is 0, all history is erased.

  • (0-200): Specifies the number of most recent commands to keep in the history buffer. If this parameter is not specified or is 0, all commands in the history buffer will be cleared.

show processes

Show current processes running on the router, their PIDs, statuses, and used memory.

Example:

soodar# show processes
   PID     LWP    PPID Status       Size Name
      1       1       0 S           22655 systemd
      2       2       0 S               0 kthreadd
      3       3       2 I               0 rcu_gp
      4       4       2 I               0 rcu_par_gp
      6       6       2 I               0 kworker/0:0H-kblockd
      8       8       2 I               0 mm_percpu_wq
      9       9       2 S               0 ksoftirqd/0
     10      10       2 I               0 rcu_preempt
     11      11       2 S               0 migration/0
     12      12       2 S               0 cpuhp/0
     13      13       2 S               0 cpuhp/1
     14      14       2 S               0 migration/1
     15      15       2 S               0 ksoftirqd/1
     17      17       2 I               0 kworker/1:0H-kblockd
     18      18       2 S               0 kdevtmpfs
     19      19       2 I               0 netns
     20      20       2 S               0 rcu_tasks_kthre
     21      21       2 S               0 kauditd
     23      23       2 I               0 kworker/0:1-events
     24      24       2 S               0 oom_reaper
     25      25       2 I               0 writeback
     26      26       2 S               0 kcompactd0
     27      27       2 S               0 khugepaged
     40      40       2 I               0 cryptd
     59      59       2 I               0 kblockd
     60      60       2 I               0 blkcg_punt_bio
     61      61       2 I               0 tpm_dev_wq
     62      62       2 I               0 ata_sff
     63      63       2 I               0 md
     64      64       2 S               0 watchdogd
     65      65       2 S               0 kswapd0
     67      67       2 I               0 acpi_thermal_pm
     69      69       2 I               0 tpm-vtpm
     70      70       2 I               0 nvme-wq
     71      71       2 I               0 nvme-reset-wq
     72      72       2 I               0 nvme-delete-wq
     73      73       2 S               0 scsi_eh_0
     74      74       2 I               0 scsi_tmf_0
     75      75       2 S               0 scsi_eh_1
     76      76       2 I               0 scsi_tmf_1
     77      77       2 S               0 scsi_eh_2
     78      78       2 I               0 scsi_tmf_2
     79      79       2 S               0 scsi_eh_3
     80      80       2 I               0 scsi_tmf_3
     81      81       2 S               0 scsi_eh_4
     82      82       2 I               0 scsi_tmf_4
     83      83       2 S               0 scsi_eh_5
     84      84       2 I               0 scsi_tmf_5
     89      89       2 I               0 kworker/u4:6-events_unbound
     91      91       2 I               0 kworker/0:1H-kblockd
     92      92       2 I               0 kworker/1:2-rcu_gp
     93      93       2 I               0 raid5wq
     94      94       2 I               0 dm_bufio_cache
     95      95       2 I               0 ipv6_addrconf
     96      96       2 I               0 kworker/u5:0
     101     101       2 S               0 jbd2/sda2-8
     102     102       2 I               0 ext4-rsv-conver
     103     103       2 I               0 kworker/1:1H-events_highpri
     108     108       2 S               0 jbd2/sda4-8
     109     109       2 I               0 ext4-rsv-conver
     150     150       1 S            3299 systemd-udevd
     179     179       2 S               0 scsi_eh_6
     180     180       2 I               0 scsi_tmf_6
     181     181       2 S               0 scsi_eh_7
     182     182       2 I               0 scsi_tmf_7
     183     183       2 I               0 kworker/1:3-dm_bufio_cache
     199     199       1 S           37847 rngd
     199     212       1 S           37847 rngd
     199     213       1 S           37847 rngd
     307     307       1 S            3163 soosys
     311     311       1 S           12305 systemd-journal
     318     318       1 S             605 atd
     320     320       1 S             730 crond
     321     321       1 S            1082 dbus-daemon
     332     332       1 S            3521 snmpd
     334     334       1 S            2793 snmptrapd
     335     335       1 S            1091 chronyd
     340     340       1 R        21304346 vpp_main
     340     359       1 S        21304346 eal-intr-thread
     348     348       1 S            1520 systemd-logind
     350     350       1 S             592 agetty
     351     351       1 S             914 login
     352     352       1 S          324366 charon-systemd
     352     369       1 S          324366 charon-systemd
     352     370       1 S          324366 charon-systemd
     352     371       1 S          324366 charon-systemd
     352     372       1 S          324366 charon-systemd
     352     373       1 S          324366 charon-systemd
     352     374       1 S          324366 charon-systemd
     352     375       1 S          324366 charon-systemd
     352     376       1 S          324366 charon-systemd
     352     377       1 S          324366 charon-systemd
     352     378       1 S          324366 charon-systemd
     352     379       1 S          324366 charon-systemd
     352     380       1 S          324366 charon-systemd
     352     381       1 S          324366 charon-systemd
     352     382       1 S          324366 charon-systemd
     352     383       1 S          324366 charon-systemd
     352     384       1 S          324366 charon-systemd
     354     354       1 S          110108 f2b/server
     354     361       1 S          110108 f2b/observer
     354     364       1 S          110108 f2b/f.sshd
     354     365       1 S          110108 f2b/a.sshd
     354    6750       1 S          110108 f2b/observer
     418     418       1 S            3963 watchfrr
     433     433       1 S          106344 zebra
     433     434       1 S          106344 RCU sweeper
     433     435       1 S          106344 zebra_dplane
     433     436       1 S          106344 zebra_opaque
     433     440       1 S          106344 zebra_apic
     438     438       1 S            2330 staticd
     458     458       2 I               0 kworker/u4:0-events_unbound
     657     657       1 S            1946 systemd
     658     658     657 S           22868 (sd-pam)
     663     663     351 R           11757 vtysh
    5763    5763       2 I               0 kworker/0:2-mm_percpu_wq
    7634    7634     433 R            1092 ps
show processes detailed process-id (0-1000000)

Show details of a PID.

Example:

soodar# show processes detailed process-id 433
zebra
  Process ID        : 433
  Parent process ID : 1
  Group ID          : 433
  Status            : S
  Session ID        : 433
  User time         : 31
  Kernel time       : 17
  Priority          : 19
  Virtual bytes     : 435585024
  Resident pages    : 4598
  Resident limit    : 18446744073709551615
  Minor page faults : 851
  Major page faults : 2
  Threads           : 5
  Allowed CPUs      : 0-1
  CPU usage         : 0.0%
  Memory usage      : 0.6%
show processes memory

Show data-plane’s main heap usage, data-plane’s stats heap usage, and processes’ memory usage.

Example:

soodar# show processes memory
Dataplane memory heap:
----------------------
Thread 0 vpp_main
  base 0x7fffb692a000, size 1g, locked, unmap-on-destroy, name 'main heap'
    page stats: page-size 4K, total 262144, mapped 24279, not-mapped 237865
      numa 0: 24279 pages, 94.84m bytes
    total: 1023.99M, used: 90.17M, free: 933.83M, trimmable: 933.81M

Dataplane stats heap:
---------------------
Stats segment
base 0x7fffb0371000, size 31.99m, locked, name 'stat segment'
  total: 31.99M, used: 758.05K, free: 31.26M, trimmable: 30.30M
    free chunks 16 free fastbin blks 0
    max total allocated 31.99M

System processes memory status:
-------------------------------
    PID Text       Data        RSS      Total Name
      1    0      90620       7460      22655 systemd
      2    0          0          0          0 kthreadd
      3    0          0          0          0 rcu_gp
      4    0          0          0          0 rcu_par_gp
      6    0          0          0          0 kworker/0:0H-kblockd
      8    0          0          0          0 mm_percpu_wq
      9    0          0          0          0 ksoftirqd/0
     10    0          0          0          0 rcu_preempt
     11    0          0          0          0 migration/0
     12    0          0          0          0 cpuhp/0
     13    0          0          0          0 cpuhp/1
     14    0          0          0          0 migration/1
     15    0          0          0          0 ksoftirqd/1
     17    0          0          0          0 kworker/1:0H-kblockd
     18    0          0          0          0 kdevtmpfs
     19    0          0          0          0 netns
     20    0          0          0          0 rcu_tasks_kthre
     21    0          0          0          0 kauditd
     23    0          0          0          0 kworker/0:1-events
     24    0          0          0          0 oom_reaper
     25    0          0          0          0 writeback
     26    0          0          0          0 kcompactd0
     27    0          0          0          0 khugepaged
     40    0          0          0          0 cryptd
     59    0          0          0          0 kblockd
     60    0          0          0          0 blkcg_punt_bio
     61    0          0          0          0 tpm_dev_wq
     62    0          0          0          0 ata_sff
     63    0          0          0          0 md
     64    0          0          0          0 watchdogd
     65    0          0          0          0 kswapd0
     67    0          0          0          0 acpi_thermal_pm
     69    0          0          0          0 tpm-vtpm
     70    0          0          0          0 nvme-wq
     71    0          0          0          0 nvme-reset-wq
     72    0          0          0          0 nvme-delete-wq
     73    0          0          0          0 scsi_eh_0
     74    0          0          0          0 scsi_tmf_0
     75    0          0          0          0 scsi_eh_1
     76    0          0          0          0 scsi_tmf_1
     77    0          0          0          0 scsi_eh_2
     78    0          0          0          0 scsi_tmf_2
     79    0          0          0          0 scsi_eh_3
     80    0          0          0          0 scsi_tmf_3
     81    0          0          0          0 scsi_eh_4
     82    0          0          0          0 scsi_tmf_4
     83    0          0          0          0 scsi_eh_5
     84    0          0          0          0 scsi_tmf_5
     89    0          0          0          0 kworker/u4:6-events_unbound
     91    0          0          0          0 kworker/0:1H-kblockd
     92    0          0          0          0 kworker/1:2-rcu_gp
     93    0          0          0          0 raid5wq
     94    0          0          0          0 dm_bufio_cache
     95    0          0          0          0 ipv6_addrconf
     96    0          0          0          0 kworker/u5:0
    101    0          0          0          0 jbd2/sda2-8
    102    0          0          0          0 ext4-rsv-conver
    103    0          0          0          0 kworker/1:1H-events_highpri
    108    0          0          0          0 jbd2/sda4-8
    109    0          0          0          0 ext4-rsv-conver
    150    0      13196       3960       3299 systemd-udevd
    179    0          0          0          0 scsi_eh_6
    180    0          0          0          0 scsi_tmf_6
    181    0          0          0          0 scsi_eh_7
    182    0          0          0          0 scsi_tmf_7
    183    0          0          0          0 kworker/1:3-events_power_efficient
    199    0     151388       1028      37847 rngd
    307    0      12652       5172       3163 soosys
    311    0      49220      16556      12305 systemd-journal
    318    0       2420       1628        605 atd
    320    0       2920       1844        730 crond
    321    0       4328       3448       1082 dbus-daemon
    332    0      14084      11056       3521 snmpd
    334    0      11172       6800       2793 snmptrapd
    335    0       4364       2400       1091 chronyd
    340    0   85217384     135968   21304346 vpp_main
    348    0       6080       4348       1520 systemd-logind
    350    0       2368       1812        592 agetty
    351    0       3656       3096        914 login
    352    0    1297464      12912     324366 charon-systemd
    354    0     440432      21636     110108 f2b/server
    418    0      16364      11720       4091 watchfrr
    433    0     425376      18492     106344 zebra
    438    0       9320       4756       2330 staticd
    458    0          0          0          0 kworker/u4:0-events_unbound
    657    0       7784       6296       1946 systemd
    658    0      91472       2068      22868 (sd-pam)
    663    0      48612      43816      12153 vtysh
   5763    0          0          0          0 kworker/0:2-mm_percpu_wq
   8135   84       4283       2472       1092 ps
show hardware {cpu | disk | memory}

Show information about the router’s hardware.

Example:

n1# show hardware cpu disk memory
CPU information
---------------
  Architecture      : X86_64
  Name              : Intel(R) Celeron(R) CPU  J1900  @ 1.99GHz
  Physical cores    : 4
  Total cores       : 4
  Max Frequency     : 2415.70Mhz
  Min Frequency     : 1332.80Mhz
  Current Frequency : 1876.04Mhz
  NUMA Nodes        : 1
  Total CPU Usage   : 51.7%
  Per Core Information:
    Core 0:
      Type         : Physical
      Physical Core: 0
      NUMA Node    : 0
      Usage        : 0.0%
    Core 1:
      Type         : Physical
      Physical Core: 1
      NUMA Node    : 0
      Usage        : 100.0%
    Core 2:
      Type         : Physical
      Physical Core: 2
      NUMA Node    : 0
      Usage        : 68.8%
    Core 3:
      Type         : Physical
      Physical Core: 3
      NUMA Node    : 0
      Usage        : 37.9%

Memory information
------------------
  Total            : 3.74G
  Available        : 1.33G
  Used             : 2.21G
  Percentage       : 64.6%

  NUMA 0 Total     : 3.65G
  NUMA 0 Available : 1.31G
  NUMA 0 Used      : 2.35G
  NUMA 0 Percentage: 64.2%


Partitions and Usage
--------------------
  Device: /dev/root
    Mountpoint      : /
    File system type: ext4
    Total Size      : 3.44G
    Used            : 1.11G
    Free            : 2.13G
    Percentage      : 34.2%
  Device: /dev/sda4
    Mountpoint      : /data
    File system type: ext4
    Total Size      : 21.96G
    Used            : 38.30M
    Free            : 20.79G
    Percentage      : 0.2%
  Device: /dev/sda1
    Mountpoint      : /boot/efi
    File system type: vfat
    Total Size      : 15.95M
    Used            : 856064
    Free            : 15.13M
    Percentage      : 5.1%
show memory control-plane

Show information on how much memory is used by control-plane’s processes:

Example:

soodar# show memory control-plane
top - 11:26:57 up  2:31,  0 users,  load average: 1.64, 0.76, 0.56
Tasks:  13 total,   0 running,  13 sleeping,   0 stopped,   0 zombie
%Cpu(s):  3.7 us,  1.2 sy,  0.1 ni, 91.4 id,  3.1 wa,  0.0 hi,  0.5 si,  0.0 st
KiB Mem : 14322432 total,  5440116 free,  4352300 used,  4530016 buff/cache
KiB Swap:  2097148 total,  2097148 free,        0 used.  9377520 avail Mem

PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
164 frr       20   0  311388   7792   2224 S   0.0  0.1   0:00.00 bgpd
297 frr       20   0   85136   5416   3136 S   0.0  0.0   0:00.00 eigrpd
288 frr       20   0   85556   5960   3436 S   0.0  0.0   0:00.00 isisd
273 frr       20   0   85736   5824   3384 S   0.0  0.0   0:00.00 ldpd
217 frr       20   0   84248   5072   4152 S   0.0  0.0   0:00.00 ldpd
216 frr       20   0   84096   5052   4140 S   0.0  0.0   0:00.00 ldpd
266 frr       20   0   85432   5628   3172 S   0.0  0.0   0:00.00 ospf6d
192 frr       20   0   86036   6456   3740 S   0.0  0.0   0:00.03 ospfd
176 frr       20   0   85124   5684   3416 S   0.0  0.0   0:00.00 ripd
184 frr       20   0   84812   5488   3372 S   0.0  0.0   0:00.00 ripngd
281 frr       20   0   84628   4028   2168 S   0.0  0.0   0:00.00 staticd
100 root      20   0   83924   3676   2432 S   0.0  0.0   0:00.04 watchfrr
154 frr       20   0 2689096  27420   5592 S   0.0  0.2   0:00.02 zebra
show memory control-plane details

Show information on how much memory is used by control-plane’s processes in details

Example:

soodar# show memory control-plane details
System allocator statistics:
  Total heap allocated:  1584 KiB
  Holding block headers: 0 bytes
  Used small blocks:     0 bytes
  Used ordinary blocks:  1484 KiB
  Free small blocks:     2096 bytes
  Free ordinary blocks:  100 KiB
  Ordinary blocks:       2
  Small blocks:          60
  Holding blocks:        0
(see system documentation for 'mallinfo' for meaning)
--- qmem libfrr ---
Buffer                        :          3      24                  72
Buffer data                   :          1    4120                4120
Host config                   :          3  (variably sized)        72
Command Tokens                :       3427      72              247160
Command Token Text            :       2555  (variably sized)     83720
Command Token Help            :       2555  (variably sized)     61720
Command Argument              :          2  (variably sized)        48
Command Argument Name         :        641  (variably sized)     15672
[...]
--- qmem Label Manager ---
--- qmem zebra ---
ZEBRA VRF                     :          1     912                 920
Route Entry                   :         11      80                 968
Static route                  :          1     192                 200
RIB destination               :          8      48                 448
RIB table info                :          4      16                  96
Nexthop tracking object       :          1     200                 200
Zebra Name Space              :          1     312                 312
--- qmem Table Manager ---

Below these statistics, statistics on individual memory allocation types in SoodarOS (so-called MTYPEs) is printed:

  • the first column of numbers is the current count of allocations made for the type (the number decreases when items are freed.)

  • the second column is the size of each item. This is only available if allocations on a type are always made with the same size.

  • the third column is the total amount of memory allocated for the particular type, including padding applied by malloc. This means that the number may be larger than the first column multiplied by the second. Overhead incurred by malloc’s bookkeeping is not included in this, and the column may be missing if system support is not available.

When executing this command from vtysh, each of the daemons’ memory usage is printed sequentially. You can specify the daemon’s name to print only its memory usage.

show history

Dump the vtysh cli history.

logmsg LEVEL MESSAGE

Send a message to all logging destinations that are enabled for messages of the given severity.

find REGEX...

This command performs a regex search across all defined commands in all modes. As an example, suppose you’re in enable mode and can’t remember where the command to turn OSPF segment routing on is:

frr# find router-id
  (config)  router-id A.B.C.D [vrf NAME]

The CLI mode is displayed next to each command. In this example, router-id is under the config mode.

Similarly, suppose you want a listing of all commands that contain “l2vpn” and “neighbor”:

frr# find l2vpn.*neighbor
  (view)  show [ip] bgp l2vpn evpn neighbors <A.B.C.D|X:X::X:X|WORD> advertised-routes [json]
  (view)  show [ip] bgp l2vpn evpn neighbors <A.B.C.D|X:X::X:X|WORD> routes [json]
  (view)  show [ip] bgp l2vpn evpn rd ASN:NN_OR_IP-ADDRESS:NN neighbors <A.B.C.D|X:X::X:X|WORD> advertised-routes [json]
  (view)  show [ip] bgp l2vpn evpn rd ASN:NN_OR_IP-ADDRESS:NN neighbors <A.B.C.D|X:X::X:X|WORD> routes [json]
  ...

Note that when entering spaces as part of a regex specification, repeated spaces will be compressed into a single space for matching purposes. This is a consequence of spaces being used to delimit CLI tokens. If you need to match more than one space, use the \s escape.

POSIX Extended Regular Expressions are supported.

show thread cpu control-plane [details [r|w|t|e|x]]

This command displays control-plane run statistics for all the different event types. If no options is specified all different run types are displayed together. Additionally you can ask to look at (r)ead, (w)rite, (t)imer, (e)vent and e(x)ecute thread event types.

Pipe Actions

CLI supports optional modifiers at the end of commands that perform postprocessing on command output or modify the action of commands. These do not show up in the ? or TAB suggestion lists.

... | include REGEX

Filters the output of the preceding command, including only lines which match the POSIX Extended Regular Expression REGEX. Do not put the regex in quotes.

Examples:

Soodar# show ip bgp sum json | include remoteAs
      "remoteAs":0,
      "remoteAs":455,
      "remoteAs":99,
Soodar# show run | include neigh.*[0-9]{2}\.0\.[2-4]\.[0-9]*
 neighbor 10.0.2.106 remote-as 99
 neighbor 10.0.2.107 remote-as 99
 neighbor 10.0.2.108 remote-as 99
 neighbor 10.0.2.109 remote-as 99
 neighbor 10.0.2.110 remote-as 99
 neighbor 10.0.3.111 remote-as 111
... | exclude REGEX

Filters the output of the preceding command, including only lines which don’t match the POSIX Extended Regular Expression REGEX. Do not put the regex in quotes.

... | section REGEX

Filters the output of the preceding command, including only sections which match the POSIX Extended Regular Expression REGEX. Do not put the regex in quotes.

Example:

n2# show running-config | section interface\swireguard[1-3]0
interface wireguard10
 bridge-group 100 split-horizon group 0
 wireguard source 200.2.3.2
 wireguard private-key n2key1
 wireguard port 51820
 wireguard peer n3
  public-key D3309A5B6BF9FEC26710852AB0D6F6E5783F9343478933788D6C0BBB204FED4A
  endpoint 200.2.3.3 port 51820
  allowed-ip 200.4.4.4/32
 no shutdown
 ip address 10.200.200.1/32
interface wireguard20
 wireguard source 222.2.3.2
 wireguard private-key n2key2
 wireguard port 51821
 wireguard peer n3
  public-key 3B73F9AFBBDC9C7C14C4F1108381F704050137990418C500B1F8465A13EDD637
  allowed-ip 10.0.1.2/32
  allowed-ip 10.0.3.2/32
  allowed-ip 222.4.4.4/32
 no shutdown
 ip address 10.200.200.2/32
interface wireguard30
 wireguard source 222.2.3.2
 wireguard private-key n2key3
 wireguard port 51822
 wireguard peer n3
  public-key 2F12ACA8B029112BA405286239D38CD43210AA713C7D7E73362C28A25AA04439
  allowed-ip 203.4.4.4/32
 no shutdown
 ip address 10.200.200.3/32
... | section-exclude REGEX

Filters the output of the preceding command, including only sections which don’t match the POSIX Extended Regular Expression REGEX. Do not put the regex in quotes.

Example:

soodar# show running-config | section-exclude interface
Building configuration...

Current configuration:
!
hostname soodar
no ipv6 forwarding
no zebra nexthop kernel enable
security passwords min-length 8
log syslog errors
log monitor
no banner motd
!
ip name-server 4.2.2.4
ntp server ir.pool.ntp.org iburst burst
!
ip route 0.0.0.0/0 192.168.1.1
line vty
!
end