fscsm_meteringexport
fscsm_meteringexport -file output-file [-start Startingdate] [-end Endingdate] [-format Formattype]
Outputs a metering log. The log is output as a file in CSV or XML format.
In Startingdate, specify the start date of the target period for which metering logs are to be output, in the format of YYYY-MM-DD. When omitted, the date of the oldest data in the metering log accumulated in Cloud Services Management is regarded as the start date.
In Endingdate, specify the end date of the target period for which metering logs are to be output, in the format of YYYY-MM-DD. When omitted, the day before the date of command execution is regarded as the end date.
In output-file, specify the file name using a character string containing alphanumeric characters corresponding to the format type which is the parameter that follows, hyphens, underscores, and periods. This parameter cannot be omitted.
When the specified file already exists, an error occurs.
In Formattype, enter the file format of the file to be output. Specify "csv" to output in CSV format, or specify "xml" to output in XML format. This parameter can be omitted. When it is omitted, the log is output in CSV format.
When outputting the information for May 2015 in the metering log as a CSV file
>fscsm_meteringexport -start 2015-05-01 -end 2015-05-31 -file meter201505.csv<RETURN>
When outputting the information up until 2014 in the metering log as an XML file
>fscsm_meteringexport -end 2014-12-31 -file mater2014.xml -format xml<RETURN>
When the metering log is output in CSV format, the content of the output file should look like the following:
# version, eventTime, event, resourceType, orgId, bizSystemId, menuId, extendedOptions, userId, resourceId, resourceIdentifier, systemDiskImage, dataDiskType, dataDiskNum, snapshotSize 1, "2015-01-01 00:00:00.000+0900", "ADD", "system", "org001", "bizsys001", "menu001", "optionA,optionB", "user001", "", "", "", "", , 1, "2015-01-01 01:00:00.000+0900", "ADD", "vm", "org001", "bizsys001", "", "", "", "vm001", "type_small", "WS2012", "type_middle", 1, 1, "2015-01-01 02:00:00.000+0900", "START", "vm", "org001", "bizsys001", "", "", "", "vm001", "", "", "", , 1, "2015-01-01 03:00:00.000+0900", "STOP", "vm", "org001", "bizsys001", "", "", "", "vm001", "", "", "", , 1, "2015-01-01 04:00:00.000+0900", "CHANGE", "vm", "org001", "bizsys001", "", "", "", "vm001", "type_middle", "WS2012", "type_middle", 1, 1, "2015-01-01 05:00:00.000+0900", "ADD", "slb", "org001", "bizsys001", "", "", "", "slb001", "optionSLB", "", "", , 1, "2015-01-01 05:00:00.000+0900", "ADD", "rdb", "org001", "bizsys001", "", "", "", "rdb001", "optionRDB", "", "", , 1, "2015-01-01 06:00:00.000+0900", "DELETE", "slb", "org001", "bizsys001", "", "", "", "slb001", "", "", "", , 1, "2015-01-01 06:00:00.000+0900", "DELETE", "rdb", "org001", "bizsys001", "", "", "", "rdb001", "", "", "", , 1, "2015-01-01 06:00:00.000+0900", "DELETE", "vm", "org001", "bizsys001", "", "", "", "vm001", "", "", "", , 1, "2015-01-01 07:00:00.000+0900", "DELETE", "system", "org001", "bizsys001", "", "", "", "", "", "", "", , |