First, we have to discuss the Performance Monitor terminology.
Performance Class
Performance class is a type of the system resource that can be monitored. This includes CPU, memory, disk, network, etc. A class is identified by ID. You obtain the IDs of the available classes by retrieving them from the Agent vocabulary. Each performance class is represented by a category in the vocabulary. To distinguish the class categories from other categories, they all belong to another category named counters
. Different types of servers (generic, virtuozzo) have their own sets of performance classes. The following are examples of performance class entries in the Agent vocabulary.
Generic performance class (compatible with physical servers only):
<category>
<id>counters_net</id>
<category>generic</category>
<category>counters</category>
<short>Network usage</short>
<long>Network usage related parameters</long>
</category>
Virtuozzo performance class (compatible with Virtuozzo Containers only):
<category>
<id>counters_vz_net</id>
<category>virtuozzo</category>
<category>counters</category>
<short>Network usage</short>
<long>Container network-related counters</long>
</category>
The following table describes the properties of a performance class:
Property |
Description |
|
The unique class ID |
|
The name of the parent vocabulary category. The The |
|
Short description of the class. |
|
Long description of the class. |
The following examples shows how to retrieve the list of the available classes from the vocabulary:
Input
<packet version="4.0.0" id="2">
<data>
<system>
<get_vocabulary>
<category>counters</category>
</get_vocabulary>
</system>
</data>
</packet>
The output will contain all vocabulary sections with the entries that belong to the counters
category. The sections that don't have any classes will be empty and can be ignored (for example, the very first VZABackupManager
section in the output below). When parsing the returned XML packet, search for the entries that have the <category>counters</category>
element in them. The other category
element specifies the server type with which this performance class is compatible. The generic
category applies to physical machines. The virtuozzo
category applies to Virtuozzo Containers. If you want to monitor the Hardware Node performance, use generic
counters. To monitor a Virtuozzo Container, use virtuozzo
counters. An attempt to use a counter that is not compatible with the type of the server will result in error.
Output
<?xml version="1.0" encoding="UTF-8"?><packet xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/system" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="4.0.0" priority="0" id="8c47693a5et4ae1re00">
<origin>gend</origin>
<target>vzclient4-58548599-9a43-0d47-8734-5eee7c2779a1</target>
<dst>
<director>gend</director>
</dst>
<data>
<system>
<vocabulary>
<name>VZABackupManager</name>
</vocabulary>
<vocabulary>
<name>VZABasicFunctionality</name>
<category>
<id>counters_vz_cpu</id>
<category>virtuozzo</category>
<category>counters</category>
<short>CPU usage</short>
<long>Container CPU-related counters</long>
</category>
<category>
<id>counters_vz_ubc</id>
<category>virtuozzo</category>
<category>counters</category>
<short>User Bean Counters (UBC)</short>
<long>User Bean Counters (UBC)</long>
</category>
<category>
<id>counters_vz_net</id>
<category>virtuozzo</category>
<category>counters</category>
<short>Network usage</short>
<long>Container network-related counters</long>
</category>
<category>
<id>counters_vz_quota</id>
<category>virtuozzo</category>
<category>counters</category>
<short>Quotas</short>
<long>Disk quota parameters</long>
</category>
<category>
<id>counters_vz_loadavg</id>
<category>virtuozzo</category>
<category>counters</category>
<short>Load average</short>
<long>Container load average parameters</long>
</category>
<category>
<id>counters_vz_system</id>
<category>virtuozzo</category>
<category>counters</category>
<short>System information</short>
<long>System-related counters</long>
</category>
<category>
<id>counters_vz_slm</id>
<category>virtuozzo</category>
<category>counters</category>
<short>SLM parameters</short>
<long>SLM-related parameters</long>
</category>
<category>
<id>counters_vz_memory</id>
<category>virtuozzo</category>
<category>counters</category>
<short>Memory usage</short>
<long>Memory usage parameters</long>
</category>
<category>
<id>counters_vz_hw_net</id>
<category>generic</category>
<category>counters</category>
<postfix>virtuozzo</postfix>
<short>Virtuozzo network usage</short>
<long>Network-related counters</long>
</category>
</vocabulary>
<vocabulary>
<name>VZAMigrator</name>
</vocabulary>
<vocabulary>
<name>VZANetworkManager</name>
</vocabulary>
<vocabulary>
<name>VZAOpCompat</name>
</vocabulary>
<vocabulary>
<name>VZAPackageManager</name>
</vocabulary>
<vocabulary>
<name>VZASupport</name>
</vocabulary>
<vocabulary>
<name>VZAUp2date</name>
</vocabulary>
<vocabulary>
<name>VZLAlertManager</name>
</vocabulary>
<vocabulary>
<name>VZLAuthEngine</name>
</vocabulary>
<vocabulary>
<name>VZLBackupManager</name>
</vocabulary>
<vocabulary>
<name>VZLComputerManager</name>
</vocabulary>
<vocabulary>
<name>VZLDeviceManager</name>
</vocabulary>
<vocabulary>
<name>VZLEnvSampleManager</name>
</vocabulary>
<vocabulary>
<name>VZLLicenseManager</name>
</vocabulary>
<vocabulary>
<name>VZLMigrator</name>
</vocabulary>
<vocabulary>
<name>VZLPackageManager</name>
</vocabulary>
<vocabulary>
<name>VZLResLog</name>
</vocabulary>
<vocabulary>
<name>VZLScheduler</name>
</vocabulary>
<vocabulary>
<name>VZLServerGroup</name>
</vocabulary>
<vocabulary>
<name>VZLServiceManager</name>
</vocabulary>
<vocabulary>
<name>backup_deserializer</name>
</vocabulary>
<vocabulary>
<name>filer</name>
</vocabulary>
<vocabulary>
<name>restore_serializer</name>
</vocabulary>
<vocabulary>
<name>vzaproxy</name>
</vocabulary>
<vocabulary>
<name>vzaproxyinsve</name>
</vocabulary>
<vocabulary>
<name>vzlfile_deserializer</name>
</vocabulary>
<vocabulary>
<name>vzlfile_serializer</name>
</vocabulary>
<vocabulary>
<name>vzlin_backup_serializer</name>
</vocabulary>
<vocabulary>
<name>vzlin_restore_deserializer</name>
</vocabulary>
<vocabulary>
<name>vzlin_selective_restore_deserializer</name>
</vocabulary>
<vocabulary>
<name>generic</name>
<category>
<id>counters_cpu</id>
<category>generic</category>
<category>counters</category>
<short>CPU usage</short>
<long>Hardware Node CPU related parameters</long>
</category>
<category>
<id>counters_disk</id>
<category>generic</category>
<category>counters</category>
<short>Disk usage</short>
<long>Disk usage related parameters</long>
</category>
<category>
<id>counters_memory</id>
<category>generic</category>
<category>counters</category>
<short>Memory usage</short>
<long>Memory usage related parameters</long>
</category>
<category>
<id>counters_net</id>
<category>generic</category>
<category>counters</category>
<short>Network usage</short>
<long>Network usage related parameters</long>
</category>
<category>
<id>counters_loadavg</id>
<category>generic</category>
<category>counters</category>
<short>Load average</short>
<long>CPU usage related parameters</long>
</category>
<category>
<id>counters_system</id>
<category>generic</category>
<category>counters</category>
<short>System info</short>
<long>System info related parameters</long>
</category>
</vocabulary>
</system>
</data>
</packet>
Class Instance
While class identifies the type of the system resource, the term "instance" refers to a particular device when multiple devices of the same type exist in the system. For example, a network interface in general is a class, but each network card installed in the system is an instance of that class. Each class has at least one instance, but not all classes may have multiple instances.
Performance Counter
Counters are used to measure various aspects of a performance, such as the CPU times, network rates, disk usage, etc. Each class has its own set of counters. Counter data is comprised of the current, minimum, maximum, and average values. You retrieve the list of counters available for a particular class from the vocabulary by specifying the class name as the criteria. Performance counters are stored as parameters in a vocabulary. Each counter has a category
property that contains the name of the performance class this counter belongs to. The following is an example of a performance counter entry in a vocabulary:
<parameter>
<id>counter_cpu_system</id>
<category>counters_vz_cpu</category>
<type>int</type>
<value_type>1</value_type>
<counter_type>2</counter_type>
<short>System</short>
<long>System CPU time</long>
<measure>seconds</measure>
</parameter>
The following table describes the properties of a performance counter:
Property |
Description |
|
A string containing the unique counter identifier. |
|
A string containing the name of the parent performance class (in general, the name of the parent vocabulary category). |
|
A string specifying the data type of the counter values. The possible values are:
|
|
A numeric representation of the counter data type (used internally by Agent). |
|
An integer representing the counter type. Depending on the type, the values of the counter can be interpreted differently:
|
|
Short counter description. |
|
Long counter description. |
|
Units of measure (seconds, percent). |
You retrieve the list of the counters available for a particular class from the vocabulary by specifying the class name as the criteria. The following example retrieves all counters for the counters_vz_cpu
class:
Input
<packet version="4.0.0" id="2">
<data>
<system>
<get_vocabulary>
<category>counters_vz_cpu</category>
</get_vocabulary>
</system>
</data>
</packet>
Output
The output will contain all vocabulary sections with the entries that belong to the counters_vz_cpu
category. The sections that don't have any counters will be empty and can be ignored. When parsing the returned XML packet, search for the entries that have the <category>counters_vz_cpu</category>
element in them.
<packet xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/system" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="1bc470e041dt390crbf4" priority="0" version="4.0.0">
<origin>gend</origin>
<target>vzclient2-ac6ab656-8558-0949-a605-f47cfc63cd9c</target>
<dst>
<director>gend</director>
</dst>
<data>
<system>
<vocabulary>
<name>VZABackupManager</name>
</vocabulary>
<vocabulary>
<name>VZABasicFunctionality</name>
<parameter>
<id>counter_cpu_system</id>
<category>counters_vz_cpu</category>
<type>int</type>
<value_type>1</value_type>
<counter_type>2</counter_type>
<short>System</short>
<long>System CPU time</long>
<measure>seconds</measure>
</parameter>
<parameter>
<id>counter_cpu_user</id>
<category>counters_vz_cpu</category>
<type>int</type>
<value_type>1</value_type>
<counter_type>2</counter_type>
<short>User</short>
<long>User CPU time</long>
<measure>seconds</measure>
</parameter>
<parameter>
<id>counter_cpu_idle</id>
<category>counters_vz_cpu</category>
<type>int</type>
<value_type>1</value_type>
<counter_type>2</counter_type>
<short>Idle</short>
<long>Idle CPU time</long>
<measure>seconds</measure>
</parameter>
<parameter>
<id>counter_cpu_nice</id>
<category>counters_vz_cpu</category>
<type>int</type>
<value_type>1</value_type>
<counter_type>2</counter_type>
<short>Nice</short>
<long>Nice CPU time</long>
<measure>seconds</measure>
</parameter>
<parameter>
<id>counter_cpu_starvation</id>
<category>counters_vz_cpu</category>
<type>int</type>
<value_type>1</value_type>
<counter_type>2</counter_type>
<short>Starvation</short>
<long>Starvation CPU time (Difference between guaranteed CPU time and used CPU time)</long>
<measure>seconds</measure>
</parameter>
<parameter>
<id>counter_cpu_system_states</id>
<category>counters_vz_cpu</category>
<type>int</type>
<value_type>1</value_type>
<counter_type>0</counter_type>
<short>System states</short>
<long>System CPU time (percents)</long>
<measure>percents</measure>
</parameter>
<parameter>
<id>counter_cpu_user_states</id>
<category>counters_vz_cpu</category>
<type>int</type>
<value_type>1</value_type>
<counter_type>0</counter_type>
<short>Use statesr</short>
<long>User CPU time (percents)</long>
<measure>percents</measure>
</parameter>
<parameter>
<id>counter_cpu_idle_states</id>
<category>counters_vz_cpu</category>
<type>int</type>
<value_type>1</value_type>
<counter_type>0</counter_type>
<short>Idle states</short>
<long>Idle CPU time (percents)</long>
<measure>percents</measure>
</parameter>
<parameter>
<id>counter_cpu_nice_states</id>
<category>counters_vz_cpu</category>
<type>int</type>
<value_type>1</value_type>
<counter_type>0</counter_type>
<short>Nice states</short>
<long>Nice CPU time (percents)</long>
<measure>percents</measure>
</parameter>
<parameter>
<id>counter_cpu_starvation_states</id>
<category>counters_vz_cpu</category>
<type>int</type>
<value_type>1</value_type>
<counter_type>0</counter_type>
<short>Starvation states</short>
<long>Starvation CPU time (Difference between guaranteed CPU time and used CPU time) (percents)</long>
<measure>percents</measure>
</parameter>
<parameter>
<id>counter_cpu_used</id>
<category>counters_vz_cpu</category>
<category>top_counters</category>
<type>float</type>
<value_type>0</value_type>
<counter_type>0</counter_type>
<short>CPU used</short>
<long>Total CPU usage (percents)</long>
<measure>percents</measure>
</parameter>
<parameter>
<id>counter_cpu_share_used</id>
<category>counters_vz_cpu</category>
<category>top_counters</category>
<type>float</type>
<value_type>0</value_type>
<counter_type>0</counter_type>
<short>CPU share used</short>
<long>The ratio of CPU time consumed by environment to current limit (percents)</long>
<measure>percents</measure>
</parameter>
<parameter>
<id>counter_cpu_limit</id>
<category>counters_vz_cpu</category>
<type>float</type>
<value_type>0</value_type>
<counter_type>0</counter_type>
<short>CPU Limit</short>
<long>CPU limit of the share the Environment will get</long>
<measure>percents</measure>
</parameter>
</vocabulary>
<vocabulary>
<name>VZAMigrator</name>
</vocabulary>
<vocabulary>
<name>VZANetworkManager</name>
</vocabulary>
<vocabulary>
<name>VZAOpCompat</name>
</vocabulary>
<vocabulary>
<name>VZAPackageManager</name>
</vocabulary>
<vocabulary>
<name>VZAUp2date</name>
</vocabulary>
<vocabulary>
<name>VZLAlertManager</name>
</vocabulary>
<vocabulary>
<name>VZLAuthEngine</name>
</vocabulary>
<vocabulary>
<name>VZLBackupManager</name>
</vocabulary>
<vocabulary>
<name>VZLServer_group</name>
</vocabulary>
<vocabulary>
<name>VZLDeviceManager</name>
</vocabulary>
<vocabulary>
<name>VZLEnvSampleManager</name>
</vocabulary>
<vocabulary>
<name>VZLFileManager</name>
</vocabulary>
<vocabulary>
<name>VZLLicenseManager</name>
</vocabulary>
<vocabulary>
<name>VZLMigrator</name>
</vocabulary>
<vocabulary>
<name>VZLPackageManager</name>
</vocabulary>
<vocabulary>
<name>VZLResLog</name>
</vocabulary>
<vocabulary>
<name>VZLScheduler</name>
</vocabulary>
<vocabulary>
<name>VZLServiceManager</name>
</vocabulary>
<vocabulary>
<name>vzaproxy</name>
</vocabulary>
<vocabulary>
<name>vzaproxyinsve</name>
</vocabulary>
<vocabulary>
<name>generic</name>
</vocabulary>
</system>
</data>
</packet>