ConfD User Community

How to debug confd process?


I want to debug confd process via “/home/admin# gdb_wdd confd”, but it starts infinite loop or smth and my terminal doesn’t response anymore. However, if I want to debug another process, e.g. “/home/admin# gdb_wdd im”, it works fine.

The reason I need to debug confd - is to find out how confd counts and prints instances when I use on “show interface x-eth 0/0/instance”. If you know how to debug confd or which callback/callpoint counts instances, pls help.

P.S. The main reason for all of this that I want to implement checking range in YANG model for x-eth instances.


First, the executable confd that you use to start the ConfD daemon is not a binary, it is a shell script, you probably don’t want to “gdb” that (I’m assuming gdb_wdd is just a variant of gdb). And the binary that the script starts is still just a launcher; so in order to “debug” confd, you better attach the debugger to a running instance.

Even then, there are only few scenarios where debugging confd may be of any use for you, it doesn’t look like this is one of them. All callbacks that you implement (in C, presumably) are invoked in the context of your application process - this what you should debug, start it with gdb or attach to it, set a breakpoint and run the action that would trigger it (and watch for timeouts, you may want to increase them).

But if your main point is to understand how ConfD gets list instances, maybe you should start with the chapter “Operational data” in the ConfD User Guide, plus “man confd_lib_dp” and the 5-c_stats example distributed with ConfD.