Skip Navigation Links | |
Exit Print View | |
Oracle Directory Server Enterprise Edition Administration Guide 11g Release 1 (11.1.1.5.0) |
Part I Directory Server Administration
2. Directory Server Instances and Suffixes
3. Directory Server Configuration
6. Directory Server Access Control
7. Directory Server Password Policy
8. Directory Server Backup and Restore
9. Directory Server Groups, Roles, and CoS
10. Directory Server Replication
13. Directory Server Attribute Value Uniqueness
15. Directory Server Monitoring
Part II Directory Proxy Server Administration
16. Directory Proxy Server Tools
17. Directory Proxy Server Instances
19. Directory Proxy Server Certificates
20. Directory Proxy Server Load Balancing and Client Affinity
21. Directory Proxy Server Distribution
22. Directory Proxy Server Virtualization
23. Virtual Data Transformations
24. Connections Between Directory Proxy Server and Back-End LDAP Servers
25. Connections Between Clients and Directory Proxy Server
26. Directory Proxy Server Client Authentication
27. Directory Proxy Server Logging
Viewing Directory Proxy Server Logs
Configuring Directory Proxy Server Logs
To Configure Directory Proxy Server Logs
To Configure Directory Proxy Server Access Log etimes Units
Configuring Directory Proxy Server Log Rotation
To Configure Periodic Log Rotation
Example Configurations for Log Rotation
Rotating the Log Based on Log Size
Rotating the Log Based on Time
Deleting Directory Proxy Server Logs
To Configure Log Deletion Based on Time
To Configure Log Deletion Based on File Size
To Configure Log Deletion Based on Free Disk Space
Logging Alerts to the syslogd Daemon
To Configure Directory Proxy Server to Log Alerts to the syslogd Daemon
Configuring the Operating System to Accept syslog Alerts
To Configure the Solaris OS to Accept syslog alerts
To Configure Linux to Accept syslog Alerts
To Configure HP-UX to Accept syslog alerts
Tracking Client Requests Through Directory Proxy Server and Directory Server Access Logs
To Track Operations From Directory Server Through Directory Proxy Server to the Client Application
28. Directory Proxy Server Monitoring and Alerts
Part III Directory Service Control Center Administration
By default, log files are rotated when the log file size reaches 100 Mbytes. Ten log files are retained by default, after which the rotation procedure begins to overwrite the oldest log file. This section describes how to configure Directory Proxy Server logs for scheduled rotation, how to rotate logs manually, and how to disable log rotation. For example configurations, see Example Configurations for Log Rotation.
The example in this procedure configures the Directory Proxy Server access log. You can use the same procedure to rotate the Directory Proxy Server bind, connection, or error log. Be sure to replace access with bind, connection, or error depending upon the log you are configuring
You can use DSCC to perform this task. For information, see Directory Service Control Center Interface and the DSCC online help.
$ dpconf get-access-log-prop -h host -p port
$ dpconf help-properties access-log
$ dpconf set-access-log-prop -h host -p port \ log-rotation-policy:size log-rotation-size:maximum file size
Caution - In case of high activity levels, because of the asynchronous nature of Directory Proxy Server, the log file might not be rotated at the exact configured size but at a size close to the configured size. This means that the rotated file might end up being slightly smaller or slightly larger than the configured size. |
If the unit of the maximum file size is not specified, the default unit of bytes is used. When the log file reaches the defined size, the log is rotated. The file size must be at least 1 Mbyte and no more than 2 Gbytes.
For an example of how to rotate logs by size, see Rotating the Log Based on Log Size.
$ dpconf set-access-log-prop -h host -p port \ log-rotation-frequency:interval in months, weeks, hours, or minutes \ log-rotation-policy:periodic \ log-rotation-start-day:day in week (1-7) or day in the month (1-31) \ log-rotation-start-time:time of day (hhmm)
If the log is configured for rotation on the 31st of the month but the month has fewer than 31 days, the log is rotated on the first day of the following month.
By default, the log-rotation-start-day and log-rotation-start-time properties have no default value. If you configure to rotate logs without setting these properties, the log will be rotated as per the specified frequency but the time of the day or day of the week might be changed.
For examples of how to rotate logs periodically, see Rotating the Log Based on Time.
$ dpconf set-access-log-prop -h host -p port \ log-rotation-frequency:interval in months, weeks, hours, or minutes \ log-rotation-policy:periodic log-min-size:minimum file size log-rotation-start-day:day in week (1-7) or day in the month (1-31) \ log-rotation-start-time:time of day (hhmm)
The log-min-size property represents the minimum size of the log. The rotation takes place at the scheduled time only if the log file is bigger than the specified size.
If the log is configured for rotation on the 31st of the month but the month has fewer than 31 days, the log is rotated on the first day of the following month.
By default, the log-rotation-start-day and log-rotation-start-time properties have no default value. If you configure to rotate logs without setting these properties, the log will be rotated as per the specified frequency but the time of the day or day of the week might be changed.
For an example of how to rotate logs periodically if the file size is big enough, see Rotating the Log Based on Time and Log Size.
$ dpconf set-access-log-prop -h host -p port log-file-compression:best-speed
When the log-file-compression option is active, the Directory Proxy Server compresses the log files with every rotation. Compressed files will include the .zip extension. The current file is never compressed.
For best results, set the log-file-compression property to either no-compression or best-speed. Although other values may work, they might take too much time to complete in the current hardware. This could slow down the Directory Proxy Server performance with an insufficient gain in the compression rate. The default value is no-compression, which is compatible with previous versions of the Directory Proxy Server.
Also, note that DSCC will not be able to show compressed log files.
The example in this procedure rotates the Directory Proxy Server access log. You can use the same procedure to rotate the Directory Proxy Server bind, connection, or error log. Be sure to replace access with bind, connection, or error depending upon the log you are configuring.
You can use DSCC to perform this task. For information, see Directory Service Control Center Interface and the DSCC online help.
$ dpconf rotate-log-now -h host -p port access
The example in this procedure disables rotation of the Directory Proxy Server access log.You can use the same procedure to disable rotation of the Directory Proxy Server bind, connection, or error log. Be sure to replace access with bind, connection, or error depending upon the log your are configuring.
$ dpconf set-access-log-prop -h host -p port enable-log-rotation:false
Examples of how to configure log rotation by log size, time, or both follow.
This section example shows how to configure a log rotation according to log size only. This configuration rotates the log when it reaches 10 Mbytes, irrespective of the time since the log was last rotated.
$ dpconf set-access-log-prop -h host1 -p 1389 log-rotation-policy:size \ log-rotation-size:10M
The examples in this section show how to configure log rotation according to the time since the last rotation, irrespective of log size.
This configuration rotates the log after every 10 hours, irrespective of log size.
$ dpconf set-access-log-prop -h host1 -p 1389 log-rotation-frequency:10h \ log-rotation-policy:periodic
For example, if the log is rotated at 3:00 today, the next rotations will take place after every 10 hours such as 13:00, 23:00, and 9:00 next day. Without setting log-rotation-start-day and log-rotation-start-time, the rotation might not take place everyday at the same time.
This configuration rotates the log at 3:00, 13:00, and 23:00 every day, irrespective of the size of the log file. Because the log-rotation-start-time parameter takes precedence over the log-rotation-frequency parameter, the log is rotated 3:00, that is, 4 hours after the last rotation.
$ dpconf set-access-log-prop -h host1 -p 1389 log-rotation-frequency:10h \ log-rotation-policy:periodic log-rotation-start-time:0300
This configuration rotates the log at noon on Monday, and then at the same time every week, irrespective of the size of the log file.
$ dpconf set-access-log-prop -h host1 -p 1389 log-rotation-frequency:1w \ log-rotation-policy:periodic log-rotation-start-day:2 log-rotation-start-time:1200
This configuration rotates the log at noon on Monday, and then every 3 days, irrespective of the size of the log file.
$ dpconf set-access-log-prop -h host1 -p 1389 log-rotation-frequency:3d \ log-rotation-policy:periodic log-rotation-start-day:2 log-rotation-start-time:1200
The log is rotated on the following days: Monday, Thursday, Sunday, Wednesday, and so on. Notice that the log-rotation-start-day parameter applies to the first week only. The log is not rotated on the Monday of the second week.
This configuration rotates the log at noon on the 22nd day of the month, and then at the same time every month, irrespective of log size.
$ dpconf set-access-log-prop -h host1 -p 1389 log-rotation-frequency:1m \ log-rotation-policy:periodic log-rotation-start-day:22 \ log-rotation-start-time:1200
If the log-rotation-start-day is set to 31 and the month has only 30 days, the log is rotated on the first day of the following month. If the log-rotation-start-day is set to 31 and the month has only 28 days (February), the log is rotated on the 3rd.
This example shows how to configure a log rotation for a specified interval if the file size is big enough.
This configuration rotates the log at 3:00, 11:00, and 19:00 every day, if the size of the log file exceeds 1 Mbyte. If the size of the log file does not exceed 1 Mbyte, the log file is not rotated.
$ dpconf set-access-log-prop -h host1 -p 1389 log-rotation-frequency:8h \ log-rotation-policy:periodic log-min-size:1M log-rotation-start-time:0300
Whichever the rotation policy chosen, the log files can be compressed once they are rotated. This example activates this feature.
$ dpconf set-access-log-prop -h host1 -p 1389 log-file-compression:best-speed