How to Archive HVR Log Output Files from HVR_CONFIG Directory
Question
How can I archive HVR log output files (i.e. hvr.out) from the directory $HVR_CONFIG/log/hubname?
Environment
HVR 5
Answer
Imagine a situation when there are numerous event messages being generated in your channel, automatically hvr.out file is going to grow. We recommend you archive the hvr.out file after certain intervals to avoid overloading the hub machine. Overloading of the hub machine might lead to delays in calculating latencies, errors, etc., the fields which are displayed in the HVR GUI for monitoring purposes.
Overview
This happens because hvrmaint task essentially scans the hvr.out file to calculate the latencies or find out the recent error. In this article, we will find out how to archive these files. We will see how to purge file hvr.out for hub hvrhub4.
Prerequisite
Channels chn1, chn2, and chn4 are already running in hub hvrhub4.
Steps
To archive the log output files from the directory, do the following:
Create a maintenance task archivehvrlogs.
Right-click Scheduler for hub hvrhub4 and select Maintenance Tasks.
Click Add to add a new maintenance task.
Enter a name for the task, for example archivehvrlogs.
Click OK.
You can find the task added in Maintenance Tasks.
Set up the actions that you want task archivehvrlogs to perform.
Check the archive_files box and enter the name of the out file.
Check the archive_keep_days box and specify the number of days after which you want maintenance task to purge the HVR files from the archive directory. Enter 7 days, which means that after 7 days the hvr.out file will be purged from the archive directory.
NOTE: The archive directory logarchive is created under directory $HVR_CONFIG by default. When maintenance task archivehvrlog runs, the hvr.out file is moved to $HVR_CONFIG/logarchive.
A log file for maintenance task is created in $HVR_CONFIG/log/hvrhub4/hvrmaint-archivehvrlogs.out.
Set up the time interval under Time options for when you want the archivehvrlogs task to run.
Click Save.
Click Run to execute the task. The task will then run once immediately and then at the specified intervals.
When this task is run for the first time, the logarchive directory is created in $HVR_CONFIG.
In this directory, HVR creates a hub directory and a sub-directory for each date (yyyymmdd) when the logs are archived. In these subdirectories, you can find the archived hvr.out file.
For more information, see command hvrmaint.
NOTE: HVr deletes those files from the $HVR_CONFIG/log/hubname directory that don't match the pattern in the archive_files. For example, individual out files for the channels are deleted (chn1.out, chn1-cap-source_loc.out. HVR creates new files which are populated with new logs.