Capture Settings, Files |
Top Previous Next |
Capture Settings are set-up separately for each capture channel. Once these settings have been specified, OK or Apply should be clicked. This tab specifies Capture Log file names.
Capture Log Directories Allows Main and Alternate Capture Log Directories to be specified, in which capture log files be created. The Alternate Directory may be left blank if backup logs on a second disk drive or network share are not required. Clicking the icon at the end of directory edit box displays a Browse for Folder dialog allowing a drive and directory to be selected. If a new directory should be created, just enter it and it will be done automatically. It is not possible to save Capture Settings unless a test file can be created and written to the Main Capture Log Directory, and to the Alternate if specified. If network shares are used, a LAN Logon may need to be set-up in Common Settings, LAN/Misc. UNC network paths may be used.
Note that ComCap will exceptionally save Capture Logs and Information Logs in the program directory, if the normal directories are unavailable or are not specified during start-up.
New Log Interval Specifies how often a new Capture Log file should be opened. Note that each separate channel uses separate files (unless Common Logs are specified), and may have different settings.
Note that the Log Interval has an effect on how much old data can be viewed interactively. When changing capture tabs to view data from other channels, only data from the current capture file is restored, if any. To look at older data, the specific capture log must be opened by file name. This also applies to Common Files logging, where data from more than one channel is written to the same common log file, so can not be restored to different tabs.
New Log Open Time For the New Log Interval Daily, specifies at what time of day the new log is created, defaulting to 00:00:00 for midnight. If the time is set to anything other than midnight, the ‘Log Name Format’ must include provision for the time of day in the file name.
New Log Every For New Log Interval: Every x Minutes, specifies how often a new log file should be opened, defaulting to every 60 minutes. Note that new log files are only created when new capture data arrives, so there will not be any empty files during quiet periods. Logs are always opened on the exact minute.
Logs Per Day For New Log Interval Multiple Per Day, specifies how many new log file should be opened each day, starting at the New Log Time. Four logs per day with a new time of 00:00 would create new logs every six hours at 00:00, 06:00, 12:00 and 18:00; three logs starting at 06:00 would create new logs at 06:00, 14:00 and 22:00; seven logs per day from 00:00 would create new logs every 206 minutes, at 03:26, 06:52, 10:18, etc. The minimum Logs Per Day is two, maximum is 12, for lower or higher use the Hourly or Daily settings.
Max File Size (MBytes) This option allows the maximum capture file size to be limited, with a new file being created once a specified size is reached, in megabytes. The default is 2,000 (which is 2 gigabytes). Some care is needed with log name format, specifically if it does not contain sufficient granularity to create a unique file name, so if more than than one file per day is needed, the name mask must include at least hours. If a new file name can not created, a default name with date and time in seconds will be created.
Delete Empty Capture Log on Rotation Ticking this option avoids empty capture logs remaining on disk, after they are closed and a new log opened. Note this only applies to the main capture log, not the alternate.
Archive Capture Log on Rotation Ticking this option causes a log file closed for rotation for a new file name to be moved to an archive directory on the same disk drive. Many ComCap users further process capture logs, sometimes with difficulty due to the files being continually updated, so this options means that scanning the archive directory and will only find completed capture logs, and not those still open in the main capture directory. To FTP an archived capture log, use our DUN Manager application which offers various Scheduled Tasks including FTP Upload which will automatically FTP any files it finds in a specified directory (use the new 'Archive Capture Log on Rotation' feature, see above) and then move them elsewhere so they are not sent again.
Archive Log Directory Specifies the directory to which the capture log should be moved or archived when closed on rotation for a new log file. The archive directory must be on the same disk as the capture directory, since the capture log is renamed to the new directory, rather than being copied which is potentially much slower. If a Custom Log Name Format is used with a customised capture sub-directory using a date mask (see below), this sub-directory is added after the Archive Directory.
Archive/Email Capture Log on Stop Capture Ticking this option causes the log to be archived even if the rotation time has not yet arrived when ComCap is stopped. If ComCap is restarted before the next rotation time, a new log with the previous name will be created, but when it is finally archived it will be renamed by the addition of -1, -2, etc, to the file name to avoid a conflict with previously archived log file names, if any.
Zip Archive Logs and Zip Password Ticking this box (and 'Archive Capture Log on Rotation') causes the archive file to be zipped to save disk space. Optionally, a password may be specified with which to encrypt the zip to prevent unauthorised access. Currently this zipping process temporarily blocks ComCap5 displaying more data, but this should be for less than a second unless the file is very large. If this delay becomes a problem, rotate capture logs more often to make them smaller. If the delay becomes a serious problem, zipping will be done using a background thread so capture continues.
Log Name Format Specifies whether the file name format used for log file is standard or is customised by the user.
Custom Log Name Mask The Custom Name Format allows a Custom Log Name Mask may be created. This is done using mask characters that specify how the log date and optional time are formatted in the file name.
The Custom Log Name Mask may optionally include a sub-directory typically using a partial date, so a new sub-directory is created monthly or daily, to avoid large numbers of files in the same directory, in the format: subdir\filename.txt. Note this sub-directory is also used if archiving log files on rotation, so both capture directory and archive directory may have only a week or month's worth of logs.
Be very careful creating the file mask, it must include sufficient date and time masks to ensure a unique file name is created to match how often new logs are opened, so a daily log must have the day, an hourly log the time, and new record/line a serial number, seconds or milliseconds depending on how often new data will arrive.
Date and time elements are creating using characters strings from the following table:
Any text to appear in the file name should be within single (') or double quotes ("). Note that a directory path may be included within the mask, so new directories are created each day or month. The mask must not include the leading back slash. The following table shows several mask examples.
As the Custom Log Name Mask is typed, the resulting file name appears dynamically. When capturing data from multiple channels, note the file names must be unique if the capture logs are saved in the same directory. It is not possible to add the channel number or name using mask characters so it must be added as text, ie 1 or 2, etc.
|