Querying the Processes Log

Getting the Process Log

Getting the Process Log
GET: http://<IP_mgmt>//api/mo/sys/exitproc.json?rsp-subtree=full
{
    "totalCount": "1",
    "imdata": [
        {
            "procExitProcEntity": {
                "attributes": {
                    "dn": "sys/exitproc",
                    "modTs": "2020-06-01T10:49:26.752+00:00",
                    "name": ""
                },
                "children": [
                    {
                        "procExitProcEntry": {
                            "attributes": {
                                "coreExist": "no",
                                "exitReason": "2",
                                "exitTime": "1591040783",
                                "key": "1",
                                "modTs": "2020-06-01T12:46:28.668+00:00",
                                "normalExit": "no",
                                "pid": "30722",
                                "procName": "sysinfo",
                                "rn": "proc-1",
                                "sysmgrSvc": "yes"
                            }
                        }
                    }
                ]
            }
        }
    ]
}
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
  <data>
    <System xmlns="http://cisco.com/ns/yang/cisco-nx-os-device">
      <exitproc-items>
        <proc-items>
          <ExitProcEntry-list>
            <key>1</key>
            <coreExist>false</coreExist>
            <exitReason>2</exitReason>
            <exitTime>1591040783</exitTime>
            <normalExit>false</normalExit>
            <pid>30722</pid>
            <procName>sysinfo</procName>
            <sysmgrSvc>true</sysmgrSvc>
          </ExitProcEntry-list>
        </proc-items>
      </exitproc-items>
    </System>
  </data>
</rpc-reply>

Note: This example was added in Cisco NX-OS Release 9.3(5).

CLI Output
Switch# show processes log 
VDC Process        PID     Normal-exit  Stack  Core   Log-create-time
---     ---------------  ------     -----------       -----    -----     ---------------
  1     sysinfo         30722        N             N        N       Mon Jun  1 12:46:23 2020

exitTime is recorded as Epoch time, after convert it’s matched with column “Log-create-time”

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
procExitProcEntity sys/exitproc
procExitProcEntry sys/exitproc/proc-{key}


procExitProcEntity Properties

