7.6 Command registration file (espcommand.xml)

The command registration file is used to register user-defined commands. It is read when the Probe Daemon starts.

To apply the definitions specified in the command registration file, you must restart PFM - Agent for Service Response.

Organization of this section
(1) Format
(2) Definition
(3) Example

(1) Format

<?xml version="1.0" encoding="US-ASCII" standalone="no"?>
<!DOCTYPE COMMAND_LIST SYSTEM "espcommand.dtd">
<COMMAND_LIST>
  <ESP_NAME/>
  <COMMAND>
     <USER_COMMAND_ID>user-defined-service-ID</USER_COMMAND_ID>
     <USER_COMMAND>user-defined-command</USER_COMMAND>
     <EXECUTION_TIME></EXECUTION_TIME>
  </COMMAND>
...
</COMMAND_LIST>

(2) Definition

(a) XML declaration and document type declaration

Specify the XML declaration on the first line and the document type declaration on the second line. Specify exactly as shown below:

<?xml version="1.0" encoding="encoding-type#" standalone="no"?>
<!DOCTYPE COMMAND_LIST SYSTEM "espcommand.dtd">

#
Specify one of the following encoding types:
You must declare the command registration file with the specified encoding type.
  • Shift_JIS
  • US-ASCII
  • GB18030#1
#1
GB18030 supports only in Chinese OS and you can not use the 4 bytes characters.
(b) XML definition

Table 7-28 XML definition

XML tagMandatoryRole of tag and value to be specified
<COMMAND_LIST>... </COMMAND_LIST>YIndicates a list of user-defined commands. This tag contains one or more <COMMAND> tags. A new <COMMAND> tag can start immediately after a </COMMAND> tag.
<ESP_NAME/>YYou must specify this tag.
<COMMAND>... </COMMAND>YSpecifies the user-defined command. This tag contains the <USER_COMMAND_ID>, <USER_COMMAND>, and <EXECUTION_TIME> tags.
<USER_COMMAND_ID>... </USER_COMMAND_ID>
((1 to 100))
YSpecifies the user definition ID used to identify a user-defined command.
<USER_COMMAND>... </USER_COMMAND>
((character string of up to 512 bytes))
YSpecifies a user-defined command. Even if the command requires options, the entire command, including the options, must be specified on one line.
<EXECUTION_TIME>... </EXECUTION_TIME>--Specifies that the time required to execute the user-defined command (from start to termination) is to be used as the response performance information. If this item is omitted, the value output to the standard output by the user-defined command is used as the response performance information.
Legend:
Y: Mandatory item
--: Optional item
(( )): Specifiable value range of the tag.

(3) Example

The following is an example of a command registration file:

<?xml version="1.0" encoding="US-ASCII" standalone="no"?>
<!DOCTYPE COMMAND_LIST SYSTEM "espcommand.dtd">
<COMMAND_LIST>
  <ESP_NAME/>
  <COMMAND>
     <USER_COMMAND_ID>1</USER_COMMAND_ID>
     <USER_COMMAND>command1.exe</USER_COMMAND>
  </COMMAND>
  <COMMAND>
     <USER_COMMAND_ID>2</USER_COMMAND_ID>
     <USER_COMMAND>command2.exe</USER_COMMAND>
     <EXECUTION_TIME></EXECUTION_TIME>
  </COMMAND>
</COMMAND_LIST>