Log File Maintenance

Because new records are appended to log files for each event (error or transaction) these files can become rather large quickly. To keep your log files a manageable size, it is recommended that you review them regularly and archive them to maintain a record of your server's performance.

You should read your log files on a regular basis. How frequently you read them depends on the amount of traffic your RealServer handles and if you are encountering any problems.

Archiving Log Files

You can archive a log file by changing the filename in the RealServer configuration file. RealServer writes any new information to the new file, and the old file retains the archival information.

Using the Java Performance Monitor

Windows and UNIX

To use the Java Performance Monitor to change RealServer configuration settings:

  1. Start the Java Performance Monitor and log on to the server.
  2. Click Configuration.
  3. In the Config Variable Groups list, double-click the Logging setting. On the Config Variables list, double-click the setting you want to change. The value appears on the far right.
  4. Type a new name for the log file and click OK.
  5. When you have finished editing Configuration settings, click Monitor to close the Configuration window and return to the Java Performance Monitor.

Restart the RealServer to cause the new configuration settings to take effect.

Using the System Manager

Windows
  1. Connect System Manager to the RealServer whose log file you want to rename.
  2. On the Server menu, click Configuration.
  3. Select the setting that you want to change:
  4. Type a new name for the log file and click OK.
  5. RealServer starts writing to the new file.

Restart the RealServer to cause the new configuration settings to take effect.

UNIX
  1. For UNIX servers, UNIX continues to write to the new, renamed file until you send a SIGHUP signal. Upon receiving the SIGHUP signal, RealServer closes the existing, now renamed log file. When the next event occurs, RealServer opens a new log file using the settings in the configuration file.
  2. For example, to change your Access Log file from pnaccess, rename it access1. RealServer continues to write to access1. Once RealServer receives a SIGHUP signal, it closes access1 and writes the next event to a new, empty file pnaccess.
  3. If you do not want to keep your log files, simply delete the log file and issue a SIGHUP signal. Once RealServer receives this signal, it opens a new empty file with the same name.
  4. To send a SIGHUP signal, use the kill command with the server's process id. If you are in the logs directory, use the following syntax:
    kill -hup 'cat pnserver.pid'

© 1997 RealNetworks, Inc.