Top
ServerView Resource Orchestrator Cloud Edition V3.1.1 Reference Guide (Command/XML)
ServerView

11.2 ctchg_getmeterlog (Output Metering Logs)

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

Options

-start (optional)

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.

-end (optional)

Specifies the end day of the obtaining period

-event (optional)

Obtains the event log only

If -event and -period are omitted, both logs will be output.

-period (optional)

Obtains the periodic log only

-outputfile

Specifies the output file name

If a directory path is not included, the file will be created in the current directory.

-overwrite (optional)

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.

-format (optional)

Specify csv or xml.

When this parameter is omitted, the metering log will be output as a csv file.

Requirements

Permissions

Infrastructure administrator with OS administrator privilege

Location

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.

[Windows Manager]

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

[Linux Manager]

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

[Windows Manager]
> 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)
[Linux Manager]
# 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:

0

The command executed successfully.

1

An error has occurred.

2

A warning error has occurred.