Hitachi

JP1 Version 11 JP1/Performance Management - Agent Option for Service Response Description, User's Guide and Reference


jpcvtaskctl (pauses/resumes the measurement of a task)

Organization of this page

Format

Format 1 (pause the measurement by specifying a particular task ID)

jpcvtaskctl pause -t task-ID [-v]

Format 2 (resume the measurement by specifying a particular task ID)

jpcvtaskctl continue -t task-ID [-v]

Format 3 (output the list of IDs of paused tasks to the standard output in ascending order)

jpcvtaskctl list

Format 4 (notify the probe or IE probe of pauses and resumption)#

jpcvtaskctl sync [-v]

#

Even after you successfully register or remove the task ID as a target for pausing or resuming the task as a result of the command execution in format 1 or 2, a communication error may occur due to system load or other reasons. Such an error may cause the pause or resumption notification to the probe or IE probe to fail, possibly preventing the command from taking effect. In this case, remove the cause of the communication error and then execute the command in format 4. In doing so, the probe or IE prove is notified of again, enabling the pause or resumption to take effect.

Function

This command enables you to pause a measurement through the probe or IE probe, in which PFM - Agent for Service Response issues requests to monitoring targets and receives responses, on a task-ID basis. The command can also output the list of IDs of paused tasks to the standard output in ascending order, so that you can view the IDs of paused tasks or resume the measurement of a paused task by specifying the ID of the task.

You can pause tasks up to 500 task IDs.

Execution permission

Administrator permissions

Storage folder

installation-folder\agtv\probe\bin

Arguments

-t task-ID

Specifies the ID of a task to be paused or resumed. The jpcvtaskctl command does not check if the specified task ID can be found in the measurement condition registration file (esptask.xml).

-v

Outputs detailed information to the standard output when the jpcvtaskctl command is executed.

Notes

  1. You should execute only one jpcvtaskctl command at a time. If more than one command is executed, the second and subsequent jpcvtaskctl commands result in errors.

  2. You can execute the jpcvtaskctl command regardless of whether the probe is running or not. If you execute the command while the probe is not running, you can get the result after the probe is started. The same applies to the IE probe.

  3. If you execute the jpcvtaskctl command on the monitoring target whose operation is monitored through the alarm function, start or stop monitoring through the alarm in combination with the execution of the jpcvtaskctl command.

    Figure 11‒1: Use of the alarm function for operation monitoring

    [Figure]

    For details about starting or stopping monitoring through the alarm, see the JP1 Version 11 JP1/Performance Management User's Guide.

    Make sure that you follow the steps below to pause or resume the measurement. If not, an alarm may be issued while PFM - Agent for Service Response is not performing any measurement or the monitoring target itself is not running, which is reported as an error.

    Figure 11‒2: Steps for pausing/resuming the measurement of the monitoring target whose operation is being monitored through the alarm function

    [Figure]

    To pause the measurement:

    1. Stop monitoring through the alarm.

    2. Execute the jpcvtaskctl pause command to pause the measurement by PFM - Agent for Service Response.

    3. Wait until the measurement interval# for the task ID specified in step 2 elapses.

    4. Stop the monitored service.

    To resume the measurement:

    1. Start the monitored service.

    2. Execute the jpcvtaskctl continue command to resume the measurement by PFM - Agent for Service Response.

    3. Wait until the measurement interval# for the task ID specified in step 2 elapses.

    4. Resume monitoring through the alarm.

    #

    The measurement interval refers to the value of the <INTERVAL> tag specified for each task ID in the measurement condition registration file (esptask.xml). For details, see 8.3.2 Format and definition of measurement conditions (common section).

    Make sure that you wait for the period specified as the measurement interval before proceeding with the steps; otherwise, the first alarm after the resumption may be issued on the measurement result obtained before PFM - Agent for Service Response pauses or resumes the measurement completely, which will be reported as an error.

  4. When you pause the measurement for a task ID using the jpcvtaskctl pause command, PFM - Agent for Service Response maintains the information that the task ID is on the list of command targets until you resume it with the jpcvtaskctl continue command.

    Even if the task itself is removed when its ID is on the list of IDs of paused tasks, defining a new task with the same task ID will cause it to have the same state, meaning that it will be in a paused state.

    For details about checking if a task ID is on the list of IDs of paused tasks, use the jpcvtaskctl list command to output the list of IDs of paused tasks to the standard output.

  5. When pausing or resuming the measurement with the jpcvtaskctl command, do not start or reload PFM - Agent for Service Response at the same time. Otherwise, the PFM - Agent for Service Response service may terminate abnormally.

  6. In a cluster system, the jpcvtaskctl command cannot be executed from the standby host.

  7. When you move from a non-clustered configuration to the cluster system, the registered list of IDs of paused tasks is not inherited. If you paused tasks in the non-clustered configuration, set up the cluster environment and then use the jpcvtaskctl pause command to pause the measurements.

Return values

0

Normal termination

1

An error with an argument or definition was found during command execution, or operations could not continue due to a memory shortage.

Error details are also output in a message.

2

The executed command resulted in an error.

Error examples:

  • Storing the ID of the task to be paused failed.

  • Notifying the probe or IE probe failed.

Error details are also output in a message.

3

More than one command is being executed at the same time.

Example 1 (pausing the measurement with a particular task ID)

The following shows an example of how to pause the measurement with task ID 100 in accordance with the projected outage of the monitored Web server below:

Projected outage of the monitored Web server

2016/07/07 01:00:00 Time to shut down the server

2016/07/07 06:00:00 Time to start the server

(1) Pre-measurement check

