Subdivide the data in the /data/meters/meterlog.NNN files into separate files based on the year. This only needs to be run once per year. It can be done so manually or can be cron’d.
The resulting files from previous years are stored in the /data/meters/backups/ directory.
– Captures the date of today
– Reads the cell_map file to determine the test cell number and number of test cells running the utilization programs
– Locates the /data/meters directory
– Loops through all the test cells running the utilization programs and modify the meterlog.nnn files
– Open the meterlog.nnn file – Read each line within the meterlog.nnn file
– Determine if the line contains a different year than the current date
– Create a meterlog.nnn.YY file containing all the data with the years data.
– Check to see if the meterlog.nnn.YY file is for the current year – Move the meterlog.nnn.YY file to meterlog.nnn