ConfD Performance


I would like to know if following stats for possible:

  1. Total Read/Write transactions occured.
  2. Ongoing transaction count.

In top output I saw sometime confd consuming more then 90% memory. I would like to plot its relation with transactions.

To run a test and get the current memory use stats and high watermark you could simply (Linux) do something like:

$ cat 
for ((N=0; N <= 1000; N+=1)); do
    netconf-console --edit-config=my-merge-edit-config.xml &> /dev/null
    netconf-console --get-config -x /myconfig &> /dev/null
    netconf-console --get -x /mydata &> /dev/null
    netconf-console --edit-config=my-delete-edit-config.xml &> /dev/null
echo "---Memory high watermark and current use stats from /proc/<confd-pid>/status"
pid=`pidof confd`
result=$(cat /proc/$pid/status | grep -A 1 VmHWM)
echo $result;

If you would rather collect your own stats by receiving events from ConfD, you can for example listen to NETCONF log messages. See confd_lib_events(3) man page for details and the “notifications” ConfD example:

$ pwd
$ ./confd_notifications -N
TRACE Connected (maapi) to ConfD
TRACE Connected (events) to ConfD
Waiting for event notifications...
syslog: sym=86/NETCONF prio=1 msg=id=69 new ssh session for user "admin" from
syslog: sym=86/NETCONF prio=2 msg=id=69 got rpc: {urn:ietf:params:xml:ns:netconf:base:1.0}get-config attrs: message-id="1"
syslog: sym=86/NETCONF prio=2 msg=id=69 get-config source=running attrs: message-id="1"
syslog: sym=86/NETCONF prio=2 msg=id=69 sending rpc-reply, attrs: message-id="1"
syslog: sym=86/NETCONF prio=1 msg=id=69 close-session attrs: message-id="0"

ok Thanks… Yes this is possible…

I was expecting something like “./confd --transaction_count” kind of command… Please let me know in case such thing is feasible.