.. _pcep-user-guide-session-statistics:
Session statistics
==================
The PCEP statistics provides information about PCE <-> PCC session and its stateful listener (topology-provider).
Usage
'''''
**URL:** ``/restconf/operational/network-topology:network-topology/topology/pcep-topology/node/pcc:%2F%2F43.43.43.43/pcep-session-state``
**Method:** ``GET``
**Response Body:**
.. code-block:: xml
:linenos:
:emphasize-lines: 3,4,5,6,7,8,9,10,13,14,15,16,19,20,21,22,25,26,27,28,31,32,33,35,36,37
151264059202000020000030120127.0.0.1030120127.0.0.10truetruetrue0:00:00:181true
@line 3: **last-received-rpt-msg-timestamp** - The timestamp of last received PCRpt message.
@line 4: **sent-upd-msg-count** - The number of sent PCUpd messages.
@line 5: **received-rpt-msg-count** - The number of received PcRpt messages.
@line 6: **sent-init-msg-count** - The number of sent PCInitiate messages.
@line 7: **sent-msg-count** - Total number of sent PCEP messages.
@line 8: **last-sent-msg-timestamp** - The timestamp of last sent message.
@line 9: **unknown-msg-received** - The number of received unknown messages.
@line 10: **received-msg-count** - Total number of received PCEP messages.
@line 13: **last-sent-error** - Type/value tuple of last sent error.
@line 14: **received-error-msg-count** - Total number of received PCErr messages.
@line 15: **sent-error-msg-count** - Total number of sent PCErr messages.
@line 16: **last-received-error** - Type/value tuple of last sent error.
@line 19: **keepalive** - Advertised keep-alive value.
@line 20: **deadtimer** - Advertised deadtimer value.
@line 21: **ip-address** - Peer's IP address.
@line 22: **session-id** - Peer's session identifier.
@line 25: **keepalive** - Advertised keep-alive value.
@line 26: **deadtimer** - Advertised deadtimer value.
@line 27: **ip-address** - Peer's IP address.
@line 28: **session-id** - Peer's session identifier.
@line 31: **stateful** - Represents peer's stateful/stateless capability.
@line 32: **instantiation** - Represents peer's instantiation capability.
@line 33: **active** - Represents peer's LSP update capability.
@line 35: **session-duration** - Elapsed time (in d:H:m:s) from session-up until last statistic update.
@line 36: **delegated-lsps-count** - The number of delegated LSPs (tunnels) from PCC.
@line 37: **synchronized** - Represents synchronization status.
Following RPC can be used to fetch PCEP session statistics. If PCEP topology and/or PCC node is not specified in input,
statistics for all PCEP sessions under the context are returned.
Usage
'''''
**URL:** ``/restconf/operations/pcep-topology-stats-rpc:get-stats``
**Method:** ``POST``
**Content-Type:** ``application/xml``
**Request Body:**
.. code-block:: xml
pcep-topologypcc://43.43.43.43
**Response Body:**
.. code-block:: xml