Managing Your Directory Server


his chapter describes basic directory server management. Specifically, this chapter describes:

 

Viewing the Error Log

The Server Status | View Error Log form contains the following fields:

 

Viewing the Access Log

The Server Status | View Access Log form contains the following fields:

 

Turning Off the Access Log

You can estimate that every 2,000 accesses to your server will grow your access log by approximately 1 MB. Because the access log can grow very quickly, you might want to turn access logging off if you find that it is not useful to you.

To turn access logging off, leave the Access Log parameter in the server manager blank. You can find the Access Log parameter in the server manager by going to Server Preferences |Network. For more information on this form, see "Managing Network Settings".

Alternatively, you can turn off access logging by editing slapd.conf directly. To do so, set the accesslog parameter as follows:


	accesslog ""

For information on changing server parameters from slapd.conf, see "Changing Parameter Values Using slapd.conf".

 

Log File Rotation

The directory server does not support automatic rotation of log files. You should therefore examine your log files at least once a week to ensure that they are not getting too large. If the files are getting large, you should back up and then delete the current log files, and then clear the contents of the primary files. Do the following:

  1. Shut down the server.

  2. Make a copy of the log file you are rotating.

  3. Empty or truncate the contents of the primary copy of the log file you are rotating.

  4. Restart the server.

  5. Back up the log file copy you made in step 2 for future reference.

The ns-slapd log files can be found at


	<NSHOME>/slapd-<serverID>/logs/errors

and


	<NSHOME>/slapd-<serverID>/logs/access

 

Monitoring Your Server's Activities

You can monitor your directory server's current activities from either the server manager or from the command line. For information on how to monitor your server's activity from the command line, refer to "Monitoring Your Server from the Command Line".

To monitor your directory server's current activities from the server manager, use the Server Status | Monitor Current Activity form. If the server is currently not running, this form reflects that fact and no further information is given.

If the server is currently on, this form provides server monitor information in the following tables:

There is also a small table at the top of the form that includes:

To update the information shown on this form, click the Redisplay button.

 

Server Resource Usage Since Startup

This table provides the following time information:

 

Current Server Resource Usage

This table provides the following time information:

 

Connection Resource Usage

This table provides information on the amount of resources in use by each currently open connection. Values are:

 

Monitoring Your Server from the Command Line

You can monitor your directory server's current activities from any LDAP client by performing a search against


	objectClass=*

and a search base of


	cn=monitor

and a scope of


	base

For example:


	ldapsearch -h directory.airius.com -s base 
-b "cn=monitor" (objectclass=*)
For information on searching the directory server, see "Using ldapsearch".

When you monitor your server's activities in this way, you see the following information:


version:

Identifies the directory server's current version number.


threads:

Current number of active threads. Each thread represents a single operation currently active in the server. Additional threads may also be created by internal server housekeeping tasks, such as replication or writing to logs.


connection: fd: opentime: opsinitiated: opscompleted: binddn: [rw]

Provides the following summary information for each open connection:


currentconnections:

Identifies the number of connections currently in service by the directory server.


totalconnections:

Identifies the number of connections handled by the directory server since it started.


dtablesize:

Shows the number of file descriptors available to the directory server. Note that each connection requires one file descriptor, one descriptor is required for every open index, one descriptor is required for log file management, and one descriptor is required for ns-slapd itself. Essentially, this value lets you know about how many more concurrent connections can be serviced by the directory server.

For more information on file descriptors, refer to your operating system documentation.


writewaiters:

Identifies the number of threads waiting to write data to a client.


readwaiters:

Identifies the number of threads waiting to read data from a client.


opsinitiated:

Identifies the number of operations ns-slapd has initiated since it started.


opscompleted:

Identifies the number of operations ns-slapd has completed since it started.


entriessent:

Identifies the number of entries sent to clients since ns-slapd started.


bytessent:

Identifies the number of bytes sent to clients since ns-slapd started.


currentime:

