[Date Prev][Date Next] [Chronological] [Thread] [Top]

Performance counters

I have implemented Windows NT performance counter in my Slapd server. Theses counters can be monitored by selecting the Slapd service in Performance Monitor. I have 6 counters:
- Total connections
- Total search operations
- Total authentication failure
- Total search timeout
- Active connections
- Active search operations
Four of the counters where easy to place. The other two ( Total connections and Active connections ) where a little bit difficult to find where I should put them, but I finally found a place for them. Everything seems to work fine. I just want to make sure that I placed them in the right spot.
I put my counters inside slapd_daemon_task() function after this Debug information:
 Debug( LDAP_DEBUG_CONNS, "daemon: new connection on %ld\n",
    (long) s, 0, 0 );
   // Update the total connections counter
   // Update the current connections counter
When I decrease my current connections counter after a connection is closed, I put my counter in the connection_close() function after this Debug information:
Debug( LDAP_DEBUG_TRACE, "connection_close: conn=%ld sd=%d.\n",
  c->c_connid, ber_pvt_sb_get_desc( c->c_sb ), 0 );
 // Update the current connections counter
Does this seems right?