EMS Manual
Configuring EMS
EMS Manual—426909-005
12-28
Switching Log Files
Switching Log Files
All tasks associated with log switches are performed when the collector is idle (that is,
when there are no events to log). When a log file is full, or when you request a log-file
switch by setting the NEXTLOGFILE option, the collector:
Determines the name of the next log file. The name of the next file is derived by
adding one to the integer portion of the file name of the current log file. If the
current log file is ZZEV9999, the name of the next log file is ZZEV0000.
Determines whether the creation of a new log file causes MAXFILE to be
exceeded. Before opening the new log file, the collector checks for a file called
ZZEVmmmm, where mmmm is calculated by subtracting the value of MAXFILE from
the integer portion of the new log-file name. For example, if the new name is
ZZEV0043 and MAXFILE is 5, the collector checks if the file ZZEV0038 is present.
If MAXFILE is exceeded, the action taken depends on the value of ROTATEFILES
and on the type of collector (primary or alternate) controlling the log file. For more
information about how each collector handles the MAXFILE exceeded condition,
see ROTATEFILES on page 12-9.
If the log file to be purged is open, the action depends on the collector type.
The primary collector purges the data in the file, deallocates its extents, and sends
the opener an end-of-file indication on the next or current operation, if any. When
this happens, an empty file is left on disk. Alternate collectors leave open log files
as they are. The data is not purged, and the file’s extents are not deallocated.
If logging stops, the collector continues to check for the presence of the lower-
numbered file (ZZEVmmmm) at five-second intervals. When the file is removed, the
collector continues with the file-switch sequence.
Checks for a preallocated log file. Using the File Utility Program (FUP)—or the
ALLOCATE feature, for alternate collector log files—you can preallocate a
collector’s log files to ensure that the collector does not run out of disk space. If a
file with the new log-file name already exists and has the proper attributes for a log
file, the collector begins logging in this preallocated file.
Creates the new log file. If a file with the new log-file name does not exist, the
collector creates the file, carrying over its current attribute settings, with this
exception: if the file switch was initiated by a CONTROL command message or
EMSCCTRL parameter that set NEXTLOGFILE and some other attributes, the
attributes set with NEXTLOGFILE override the current attribute settings.
Generates a ZEMS-EVT-FILESWITCH event message, logs it, and notifies any
distributors waiting for the next event message.
Updates the ZZEVCONF files on the log subvolume (and on $SYSTEM.SYSTEM,
for the primary collector) to include the new FILESWITCH event message.
Because of the overhead required to switch log files, do not set NEXTLOGFILE
frequently. This attribute is provided to let you move a collector out of a log file when