Get_next getting called twicw with -1

Hello,

  1. this is regular behavior, for explanation/details, see related topic here.

Not exactly - these are the procedures that are called whenever new “transaction” is processed.
This is not per each show command, but e.g. per user session logging into CLI (init()) and leaving CLI (finish()).

If you want to have separate transaction for each show command, check the option "/confdConfig/cli/reallocateOperTrans" in ConfD user guide - this will enforce init/finish for a separate show command requests of CLI user.