Name
[Windows Manager]
Installation_folder\RCXCTMG\Charging\bin\ctchg_getmeterlog - Output Metering Logs
[Linux Manager]
/opt/FJSVctchg/bin/ctchg_getmeterlog.sh - Output Metering Logs
Synopsis
[Windows Manager]
ctchg_getmeterlog [-start YYYY-MM-DD -end YYYY-MM-DD] [-event | -period] -outputfile metering_log_file [-overwrite] [-format format]
[Linux Manager]
ctchg_getmeterlog.sh [-start YYYY-MM-DD -end YYYY-MM-DD] [-event | -period] -outputfile metering_log_file [-overwrite] [-format format]
Function description
This command outputs metering logs as CSV files or XML files.
It is recommended to backup the metering log regularly. Backup to other locations regularly using the task scheduler (Windows) or cron (Linux), etc.
Determining the metering log may take some time, so execute the metering log output command at 01:00 or later on the day after the end day of the obtaining period.
Options
Specifies the start day of the obtaining period
If the two parameters -start and -end are omitted, the metering log of the previous day will be output.
Specifies the end day of the obtaining period
Obtains the event log only
If -event and -period are omitted, both logs will be output.
Obtains the periodic log only
Specifies the output file name
If a directory path is not included, the file will be created in the current directory.
If an output file with the same name already exists, it will be overwritten.
When this parameter is omitted, an error will be output if a file with the same name already exists.
Specify csv or xml.
When this parameter is omitted, the metering log will be output as a csv file.
Requirements
Infrastructure administrator with OS administrator privilege
Admin server
Note
To execute the command by the user other than the Infrastructure administrator with OS administrator privilege, change the OS file system permissions manually.
The required permissions are shown below.
No | Target file/directory | Required permissions |
---|---|---|
1 | Installation_folder\RCXCTMG\Charging\bin | Read and execute |
2 | Installation_folder\RCXCTMG\Charging\bin\ctchg_getmeterlog.bat | Read and execute |
3 | Installation_folder\RCXCTMG\Charging\bin\meterlog.jar | Read |
4 | Installation_folder\RCXCTMG\Charging\conf | Read and execute |
5 | Installation_folder\RCXCTMG\Charging\conf\metering.properties | Read |
6 | Installation_folder\RCXCTMG\Charging\lib | Read and execute |
7 | Installation_folder\RCXCTMG\Charging\lib\log4j-1.2.15.jar | Read |
8 | Installation_folder\RCXCTMG\Charging\log | Read and execute |
9 | Installation_folder\RCXCTMG\Charging\log\ctchg_command.log | Read and write |
10 | Installation_folder\RCXCTMG\Charging\log\ctchg_command_debug.log | Read and write |
No | Target file/directory | Required permissions |
---|---|---|
1 | /opt/FJSVctchg/bin | Read and execute |
2 | /opt/FJSVctchg/bin/ctchg_getmeterlog.sh | Read and execute |
3 | /opt/FJSVctchg/bin/meterlog.jar | Read |
4 | /opt/FJSVctchg/lib | Read and execute |
5 | /opt/FJSVctchg/lib/log4j-1.2.15.jar | Read |
6 | /etc/opt/FJSVctchg/conf | Read and execute |
7 | /etc/opt/FJSVctchg/conf/metering.properties | Read |
8 | /var/opt/FJSVctchg/log | Read and execute |
9 | /var/opt/FJSVctchg/log/ctchg_command.log | Read and write |
10 | /var/opt/FJSVctchg/log/ctchg_command_debug.log | Read and write |
Example
> ctchg_getmeterlog -outputfile workfile (Output the metering log of the previous day) > ctchg_getmeterlog -start 2010-04-01 -end 2010-04-01 -period -outputfile periodfile (Output the periodic log for April 1, 2010) > ctchg_getmeterlog -start 2010-04-01 -end 2011-03-31 -event -outputfile eventfile (Output the event log for the financial year 2011)
# ctchg_getmeterlog.sh -outputfile workfile (Output the metaring log of the previous day) # ctchg_getmeterlog.sh -start 2011-04-01 -end 2011-04-01 -period -outputfile periodfile (Output the periodic log for April 1, 2011) # ctchg_getmeterlog.sh -start 2011-04-01 -end 2012-03-31 -event -outputfile eventfile (Output the event log for the financial year 2011)
Exit Status
This command returns the following values:
The command executed successfully.
An error has occurred.
A warning error has occurred.