5. Displaying State Information in the MD-CLI

Operators can access the YANG state models in the MD-CLI by navigating the state tree from operational mode.

[]
A:admin@node-2#
 admin                 + Enter the admin context
 clear                 + Clear statistics or reset operational state
 configure             + Enter the configuration context
 environment           + Enter the environment context
 li                    + Enter the lawful intercept context
 show                  + Show operational information
 state                 + Show state information
 tools                 + Enter the tools context for troubleshooting and
                         debugging

5.1. Navigating the State Tree

Navigation commands used in a configure region are available in the MD-CLI state tree. Online ? help and command completion functionality are also available. The state tree information can be displayed using the info command.

[state]
A:admin@node-2# info ?
 
 info [[from] <keyword>]
 
 [[from] <keyword>]
 <keyword>  - (candidate|running|baseline)
 
    Source datastore
 converted             - Include converted configuration values from third party
 detail                - Include default and unconfigured values in the output
 inheritance           - Include configuration inherited from configuration
                         groups
 units                 - Include unit types for applicable fields
 
 Choice: format-choice
 flat                 :- Show the hierarchy on each line
 full-context         :- Show full hierarchy on each line
 json                 :- Show the output in indented JSON format
Note:

The from, converted, and inheritance options are not supported for state elements.

The following output displays information from the state tree using the info command, with the time format defined in RFC 1123:

[environment]
A:admin@node-2# time-format rfc-1123
 
[environment]
A:admin@node-2# exit
 
[]
A:admin@node-2# state system
 
[state system]
A:admin@node-2# info
    oper-name "node-2"
    base-mac-address aa:bb:cc:00:00:00
    platform "7750 SR-12"
    chassis-topology standalone
    crypto-module-version "SRCM 3.0"
    temperature-status ok
    fp-generation-fp2 false
    fp-generation-fp3 true
    fp-generation-fp4 false
    system-profile none
    active-cpm-slot "A"
    up-time 10351550
    current-time "WED 15 APR 2020 17:40:49 UTC"
    boot-good-exec-status not-run
    boot-bad-exec-status not-run
    alarms {
    }
    grpc {
        oper-state down
        supported-services {
            gnmi-version "0.7.0"
            gnoi-cert-mgmt-version "0.1.0"
            gnoi-system-version "0.1.0"
 
   < snip >

The units option of the info command displays the output with unit types for applicable elements:

[state system]
A:admin@node-2# info units
    oper-name "node-2"
    base-mac-address aa:bb:cc:00:00:00
    platform "7750 SR-12"
    chassis-topology standalone
    crypto-module-version "SRCM 3.0"
    temperature-status ok
    fp-generation-fp2 false
    fp-generation-fp3 true
    fp-generation-fp4 false
    system-profile none
    active-cpm-slot "A"
    up-time 10358090 milliseconds
    current-time "WED 15 APR 2020 17:40:56 UTC"
    boot-good-exec-status not-run
    boot-bad-exec-status not-run
    alarms {
    }
    grpc {
        oper-state down
        supported-services {
            gnmi-version "0.7.0"
            gnoi-cert-mgmt-version "0.1.0"
            gnoi-system-version "0.1.0"
 
   < snip >

The json option of the info command displays the output in indented JSON format:

[state system]
A:admin@node-2# info json
{
    "oper-name": "node-2",
    "base-mac-address": "aa:bb:cc:00:00:00",
    "platform": "7750 SR-12",
    "chassis-topology": "standalone",
    "crypto-module-version": "SRCM 3.0",
    "temperature-status": "ok",
    "fp-generation-fp2": false,
    "fp-generation-fp3": true,
    "fp-generation-fp4": false,
    "system-profile": "none",
    "active-cpm-slot": "A",
    "up-time": "10361470",
    "current-time": "WED 15 APR 2020 17:40:59 UTC",
    "boot-good-exec-status": "not-run",
    "boot-bad-exec-status": "not-run",
    "nokia-state:alarms": {
    },
    "nokia-state:grpc": {
        "oper-state": "down",
        "supported-services": {
            "gnmi-version": "0.7.0",
            "gnoi-cert-mgmt-version": "0.1.0",
 
   < snip >

The following output uses the time format as defined in RFC 3339.

[]
A:admin@node-2# environment time-format rfc-3339
[]
A:admin@node-2# state system
[state system]
A:admin@node-2# info
    oper-name "node-2"
    base-mac-address aa:bb:cc:00:00:00
    platform "7750 SR-12"
    chassis-topology standalone
    crypto-module-version "SRCM 3.0"
    temperature-status ok
    fp-generation-fp2 false
    fp-generation-fp3 true
    fp-generation-fp4 false
    system-profile none
    active-cpm-slot "A"
    up-time 10383490
    current-time 2020-04-15T17:41:21.7+00:00
    boot-good-exec-status not-run
    boot-bad-exec-status not-run
    alarms {
    }
    grpc {
        oper-state down
        supported-services {
            gnmi-version "0.7.0"
            gnoi-cert-mgmt-version "0.1.0"
            gnoi-system-version "0.1.0"
 
   < snip >

The following output uses the time format as defined in by ISO 8601:

[]
A:admin@node-2# environment time-format iso-8601
[]
A:admin@node-2# state system
[state system]
A:admin@node-2# info
    oper-name "node-2"
    base-mac-address aa:bb:cc:00:00:00
    platform "7750 SR-12"
    chassis-topology standalone
    crypto-module-version "SRCM 3.0"
    temperature-status ok
    fp-generation-fp2 false
    fp-generation-fp3 true
    fp-generation-fp4 false
    system-profile none
    active-cpm-slot "A"
    up-time 88776290
    current-time "2020-04-16 15:27:54 UTC"
    boot-good-exec-status not-run
    boot-bad-exec-status not-run
    alarms {
    }
    grpc {
        oper-state down
        supported-services {
            gnmi-version "0.7.0"
            gnoi-cert-mgmt-version "0.1.0"
            gnoi-system-version "0.1.0"
            md-cli-version "0.1.0"
            rib-api-version "1.1.0"
        }
    }
 
   < snip >