Identifies the time when this snapshot of ns-slapd was taken. The time is displayed in Greenwich mean time (GMT) in UTC format.


starttime:

Identifies the time when ns-slapd started. The time is displayed in Greenwich mean time (GMT) in UTC format.


nbackends:

Identifies the number of back ends (databases) ns-slapd services. Currently this value is always one.


concurrency:

Solaris 2.x only. Indicates the current level of thread concurrency.

 

Monitoring Database Activity

You can monitor your directory server's current activities from the server manager or from the command line. For information on how to monitor your database's activities from the command line, refer to "Monitoring the Database from the Command Line".

To monitor you server from the server manager, do the following:

  1. Go to Server Status | Monitor DB Activity

  2. Select the database that you want to monitor

  3. Click O.K.

There is a small table at the top of the form that provides:

The remainder of the form consists of the following tables:

 

General Information Table

In the General Information table, you are given the following fields:

 

Database Cache Information Table

In the Database Cache Information table, you are given the following information:

 

Database File-Specific Table

A table is available for each file that makes up your database. Each of the tables provide the following information for that file:

 

Monitoring the Database from the Command Line

You can monitor your directory server's database activities from any LDAP client by performing a search against


	objectClass=*

and a search base of


	cn=monitor-back,<your suffix>

and a scope of


	base

For example:


	ldapsearch -h directory.airius.com -s base 
-b "cn=monitor-back,o=airius.com" (objectclass=*)
For information on searching the directory server, see "Using ldapsearch".

When you monitor your server's activities in this way, you see the following information:


database

Identifies the type of database that you are currently monitoring.


readonly

Indicates whether the database is in read-only mode. 0 indicates that the server is not in read-only mode, 1 indicates that it is in read-only mode.


entrycachehits

Provides the same information as is described in "Entry Cache Hits".


entrycachetries

Provides the same information as is described in "Entry Cache Tries".


entrycachehitratio

Provides the same information as is described in "Entry Cache Hit Ratio".


currententrycachesize

Provides the same information as is described in "Current Number of Entries in Entry Cache".


maxentrycachesize

Provides the same information as is described in "Maximum Number of Entries in Entry Cache".


dbchehits

Provides the same information as is described in "Hits".


dbcachetries

Provides the same information as is described in "Tries".


dbcachehitratio

Provides the same information as is described in "Hit Ratio".


dbcachepagein

Provides the same information as is described in "Pages Read In".


dbcachepageout

Provides the same information as is described in "Pages Written Out".


dbcacheroevict

Provides the same information as is described in "Read-Only Page Evicts".


dbcacherwevict

Provides the same information as is described in "Read-Write Page Evicts".

Next is displayed the following information for each file that makes up your database:


dbfilename-<number>

Indicates the name of the file. <number> provides a sequential integer identifier (starting at 0) for the file. All associated statistics for the file are given this same numerical identifier.


dbfilecachehit-<number>

Provides the same information as is described in "Cache Hits".


dbfilecachemiss-<number>

Provides the same information as is described in "Cache Misses".


dbfilepagein-<number>

Provides the same information as is described in "Pages Read In".


dbfilepageout-<number>

Provides the same information as is described in "Pages Written Out".

 

Managing the Root DN

The Root DN is the privileged database user; that is, access control information does not apply to this user.

The password for this user is defined on the Root Password parameter. You can select one of two different password encryption schemes to store this parameter value, or you can choose to store the value in clear text. If you choose to store the value in clear text, you can use the server manager to manage groups, access control lists, and replication without performing any special authentication. While convenient, this strategy creates some obvious security risks in that anyone gaining access to your server manager can discover your Root DN password and have full access to your directory.

If you choose to use an encrypted password, then you must supply that password whenever you manage groups, access control, or replication from the server manager.

You can set your root DN and password and the encryption scheme used for this password from the Server Preferences| Manager Preferences form. After you make any changes to this form, you must click OK, confirm your changes, and restart the server.

 

Tuning Your Server's Performance

