Showing the operational state of the deviceΒΆ

The CLI is able to query the state of the device. What is called state is the current operational state of the system, in contrast to config which contains the administrative desired state.

This operation is invoked with the show state CLI command, which is available from the operation mode and from the edition mode.

Show all the state of the device in text format:

vsr> show state
state
    system
        hostname ubuntu1604
        fast-path
            enabled false
            ..
(...)

In edition mode, the displayed state corresponds to the service context being edited.

Show the interfaces of the device in text format:

vsr> edit running
vsr running config# vrf main interface
vsr running interface# show state
interface
   physical ens2
      oper-status DOWN
      ethernet
         mac-address 52:54:00:12:34:56
         ..
(...)

By default, the output is in text format. But it can also be displayed in xml or json.

Show the interfaces of the device in xml format:

vsr> show state
vsr running config# vrf main interface
vsr running interface# show state xml
<interface xmlns="urn:6wind:vrouter/interface">
  <physical>
    <name>ens2</name>
(...)