> Source: [sk40053](https://support.checkpoint.com/results/sk/sk40053)

# sk40053 - $FWDIR/log/ldap_pid_XXX.stats files are created repeatedly on Security Gateway

| Property | Value |
|----------|-------|
| Solution ID | sk40053 |
| Date Created | 2009-04-14 |
| Last Modified | 2017-03-23 |
| Technical Level | General |

## Symptoms

- `$FWDIR/log/ldap_pid_`*XXX*`.stats` files are created repeatedly on Security Gateway

## Cause

LDAP Statistics collection is enabled on Security Gateway.

## Solution

The **`$FWDIR/log/ldap_pid_`*PID*`.stats`** files on Security Gateway contain:

* LDAP lookup statistics (such as all user search, pending lookups, total lookup time)
* LDAP cache operations (such as emptying the cache, as well as providing debug information)
* LDAP cache statistics (such as hits and misses)

<br />

This statistics is collected for each process, for which LDAP statistics was turned on.  
The *PID* in the name of the file is the PID of such process.

This logging feature can be disabled or enabled using the '`ldapcmd`' command on the Security Gateway:   

Note: refer to Command Line Interface Reference Guide - chapter 'Security Management Server and Firewall Commands' ([R60](http://supportcontent.checkpoint.com/documentation_download?id=5518), [R61](http://supportcontent.checkpoint.com/documentation_download?id=6354), [R65](http://supportcontent.checkpoint.com/documentation_download?id=7239), [R70](http://supportcontent.checkpoint.com/documentation_download?id=8713), [R71](http://supportcontent.checkpoint.com/documentation_download?id=10324), [R75](http://supportcontent.checkpoint.com/documentation_download?id=11657), [R75.20](http://supportcontent.checkpoint.com/documentation_download?id=12264), [R75.40](http://supportcontent.checkpoint.com/documentation_download?id=13944), [R75.40VS](http://supportcontent.checkpoint.com/documentation_download?id=16262))   

* To enable LDAP Statistics collection, run these commands:   

  **`[Expert@HostName]# ldapcmd -p `*specific_process_name* `|all stat `*print_interval_in_sec*` [-d debug_level]`**   
  **`[Expert@HostName]# ldapcmd -p `*specific_process_name*`|all log on [-d debug_level]`**   

* To disable LDAP Statistics collection, run these commands:   

  **`[Expert@HostName]# ldapcmd -p `*specific_process_name*`|all stat 0 [-d debug_level]`**   
  **`[Expert@HostName]# ldapcmd -p `*specific_process_name*`|all log off [-d debug_level]`**

where '`debug_level`' is and integer between 0 (lowest) and 4 (highest):

* 0 - to see fatal conditions
* 1 - to see error conditions, that can be handled
* 2 - to see warning messages
* 3 - to see general important information
* 4 - to see all other cases

If this statistics collection should be permanently disabled, and if `$FWDIR/log/ldap_pid_`*PID*`.stats` files have to be deleted on Security Gateway, then follow these steps:   

**Note:** the procedure below disables this feature on all Security Gateways managed by the given Security Management Server.   

1. Close all SmartConsole windows.   

2. Connect to Security Management Server with [GuiDBedit Tool](http://supportcontent.checkpoint.com/solutions?id=sk13009).   

3. Left upper pane:  
   `Table` ? `Global Properties` ? `global_properties`   

4. Right upper pane:  
   click on '`firewall_properties`' ? press CTRL+F (or go to '`Search`' menu ? `Find`) ? type/paste **`fwldap_StatisticsInterval`** ? click on 'Find Next'   

5. Lower pane:  
   double-click on '`fwldap_StatisticsInterval`' field ? set the value to '**`0`** ' (zero) ? click '`OK`'   

6. Go to '`File`' menu ? `Save All`   

7. Connect to Security Management Server with SmartDashboard.   

8. Install Policy onto the Gateway/Cluster object.   

9. On Security Gateway / each cluster member, check if `$FWDIR/log/ldap_pid_`*PID*`.stats` files were created:   

   **`[Expert@HostName]# ls -l $FWDIR/log/ldap_pid_*.stats*`**   

   * If these files do not exist, then there is nothing left to do.   

   * If these files were created, then on Security Gateway / each cluster member:   

     1. Stop all Check Point services:   

        **`[Expert@HostName]# cpstop`**   

     2. Delete these files:   

        **`[Expert@HostName]# rm $FWDIR/log/ldap_pid_*.stats*`**   

     3. Start all Check Point services:   

        **`[Expert@HostName]# cpstart`**

---

# Agent Instructions

This content is from the Check Point Support Center (https://support.checkpoint.com), the official knowledge base for Check Point cybersecurity products.

## Navigating This Knowledge Base

- **Complete index**: [llms.txt](https://support.checkpoint.com/llms.txt)
- **All SK articles**: [SecureKnowledge Sitemap](https://support.checkpoint.com/sitemaps/secureknowledge-sitemap-index.xml)
- **SK article URL pattern**: `https://support.checkpoint.com/results/sk/{skId}`
- **Markdown responses**: AI bot User-Agents automatically receive `text/markdown` content