There are several server parameters available to you that allow you to manage server performance. You can view them all together from the server manager by going to Server Preferences |Performance Tuning.

The performance parameters shown on this form are shown in two different groups:

 

Managing Network Settings

The Server Preferences | Network form allows you to view and change the parameters relevant to the server's network settings and log files. After you make any changes to this form, you must click OK, confirm your changes, and restart the server.

You can manage the following parameters from this form:

 

Managing LDAP Settings

Use the Server Preferences | LDAP form to view and change parameters relevant to general LDAP settings. After you make any changes to this form, you must click OK, confirm your changes, and restart the server.

You can manage the following parameters from this form:

 

Managing SSL

To provide secure communications over the network, the Netscape Directory Server provides the LDAPS communications protocol. LDAPS is the standard LDAP protocol, but it runs on top of Secure Sockets Layer (SSL).

To use LDAPS, you have to first setup a certificate database for your directory, and then you have to turn on SSL. You create certificate databases using the Netscape Administration Server.

For a complete description of SSL, internet security, certificates, how to setup certificate databases, and how to obtain certificates, see the Managing Netscape Servers manual. The following sections assume that you understand SSL and that you have already created a certificate database. They describe how to turn SSL on and off in your directory server.

 

Activating SSL

To turn on SSL communications with your directory server, create a certificate database and then go to the Server Preferences | Encryption On/Off form. Indicate that you want encryption enabled, the port number that you want to use for LDAPS communications, and the Encryption Alias that you want to use for this server's certificate. After you make your changes, you must click OK, confirm your changes, and restart the server.

Note that the encrypted port number that you specify must not be the same port number as you are using for normal LDAP communications.

If encryption is enabled for this server, you will see certificate information at the bottom of this form, including the server's certificate subject DN.

Also, you create the encryption alias when you create your server's certificate database. For more information on creating certificate databases, see the "Enabling SSL Encryption" section in Managing Netscape Servers.

 

Setting Security Preferences

You can choose the type of cipher to use for SSL. To do so, choose Server Preferences | Encryption Preferences in the server manager. After you make your changes, you must click OK, confirm your changes, and restart the server.

A cipher is the algorithm used in encryption. Some ciphers are more secure or stronger than others. Generally speaking, the more bits a cipher uses during encryption, the harder it is to decrypt the data. (For a more complete discussion of algorithms and their strength, see the Managing Netscape Servers manual.)

When a client initiates an SSL connection with a server, it lets the server know what ciphers it prefers to use to encrypt information. In any two-way encryption process, both parties must use the same ciphers. Since there are a number of ciphers available, your server needs to be able to use the most popular ones.

To specify which ciphers your server can use, check them in the list. Unless you have a compelling reason to not use a specific cipher, you should check them all.

Another reason you might not want to enable all ciphers is to prevent SSL connections with less than optimal encryption. That is, United States law prohibits the export of products with 128-bit encryption, so overseas clients might only be using 40-bit encryption, which is not as difficult to crack as 128-bit. Unchecking all 40-bit ciphers effectively restricts access to clients available only in the United States.

Domestic versions of the Directory Server provide the following SSL 3.0 ciphers:

Export versions of the Directory Server provide the following SSL 3.0 ciphers:

 

Using Certificate-Based Authentication

Your LDAP clients can bind to the directory server using certificates rather than normal Bind DN/Password authentication. This kind of authentication provides two things for you:

Out of the box, the directory server allows you to use certificate-based authentication using the command line client tools and for replication communications.

To setup certificate-based authentication, you must:

  1. Create a certificate database for both the client and the server. In the case of supplier-server to consumer-server replication, you need a certificate database for both servers.

  2. Obtain a certificate for both client and server.

  3. Map the certificate's distinguished name to a DN known by the directory server. This allows you to set access control for the client when it binds using this certificate. This mapping process is described in the "Mapping Client Certificates to LDAP" section in Managing Netscape Servers.

To find out how to create a certificate database and obtain a certificate for use by your: