.. _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`` **RFC8040 URL:** ``/rests/data/network-topology:network-topology/topology=pcep-topology/node=pcc%3A%2F%2F43.43.43.43/pcep-session-state?content=nonconfig`` **Method:** ``GET`` .. tabs:: .. tab:: XML **Response Body:** .. code-block:: xml :linenos: :emphasize-lines: 3,4,5,6,7,8,9,10,12,13,14,15,24,25,26,27,30,31,32,33,36,37,38,40,41,42 1512640592 0 2 0 0 0 0 2 0 0 0 0 0 30 120 127.0.0.1 0 30 120 127.0.0.1 0 true true true 0:00:00:18 1 true @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 12: **last-sent-error** - Type/value tuple of last sent error. @line 13: **received-error-msg-count** - Total number of received PCErr messages. @line 14: **sent-error-msg-count** - Total number of sent PCErr messages. @line 15: **last-received-error** - Type/value tuple of last sent error. @line 24: **keepalive** - Advertised keep-alive value. @line 25: **deadtimer** - Advertised deadtimer value. @line 26: **ip-address** - Peer's IP address. @line 27: **session-id** - Peer's session identifier. @line 30: **keepalive** - Advertised keep-alive value. @line 31: **deadtimer** - Advertised deadtimer value. @line 32: **ip-address** - Peer's IP address. @line 33: **session-id** - Peer's session identifier. @line 35: **stateful** - Represents peer's stateful/stateless capability. @line 36: **instantiation** - Represents peer's instantiation capability. @line 37: **active** - Represents peer's LSP update capability. @line 40: **session-duration** - Elapsed time (in d:H:m:s) from session-up until last statistic update. @line 41: **delegated-lsps-count** - The number of delegated LSPs (tunnels) from PCC. @line 42: **synchronized** - Represents synchronization status. .. tab:: JSON **Response Body:** .. code-block:: json :linenos: :emphasize-lines: 4,5,6,7,8,9,10,11,13,14,15,16,25,26,27,28,31,32,33,34,37,38,39,41,42,43 { "pcep-session-state": { "messages": { "last-received-rpt-msg-timestamp": 1512640592, "sent-upd-msg-count": 0, "received-rpt-msg-count": 2, "sent-init-msg-count": 0, "sent-msg-count": 0, "last-sent-msg-timestamp": 0, "unknown-msg-received": 0, "received-msg-count": 2, "error-messages": { "last-sent-error": null, "received-error-msg-count": 0, "sent-error-msg-count": 0, "last-received-error": null }, "reply-time": { "average-time": 0, "min-time": 0, "max-time": 0 } }, "peer-pref": { "keepalive": 30, "deadtimer": 120, "ip-address": "127.0.0.1", "session-id": 0 }, "local-pref": { "keepalive": 30, "deadtimer": 120, "ip-address": "127.0.0.1", "session-id": 0 }, "peer-capabilities": { "stateful": true, "instantiation": true, "active": true }, "session-duration": "0:00:00:18", "delegated-lsps-count": 1, "synchronized": true } } @line 4: **last-received-rpt-msg-timestamp** - The timestamp of last received PCRpt message. @line 5: **sent-upd-msg-count** - The number of sent PCUpd messages. @line 6: **received-rpt-msg-count** - The number of received PcRpt messages. @line 7: **sent-init-msg-count** - The number of sent PCInitiate messages. @line 8: **sent-msg-count** - Total number of sent PCEP messages. @line 9: **last-sent-msg-timestamp** - The timestamp of last sent message. @line 10: **unknown-msg-received** - The number of received unknown messages. @line 11: **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 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: **keepalive** - Advertised keep-alive value. @line 32: **deadtimer** - Advertised deadtimer value. @line 33: **ip-address** - Peer's IP address. @line 34: **session-id** - Peer's session identifier. @line 37: **stateful** - Represents peer's stateful/stateless capability. @line 38: **instantiation** - Represents peer's instantiation capability. @line 39: **active** - Represents peer's LSP update capability. @line 41: **session-duration** - Elapsed time (in d:H:m:s) from session-up until last statistic update. @line 42: **delegated-lsps-count** - The number of delegated LSPs (tunnels) from PCC. @line 43: **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`` **RFC8040 URL:** ``/rests/operations/pcep-topology-stats-rpc:get-stats`` **Method:** ``POST`` .. tabs:: .. tab:: XML **Content-Type:** ``application/xml`` **Request Body:** .. code-block:: xml pcep-topology pcc://43.43.43.43 **Response Body:** .. code-block:: xml pcep-topology pcc://43.43.43.43 true true true true 30 120 1 127.0.0.1 4:01:59:46 0 11752 0 0 0 0 0 0 11759 1553547804 0 0 0 1 0 1553195032 0 30 120 8 127.0.0.1 0 .. tab:: JSON **Content-Type:** ``application/json`` **Request Body:** .. code-block:: json { "input": { "topology": [ { "topology-id": "pcep-topology", "node": [ { "node-id": "pcc://43.43.43.43" } ] } ] } } **Response Body:** .. code-block:: json { "output": { "topology": { "topology-id": "pcep-topology", "node": { "node-id": "pcc://43.43.43.43", "pcep-session-state": { "synchronized": true, "peer-capabilities": { "stateful": true, "instantiation": true, "active": true }, "local-pref": { "keepalive": 30, "deadtimer": 120, "session-id": 1, "ip-address": "127.0.0.1" }, "session-duration": "4:01:59:46", "messages": { "unknown-msg-received": 0, "received-msg-count": 11752, "error-messages": { "last-sent-error": { "error-type": 0, "error-value": 0 }, "received-error-msg-count": 0, "last-received-error": { "error-type": 0, "error-value": 0 }, "sent-error-msg-count": 0 }, "sent-msg-count": 11759, "last-sent-msg-timestamp": 1553547804, "reply-time": { "average-time": 0, "min-time": 0, "max-time": 0 }, "received-rpt-msg-count": 1, "sent-init-msg-count": 0, "last-received-rpt-msg-timestamp": 1553195032, "sent-upd-msg-count": 0 }, "peer-pref": { "keepalive": 30, "deadtimer": 120, "session-id": 8, "ip-address": "127.0.0.1" }, "delegated-lsps-count": 0 } } } }