Netconf statistics from client

Hi,

Can you please reply with XML script to view netconf-statistics as mentioned in RFC
https://tools.ietf.org/html/rfc6022#section-2.1.5

i can see these statistics in CLI. I want to see the same in netconf client.

thanks

You can view the netconf-state/statistics data via NETCONF as follows:

$ cat cmd-get-netconf-state-statistics.xml 
<?xml version="1.0" encoding="UTF-8"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <capabilities>
    <capability>urn:ietf:params:netconf:base:1.0</capability>
  </capabilities>
</hello>
]]>]]>
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <get>
    <filter select=" netconf-state/statistics" type="xpath"/>
  </get>
</rpc>
]]>]]>
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
  <close-session/>
</rpc>

$ netconf-console cmd-get-netconf-state-statistics.xml 
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <data>
    <netconf-state xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">
      <statistics>
        <netconf-start-time>2018-01-17T10:51:37-08:00</netconf-start-time>
        <in-bad-hellos>0</in-bad-hellos>
        <in-sessions>4</in-sessions>
        <dropped-sessions>0</dropped-sessions>
        <in-rpcs>7</in-rpcs>
        <in-bad-rpcs>0</in-bad-rpcs>
        <out-rpc-errors>0</out-rpc-errors>
        <out-notifications>0</out-notifications>
      </statistics>
    </netconf-state>
  </data>
</rpc-reply>