Hitachi

uCosminexus Service Platform Reference Guide


6.15.3 Command-adapter runtime-environment properties file

Organization of this subsection

(1) Format

adpcmd.config.command.allow-file-path=path-of-command-execution-permission-definition-file
 
[adpcmd.config.process-environment.variable-file-path=path-of-process-environment-variable-definition-file]
[adpcmd.config.process-environment.working-dir-path=work-directory-path-for-external-command-processes]
 
[adpcmd.config.timeout.value=timeout-value-of-external-command-process]
[adpcmd.config.timeout.enable-kill-process={true|false}]
 
[adpcmd.config.stdout.size=maximum-size-of-standard-output-acquired-by-response-message]
 
[adpcmd.log.messagelog.level={0|10|20}]
[adpcmd.log.methodtrace.level={1|2|3|4|5}]
[adpcmd.log.methodtrace.filenum=number-of-maintenance-log-files]
[adpcmd.log.methodtrace.filesize=size-of-maintenance-log-file]
[adpcmd.log.exptrace.filenum=number-of-exception-log-files]
[adpcmd.log.exptrace.filesize=size-of-exception-log-file]
[adpcmd.log.stderr.enable={true|false}]
[adpcmd.log.stderr.charset={UTF-8|MS932|EUC-JP}]
[adpcmd.log.stderr.filenum=number-of-standard-error-output-log-files]
[adpcmd.log.stderr.filesize=size-of-standard-error-output-log-file]

(2) Function

Specifies the configuration information for each command adapter.

To create a command-adapter runtime-environment properties file:

  1. Define the command-adapter runtime-environment properties file based on the following template file:

    service-platform-installation-directory\CSC\custom-adapter\Command\config\templates\serviceid.properties
  2. Rename the edited command-adapter runtime-environment properties file as service-ID.properties, and then store the file in the following directory:

    service-platform-installation-directory\CSC\custom-adapter\Command\config

(3) Specifiable properties

(a) Path of the command-execution permission definition file

adpcmd.config.command.allow-file-path=path-of-command-execution-permission-definition-file

Specifies the path of the command-execution permission definition file as an absolute or relative path. When you specify a relative path, the base directory is as follows:

service-platform-installation-directory\CSC\custom-adapter\Command\config
Reference note

Assume that C:\Example is specified for service-platform-installation-directory and a command-execution permission definition file named acc.txt is created in C:\Example\CSC\custom-adapter\Command\config. In this case, the operation is the same no matter which of the following two examples you use:

Example of an absolute path specification

adpcmd.config.command.allow-file-path=C:\\Example\\CSC\\custom-adapter\\Command\\config\\acc.txt

Example of a relative path specification

adpcmd.config.command.allow-file-path=acc.txt

(b) Environment settings for external command processes

adpcmd.config.process-environment.variable-file-path=path-of-process-environment-variable-definition-file

Specifies the path of the process environment-variable definition file as an absolute or relative path. When you specify a relative path, the base directory is as follows:

service-platform-installation-directory\CSC\custom-adapter\Command\config

adpcmd.config.process-environment.working-dir-path=work-directory-path-for-external-command-processes ~ <<service-platform-installation-directory\CSC\spool\Command>>

Specifies the absolute path to the work directory for external command processes.

(c) Timeout

adpcmd.config.timeout.value=timeout-value-of-external-command-process ~ <Numeric character> ((0 to 86400)) <<60>>

Specifies the timeout value (in seconds) for external command processes.

If you specify 0, a timeout does not occur for processes, and the system waits until the external command processes end.

Important note

A service platform does not provide a method for stopping external command processes from the operating environment. Therefore, you must specify an external command that definitely terminates processes or create an external command that allows you to check the status.

adpcmd.config.timeout.enable-kill-process=whether-to-kill-external-command-process-when-timeout-occurs ~ {true|false} <<true>>

Specifies whether to attempt to forcibly terminate the external command process when a timeout occurs.

  • true

    Forced termination will be attempted.

  • false

    Forced termination will not be performed.

Even if true is specified, the forced termination might fail depending on the status of the external command process. See the message log to check whether the forced termination is successful.

If false is specified, the running external command process continues processing irrespective of the status of the command adapter and HCSC server.

Important note

A service platform does not provide a method for stopping external command processes from the operating environment. Therefore, you must specify an external command that definitely terminates processes or create an external command that allows you to check the status.

(d) Maximum size of standard output that can be acquired by a response message

adpcmd.config.stdout.size=maximum-size-of-standard-output-acquired-by-response-message ~ <Numeric character> ((0 to 104857600)) <<2097152>>

Specifies the maximum size of the standard output (in bytes) that can be acquired by using a response message.

If you specify 0, the standard output cannot be acquired by using a response message.

If the size of data output to the standard output by an external command process exceeds the value specified for this property, a warning message is output to the message log. However, if you specify 0, no warning message is output.

(e) Logging

adpcmd.log.messagelog.level={0|10|20} ~ <<10>>

Specifies the output level for the message log.

The following table lists the output information and the output levels:

Output information

Description

Output level

0

10

20

Error information

Cause of an exception or an error

A

A

A

Warning information

Status that must be checked during system operation

B

A

A

Information

Changes in the command adapter status (starting or stopping)

Event notification (starting or ending of an external command)

B

B

A

Legend:

A: All the information is output.

B: Only the important log messages are output.

adpcmd.log.methodtrace.level={1|2|3|4|5} ~ <<3>>

Specifies the output level for the maintenance log.

The following table lists the output information and the output levels:

Output information

Output level

1

2

3

4

5

Error information (cause of an exception)

Y

Y

Y

Y

Y

Interface information for the main external modules (information related to the custom adapter framework)

N

Y

Y

Y

Y

Interface information for the external modules (information related to external command processes)

N

N

Y

Y

Y

Information for the interfaces within the main components

N

N

N

Y

Y

Debug information

N

N

N

N

Y

Legend:

Y: Information is output.

N: Information is not output.

adpcmd.log.methodtrace.filenum=number-of-maintenance-log-files ~ <Numeric character> ((1 to 16)) <<8>>

Specifies the number of maintenance log files.

adpcmd.log.methodtrace.filesize=size-of-maintenance-log-file ~ <Numeric character> ((4096 to 2147483647)) <<2097152>>

Specifies the maximum size of one maintenance log file in bytes.

adpcmd.log.exptrace.filenum=number-of-exception-log-files ~ <Numeric character> ((1 to 16)) <<8>>

Specifies the number of exception log files.

adpcmd.log.exptrace.filesize=size-of-exception-log-file ~ <Numeric character> ((4096 to 2147483647)) <<2097152>>

Specifies the maximum size of one exception log file in bytes.

adpcmd.log.stderr.enable={true|false} ~ <<true>>

Specifies whether the contents of the standard error output for external command processes will be written to a log file.

  • true

    The standard error output log is enabled.

  • false

    The standard error output log is disabled.

adpcmd.log.stderr.charset={UTF-8|MS932|EUC-JP} ~ <<UTF-8>>

Specifies the character code used when an external command process outputs data to the standard error output.

If the external command process outputs ASCII characters only, you can omit this property to use the default setting.

adpcmd.log.stderr.filenum=number-of-standard-error-output-log-files ~ <Numeric character> ((1 to 16)) <<8>>

Specifies the number of standard error output log files.

adpcmd.log.stderr.filesize=size-of-standard-error-output-log-file ~ <Numeric character> ((4096 to 2147483647)) <<2097152>>

Specifies the maximum size of one standard error output log file in bytes.