BigAdmin System Administration Portal
Sun Docs
Print-friendly VersionPrint-friendly Version

Configuring Sun Java System Messaging Server Log File Rotation

Anthony Waldron, October 2007

Sun Java System Messaging Server provides logging facilities for the Messaging Server MTA, the Message Store, and services. The logging facilities provide you with time-stamped and labeled information about your system's messaging services. Using log files, you can gather message statistics, perform trend determination, troubleshoot problems, and so forth.

While the system performs automatic rollovers to maintain the current log file, you must determine and manage log file rotation aspects such as how large a single log file may be, how large cumulative log files may be, how many log files to retain, and so forth.

This article focuses on configuring log file rotation for the Messaging Server service logs, such as the IMAP service.

For more information on managing Messaging Server log files, see Chapter 25, Managing Logging, in the Sun Java System Messaging Server 6.3 Administration Guide.

Log File Parameters

The following configutil parameters pertain to log file rollover:

logfile.service.maxlogfilesize
logfile.service.maxlogsize
logfile.service.maxlogfiles
logfile.service.rollovertime

where

  • service is admin, pop, imap, imta, or http.
  • maxlogfilesize sets the largest size for a given log file. (The limit is 2 Gbytes, or 2147483648 bytes.)
  • maxlogsize sets the maximum value for the sum of the log file sizes.
  • maxlogfiles sets the number of svc.seqNum.timestamp files to keep.
  • rollovertime sets the interval or age of a file before its get rotated.

You use the configutil command to set these parameters, for example:

configutil -o logfile.imap.maxlogfilesize -v 1073741824

which sets the maximum size of an IMAP service log file to 1 Gbyte.

Log File Examples

If the conditions at your site meet any one of the above controls, then the system rolls over the log file. Therefore, based on your site's traffic usage, you can set three of these configutil parameters to be very large and unreachable while you set the fourth parameter to a value that forces the log to roll over in a manner that you want.

For example, most sites want to retain logs covering specific time periods or time spans, say one week. In order to keep a week's worth of data, set the maxlogfiles parameter equal to N times the frequency with which you are performing the log file rotations.

For instance, with the 1 Gbyte limit, you could rotate the files each hour (the rollover time is in seconds, so this is 3600 seconds) and just keep 168 copies of those individual files. Your configutil parameter settings would then look like the following:

  • logfile.service.maxlogfilesize=1073741824
  • logfile.service.maxlogsize= VERY_BIG_NUMBER
  • logfile.service.rollovertime=3600
  • logfile.service.maxlogfiles=168

Such settings give you 168 hours (7 days) worth of service log files which are at most 1 Gbyte in size. For VERY_BIG_NUMBER, start with 180388626432 (168 x 1073741824).

Use your own custom settings if you prefer smaller log files, quicker log file rollover, and so forth. For example, you will get 336 log files if you set the rollover time to 1800 seconds, or each 30 minutes.

Note: Setting the following configutil parameters to zero (0) (or less than zero) results in the default value being used:

logfile.service.maxlogfiles (default is 10)
logfile.service.maxlogsize (default is 20971520)

For More Information

See the BigAdmin Communications Suite Hub for more information about Sun Java Communications Suite.

Here are additional resources:


Comments (latest comments first)

Discuss and comment on this resource in the BigAdmin Wiki

Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License.


BigAdmin
  
 
BigAdmin Upgrade Hub