parse_meterlog

Purpose:

This program is used to subdivide the data in the /data/meters/meterlog.NNN files into separate files based on the year. It only needs to be run once per year and can be done so manually or can be cron’d.

The resulting files from previous years are stored in the /data/meters/backups/ directory.

Method:
– 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

Enter:

parse_meterlog

Where:

N/A

Example:

 

Notes:

Launch this on the utilization node.

See Also: