Most times a ns-slapd process is not actually hung but seems like it is. A perceived hung process could just be an ultra busy process, caused by a series of massive db searches, all worker threads taken and waiting on one to free a lock or many other related issues.

Setting the Number of Checks and Interval correctly here can be critical. Set them incorrectly and you may miss a data gathering opportunity.

Set Number of Checks to 5 and Interval to 5. Total Runtime 25 Seconds.

This will gather 5 Pstacks/Prstats at 5 Second Intervals and can show if the process is changing over time, but does not have the granularity to show each threads progression through the stack.

Example 2 - High CPU or Performance Problems:

Like Example 1 we want to see the process stack and threads change over time. But for a High CPU or Performance Problem we want to see things change second by second. A better option for this problem type would be to set the Number of Checks to 25 and Interval to 1.

Set Number of Checks to 25 and Interval to 1. Total Runtime 25 Seconds.

This will gather 25 Pstacks/Prstats at 1 Second Intervals. This way we can see the process stack change with no gaps in the captures. In Example 1 there were 5 Second gaps between pstacks and the threads will change a huge amount on a very busy server in that timeframe.

Because I have increased the Number of Checks and decreased the Interval the granularity is higher and I get 25 data points as opposed to 5 over the same time period.

Example 3 - Replication Problems:

The key to debugging a Replication Problem is Debug Logging over a period of time. Setting the special PTS_CONFIG_LOGGING parameter to 8192 will allow Dirtracer to change the nsslapd-infolog-area logging value in the dse to 8192 (Replication Debug Logging).

PTS_CONFIG_LOGGING="8192"

Setting the Number of Checks or Interval for Granularity is not as important with Replication Problems as it is with Hangs or High CPU Problems. The settings can vary and still achieve the same results.

Set Number of Checks to 40 and Interval to 30. Total Runtime 20 Minutes.Set Number of Checks to 10 and Interval to 120. Total Runtime 20 Minutes.Set Number of Checks to 5 and Interval to 240. Total Runtime 20 Minutes.Set Number of Checks to 1 and Interval to 1200. Total Runtime 20 Minutes.