Previous page

Next page

Locate page in Contents

Print this page

start_monitor

Summary:

Use the start_monitor call to begin collecting performance data for the specified server(s).

Request specification:

Name

Min/Max

Type

Description

start_monitor

 

 

 

{

 

 

 

eid_list

1..1

eid_listType

A list containing Server IDs of the servers to monitor. Supply an empty list to monitor all known servers, including the Hardware Node and all of the Virtuozzo Containers that it hosts.

filter

0..1

 

Server filter options.

{

 

 

 

type

0..[]

string

The type of the servers to monitor:

generic -- will monitor just the Hardware Node.

virtuozzo -- will monitor Virtuozzo Containers only.

}

 

 

 

class

1..[]

classType

The list of the performance classes, instances, and counters to get the data for. You have to make sure that the classes and the counters specified here are compatible with all of the servers specified in the eid_list element and/or the type specified in the filter/type element.

The following rules apply when selecting classes and counters:

  • If the eid_list element contains just the Hardware Node or the type element is set to "generic", the classes must be of the generic type.
  • If the list contains Virtuozzo Containers only or the type element is set to "virtuozzo", the classes must be of the virtuozzo type.
  • If the eid_list element is empty and no filter is specified, you may mix classes and counters of both types -- the performance monitor will choose the correct classes and counters from the list for each server type automatically.
  • If you mix a Hardware Node and Virtuozzo Containers in the same list, you have to make sure that each of the specified counters is compatible with both server types (i.e. a counter with the same name exists in both virtuozzo and generic lists). Failure to do so may give you unpredictable results. Normally, we don't recommend mixing servers of different types in the same request. If you really need to get performance data for the Hardware Node and Virtuozzo Containers in one call, use the scenario where an empty eid_list element is used (described above).

report_period

1..1

int

Reporting period in seconds. The collected data will be sent to the client at the time intervals specified here.

collect_period

0..1

int

This parameter is not currently used.

}

 

 

 

Returns:

Monitor ID. This is the first response that you will receive from Agent. You will need this ID to stop the monitor later.

Name

Min/Max

Type

Description

id

1..1

guid_type

Monitor ID.

The collected performance data. The data will be sent to the client at the time intervals specified in the request.

Name

Min/Max

Type

Description

data

1..[]

perf_dataType

Performance data.

Description:

To begin collecting performance data, select the performance classes and counters, the servers for which the data should be collected, and the time intervals at which you would like to receive performance reports. See perf_mon for more information on classes, instances, and counters. To stop the monitor, use the stop_monitor call.

Example:

The following example shows how to monitor CPU usage by the specified Virtuozzo Container.

Input

<packet version="4.0.0">

<target>perf_mon</target>

<data>

<perf_mon>

<start_monitor>

<eid_list>

<eid>39f40723-b3f5-8c41-8de9-7beefd5021fe</eid>

</eid_list>

<class>

<name>counters_vz_cpu</name>

<instance>

<counter>counter_cpu_system</counter>

</instance>

</class>

<report_period>20</report_period>

</start_monitor>

</perf_mon>

</data>

</packet>

Output

The first response that we receive from Agent contains the monitor ID. We will need this ID to stop the monitor later.

<packet xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/perf_mon" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="bc470a4258t4ae1re38" time="2007-10-08T16:35:45+0000" priority="0" version="4.0.0">

<origin>perf_mon</origin>

<target>vzclient2-ac6ab656-8558-0949-a605-f47cfc63cd9c</target>

<dst>

<director>gend</director>

</dst>

<data>

<perf_mon>

<id>e9cd9b4e-a386-9f42-84f7-4d1baae4e4b7</id>

</perf_mon>

</data>

<src>

<director>gend</director>

</src>

</packet>

The subsequent responses will contain the collected performance data.

<?xml version="1.0" encoding="UTF-8"?><packet xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/types" xmlns:ns1="http://www.swsoft.com/webservices/vza/3.0.3/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="bc470a4258t4ae1re38" time="2007-10-08T16:37:05+0000" priority="0" version="4.0.0">

<origin>perf_mon</origin>

<target>vzclient2-ac6ab656-8558-0949-a605-f47cfc63cd9c</target>

<dst>

<director>gend</director>

</dst>

<data>

<perf_mon>

<data xsi:type="ns1:perf_dataType">

<eid>39f40723-b3f5-8c41-8de9-7beefd5021fe</eid>

<interval xsi:type="ns2:intervalType">

<start_time>2007-10-08T16:36:36+0000</start_time>

<end_time>2007-10-08T16:36:56+0000</end_time>

</interval>

<class>

<name>counters_vz_cpu</name>

<instance>

<name></name>

<counter>

<name>counter_cpu_system</name>

<value>

<avg>68</avg>

<min>68</min>

<max>68</max>

<cur>68</cur>

</value>

</counter>

</instance>

</class>

</data>

</perf_mon>

</data>

<src>

<director>gend</director>

</src>

</packet>

Please send us your feedback on this help page