Before executing the jpcvtaskctl pause command, you must precheck the time specified as the measurement interval for task ID 100. You can see the interval in the measurement condition registration file (esptask.xml). Look for the <TASKID> tag whose value is 100, and check the value of the <INTERVAL> tag, in seconds, right below that tag.

In the measurement condition registration file (esptask.xml) below, the measurement interval for task ID 100 is 300 seconds (5 minutes):

<?xml version="1.0" encoding="Shift_JIS" standalone="no"?>
<!DOCTYPE TASKLIST SYSTEM "esptask.dtd">
<TASKLIST>
  <TASK>
    <GEN_PARAM>
      <TASKID>100</TASKID>
      <INTERVAL>300</INTERVAL>
    </GEN_PARAM>
    <SERV_PARAM>
      <HTTP>
        <URL>www.example.com/</URL>
      </HTTP>
    </SERV_PARAM>
  </TASK>
</TASKLIST>
(2) General procedure for shutting down the monitored Web server
  1. 2016/07/07 00:55:00: Before this time, stop monitoring through the alarm.

  2. 2016/07/07 00:55:00: Before this time, execute the jpcvtaskctl pause command to stop the measurement with task ID 100.

  3. Wait until the measurement interval for task ID 100 elapses (5 minutes).

  4. 2016/07/07 01:00:00: At this time, shut down the monitored Web server as scheduled.

Before 00:55:00 on July 07, 2016, make sure that you stop alarm-based monitoring of the task with task ID 100, which is to be paused, and pause the measurement by executing the jpcvtaskctl pause command. Make sure that you stop the alarm-based monitoring first. If you pause the measurement before stopping the alarm-based monitoring, a failed-measurement error may be issued as an error.

When the jpcvtaskctl pause command is successful, the KAVK43004-I message is output as follows:

>jpcvtaskctl pause -t 100
KAVK43004-I The command was successfully executed.

Example 2 (resuming the paused measurement with a particular task ID)

The following shows an example of how to resume the measurement with task ID 100, which was paused in Example 1, right after the scheduled server start time (2016/07/07 06:00:00).

(1) General procedure for starting the monitored Web server
  1. 2016/07/07 06:00:00: Start the monitored Web server.

  2. 2016/07/07 06:03:00: Confirm that the monitored Web server is now started, execute the jpcvtaskctl continue command, and then resume the measurement with task ID 100.

  3. Wait until the measurement interval for task ID 100 elapses (5 minutes).

  4. 2016/07/07 06:08:00: After this time, start alarm-based monitoring.

After you resume the measurement by executing the jpcvtaskctl continue command, wait until the measurement interval for task ID 100, which can be found in the measurement condition registration file (esptask.xml), elapses (5 minutes) just like Example 1. Then, after 06:08:00 on July 7, 2016, when the measurement should be started completely, start alarm-based monitoring of the task with task ID 100.

When the jpcvtaskctl continue command is successful, the KAVK43004-I message is output as follows:

>jpcvtaskctl continue -t 100
KAVK43004-I The command was successfully executed.

Example 3 (pausing the measurement does not take effect due to an error or any other reason)

In Example 1, you may see one of the following messages when executing the jpcvtaskctl pause command. The following subsections show how to handle the situation in these cases.

(1) KAVK43008-E is output
>jpcvtaskctl pause -t 100
KAVK43008-E An internal file operation failed. OP=WRITE, ERRNO=xx, P1=xx, P2=xx, ERRINFO=xx
KAVK43003-E An attempt to execute the command has failed.

The task ID for the task to be paused could not be registered. Remove the cause of the error based on the description for KAVK43008-E in 12.4 Messages, and then re-execute the jpcvtaskctl pause command.

To check if the task ID for the task to be paused has been registered successfully, execute the jpcvtaskctl list command and see the result of it. If the task has been registered successfully, the task ID specified in the argument -t on the execution of the jpcvtaskctl pause command appears as the execution result of the jpcvtaskctl list command, as shown below:

>jpcvtaskctl list
100
(2) KAVK43009-E is output
>jpcvtaskctl pause -t 100
KAVK43009-W A communication to the service failed. SERVICE=PROBE
KAVK43009-W A communication to the service failed. SERVICE=IEPROBE
KAVK43004-I The command was successfully executed.

The task ID for the task to be paused was registered successfully, but the notification of pausing the task to the probe or IE probe failed. A possible failure scenario includes a communication error caused by heavy system load or any other reason.

If the probe or IE probe is not running, the KAVK43009-W message is output. Thus, check the value of SERVICE in the KAVK43009-W message first, and then identify whether the probe or IE probe is running. If the value of SERVICE is PROBE, then check that the probe is running, and if the value is IEPROBE, then check that the IE probe is running. If you are performing a measurement other than IE scenarios, then check that the probe is running, and if performing the measurement of an IE scenario, then check that the IE probe is running. The only service that matters is services being measured; thus ignore this message if a service that is not measured is not running.

If the probe or IE probe is running, but this message is output, check how much the system is loaded, and then execute the jpcvtaskctl sync command as shown below:

>jpcvtaskctl sync
KAVK43004-I The command was successfully executed.

When the command is executed successfully, only the notification to the probe or IE probe is sent again, causing the measurement to be paused.

If the command fails, add -v to the argument of the jpcvtaskctl sync command to show more detailed error information:

>jpcvtaskctl sync -v
KAVK43010-E A communication to the service failed. OP=xx, ERRNO=xx, SERVICE=PROBE, ERRINFO=xx
KAVK43010-E A communication to the service failed. OP=xx, ERRNO=xx, SERVICE=IEPROBE, ERRINFO=xx
KAVK43003-E An attempt to execute the command has failed.

Remove the cause of the error based on the description for the action the operator should take when the message is output in 12.4 Messages, and then re-execute the command.