Saving Logs to a File
To save log data, log requests are sent to the FILE port (for example, LOG FILE BESTPOS ONTIME 1). Before the logs sent to the FILE port can be saved in a file, the file must be created (opened) on the file system using the FILECONFIG OPEN command. The log file will open when the active file media is ready and has sufficient space.
PwrPak7M variants and Legacy CPT7 receivers (PN 80023560) do not support saving logs to a file.
File Naming
When a file is opened, the file name is generated based on the following format:
<PSN>_<INDEX>.LOG
where:
-
<PSN> is the product serial number of the enclosure
-
<INDEX> is a number from 1 to 511.
The lowest number that produces an unused file name is selected. If there is no such number available, the FILESTATUS log will report an error.
The number is not zero-padded (i.e. the sequence is as follows: 1,2, ... ,9,10,11,12, ... ,99,100, ... , 510,511).
When a file is closed (FILECONFIG CLOSED) and the receiver has a valid time, the file is renamed based on the following format:
<PSN>_<UTC Date>_<UTC Time>.LOG
where:
-
<PSN> is the product serial number of the enclosure
-
<UTC_Date> is the UTC date in the format YYYY-MM-DD
-
<UTC_Time> is the UTC time in the format HH-MM-SS
Example file name: NOV12001200A_2017-01-10_12-14-34.LOG
When a file is closed, but the receiver does not have a valid time, the file is left with its automatically generated name.
|
|
File Rotation
When collecting a large amount of log data over an extended time period, the maximum size and duration for a log file can be configured using the FILEROTATECONFIG command.
If the file duration is set, the log file is closed after the specified duration and a new log file is created. If the file size is set, the log file is closed after the file reaches the specified size and a new log file is created. New log files are created and closed until the file system runs out of free space or logging is stopped. If the OVERWRITE mode has been set, the oldest file will be deleted in order to make room for the new file so data logging can continue.
There is no data loss during the file rotation process and individual logs within the file are not spread between log files.
For more information about configuring file rotation, refer to the FILEROTATECONFIG command.
The maximum size of a log file is 4 GB. Once this size is reached, the log file will close. Another log file will be created to continue logging.