The following table contains information about the procExitProcEntity properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
dn
reference:BinRef
A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
modTs
mo:TStamp
scalar:Date
The time when this object was last modified.SELECTION:
  • 0ull - never
  • DEFAULT: never(0ull)
  • name
    naming:Name256
    string:Basic
    The name of the object. RANGE: Min: "0" Max: "256"


    procExitProcEntry Properties

    The following table contains information about the procExitProcEntry properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

    Property NameData TypeDescriptionValues
    coreExist
    scalar:Bool
    process core exist or notSELECTION:
  • false - no
  • true - yes
  • DEFAULT: no(false)
  • exitReason
    scalar:Uint32
    process last exit reason
    exitTime
    scalar:Uint64
    process last exit Time. The process exit time is expressed in unix epoch time.
    key
    scalar:Uint32
    The key or password used to uniquely identify this configuration object.
    modTs
    mo:TStamp
    scalar:Date
    The time when this object was last modified.SELECTION:
  • 0ull - never
  • DEFAULT: never(0ull)
  • normalExit
    scalar:Bool
    Process exit is normal or notSELECTION:
  • false - no
  • true - yes
  • DEFAULT: no(false)
  • pid
    scalar:Uint32
    The last pid of the process.
    procName
    string:Basic
    process Name RANGE: Min: "0" Max: "512"
    rn
    reference:BinRN
    Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
    sysmgrSvc
    scalar:Bool
    process typeSELECTION:
  • false - no
  • true - yes
  • DEFAULT: no(false)

  • Related Documentation

    For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

    http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

    See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

    https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

    For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

    https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

    Getting the Process Log (Multiple Exit Processes)

    Getting the Process Log (Multiple Exit Processes)
    
    GET: http://<IP_mgmt>//api/mo/sys/exitproc.json?rsp-subtree=full
    
    {
      "procExitProcEntity": {
        "attributes": {
          "dn": "sys/exitproc",
          "modTs": "2020-06-01T10:49:26.752+00:00",
          "name": ""
        },
        "children": [
          {
            "procExitProcEntry": {
              "attributes": {
                "coreExist": "no",
                "dn": "sys/exitproc/proc-1",
                "exitReason": "2",
                "exitTime": "1591040783",
                "key": "1",
                "modTs": "2020-06-01T12:46:28.668+00:00",
                "normalExit": "no",
                "pid": "30722",
                "procName": "sysinfo",
                "sysmgrSvc": "yes"
              }
            }
          }
        ]
      }
    }
    
    GET http://<IP Mgmt>/restconf/data/Cisco-NX-OS-device:System/exitproc-items/
    <exitproc-items>
        <proc-items>
            <ExitProcEntry-list>
                <key>3</key>
                <coreExist>false</coreExist>
                <exitReason>9</exitReason>
                <exitTime>1591043360</exitTime>
                <normalExit>false</normalExit>
                <pid>45888</pid>
                <procName>statsclient</procName>
                <sysmgrSvc>true</sysmgrSvc>
            </ExitProcEntry-list>
            <ExitProcEntry-list>
                <key>2</key>
                <coreExist>true</coreExist>
                <exitReason>2</exitReason>
                <exitTime>1591043284</exitTime>
                <normalExit>false</normalExit>
                <pid>30878</pid>
                <procName>statsclient</procName>
                <sysmgrSvc>true</sysmgrSvc>
            </ExitProcEntry-list>
            <ExitProcEntry-list>
                <key>1</key>
                <coreExist>false</coreExist>
                <exitReason>2</exitReason>
                <exitTime>1591040783</exitTime>
                <normalExit>false</normalExit>
                <pid>30722</pid>
                <procName>sysinfo</procName>
                <sysmgrSvc>true</sysmgrSvc>
            </ExitProcEntry-list>
        </proc-items>
    </exitproc-items>
    

    Note: This example was added in Cisco NX-OS Release 9.3(5).

    CLI Output
     
    
    Switch# show processes log 
    VDC Process        PID     Normal-exit  Stack  Core   Log-create-time
    ---     ---------------  ------     -----------       -----    -----     ---------------
      1     sysinfo         30722        N             N        N       Mon Jun  1 12:46:23 2020
      1     statsclient    30878        N             N        Y       Mon Jun  1 13:28:04 2020
      1     statsclient    45888        N             N        N       Mon Jun  1 13:29:20 2020
    
    
    

    Note: The property information for this example was added in Release 9.3(3).


    Verifying a DME Configuration
    The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

    MODN
    procExitProcEntity sys/exitproc
    procExitProcEntry sys/exitproc/proc-{key}


    procExitProcEntity Properties

    The following table contains information about the procExitProcEntity properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

    Property NameData TypeDescriptionValues
    dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
    modTs
    mo:TStamp
    scalar:Date
    The time when this object was last modified.SELECTION:
  • 0ull - never
  • DEFAULT: never(0ull)
  • name
    naming:Name256
    string:Basic
    The name of the object. RANGE: Min: "0" Max: "256"


    procExitProcEntry Properties

    The following table contains information about the procExitProcEntry properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

    Property NameData TypeDescriptionValues
    coreExist
    scalar:Bool
    process core exist or notSELECTION:
  • false - no
  • true - yes
  • DEFAULT: no(false)
  • dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
    exitReason
    scalar:Uint32
    process last exit reason
    exitTime
    scalar:Uint64
    process last exit Time. The process exit time is expressed in unix epoch time.
    key
    scalar:Uint32
    The key or password used to uniquely identify this configuration object.
    modTs
    mo:TStamp
    scalar:Date
    The time when this object was last modified.SELECTION:
  • 0ull - never
  • DEFAULT: never(0ull)
  • normalExit
    scalar:Bool
    Process exit is normal or notSELECTION:
  • false - no
  • true - yes
  • DEFAULT: no(false)
  • pid
    scalar:Uint32
    The last pid of the process.
    procName
    string:Basic
    process Name RANGE: Min: "0" Max: "512"
    sysmgrSvc
    scalar:Bool
    process typeSELECTION:
  • false - no
  • true - yes
  • DEFAULT: no(false)

  • Related Documentation

    For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

    http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

    See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

    https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

    For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

    https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html