FILEROTATECONFIG

Set the maximum size and duration of a log file

Platform:

OEM7600, OEM7700, OEM7720, PwrPak7, CPT7, CPT7700

PwrPak7M variants and Legacy CPT7 receivers (PN 80023560) do not support this command.

Use this command to configure the maximum size and duration for a log file. This command also configures the action taken when the log file media is full.

A file rotation is when a new file is opened, the currently opened file is closed and logging on the FILE port is rerouted to this new file. There is no data loss during this process and individual logs within the file are not spread between log files.

Message ID: 2133

Abbreviated ASCII Syntax:

FILEROTATECONFIG [MaxFileTime] [MaxFileSize] [DiskFullAction]

Factory Default:

FILEROTATECONFIG 0 4096 STOP

Example:

FILEROTATECONFIG 2 4096 STOP

The file is left open for 2 hours or until the file size reaches 4096 MB. When the log file media is full, the file is closed.

FILEROTATECONFIG 4 4096 OVERWRITE

The file is left open for 4 hours or until the file size reaches 4096 MB. When the log media file is full, the oldest file on the log media file will be deleted.

Field

Field Type

ASCII Value

Binary Value

Description

Format

Binary Bytes

Binary Offset

1

Command header

-

-

FILEROTATECONFIG header

This field contains the command name for abbreviated ASCII or the message header for ASCII or Binary.

-

H

0

2

MaxFileTime

0 to 24

Maximum number of hours to leave a file open before triggering a file rotation.

Set to 0 for no maximum time.

Maximum value is 24.

Default is 0.

Ushort

2

H

3

MaxFileSize

1 to 4096

Maximum number of mega bytes (MB) for the file size. A file rotation is triggered when the file is within 1 MB of this size.

Maximum value is 4096 MB

Default is 4096 MB (4 GB).

Ushort

2

H+2

4

DiskFullAction

See Table: Disk Full Action

Action to take when the log file media is full.

Enum

4

H+4

Disk Full Action

Binary

ASCII

Description

0

STOP

Stops logging when the file media has 1 MB of free space or less or the file media has reached 1500 files.

Default is STOP.

1

OVERWRITE

Deletes the oldest log file when the file media has 10 MB of free space or less or the file media has exceeded 1500 files.

To be selected for deletion a file must satisfy these requirements:

  • The file must use the FILECONFIG command file name format.

  • The <PSN> value must match the current receiver.

File age is determined using the FILECONFIG command file name format.

  • Temporary files (i.e. those with an <INDEX> value) are considered oldest. Such files will be sorted by their <INDEX> value with lower values considered older.

  • Non-temporary files will be sorted by the date reported in the file format.