Retrieve Host CPU Usage operation


The Retrieve Host CPU Usage operation enables you to retrieve CPU information and current CPU usage on the specified host system.

The following table describes the elements for the adapter request.

Adapter request elements for the Retrieve Host CPU Usage operation

Element

Definition

Required

<operation-type>

Defines the type of operation: Host

Yes

<operation-name>

Defines the name of operation: Retrieve_Host_CPU_Usage

Yes

<soap-url>

Specifies the URL for the remote SOAP service running on the VMware VirtualCenter

If the <soap-url> element is not specified, the request uses the VirtualCenter Server details specified in the adapter configuration.

Default format for HTTPS: https://<hostName>:<port>/sdk/vim

Default format for HTTP: http://<hostName>:<port>/sdk/vim

Warning

Note

If you want to use an HTTP value, you might need to change the configuration of the VMware Infrastructure application.

No

<transport>

Specifies the transport protocol for the message

If the <transport> element is not provided, the request uses the VirtualCenter Server details specified in the adapter configuration.

Valid values: https-rpc (default), http-rpc

Warning

Note

If the value of the <transport> element is https-rpc, you must install the security certificate for the VMware Virtual Center to the keystore of the peer on which the adapter is enabled.

No

<user-name>

Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center

If no user name is specified, the request is executed with the user name that is specified in the configuration.

No

<password>

Specifies the password corresponding to <user-name>

Conditional; required if <user-name> is specified

<parameters>

Contains the <host-system> element required to execute the operation

Yes

<host-system>

Specifies the DNS name of the host for which you want to retrieve CPU details
This element can contain only string values.

Yes

The following code sample shows the sample adapter request for the Retrieve Host CPU Usage operation.

Sample adapter request for the Retrieve Host CPU Usage operation

<vmware-infrastructure-request>
   <operation-type>Host</operation-type>
   <operation-name>Retrieve_Host_CPU_Usage</operation-name>
   <soap-url></soap-url>
   <transport></transport>
   <user-name></user-name>
   <password></password>
   <parameters>
<host-system>xyz.bmc.com</host-system>
   </parameters>
</vmware-infrastructure-request>

The following code sample shows the response for the sample Retrieve Host CPU Usage operation.

Sample adapter response for the Retrieve Host CPU Usage operation

<vmware-infrastructure-response>
     <metadata>
       <status>success</status>
     </metadata>
     <RetrieveHostCPUUsage>
       <returnval>
         <HostSystem>host-75</HostSystem>
         <propSet>
           <name>hardware.cpuInfo</name>
           <HostCpuInfo>
             <numCpuPackages>2</numCpuPackages>
             <numCpuCores>2</numCpuCores>
             <numCpuThreads>4</numCpuThreads>
             <hz>3591234072</hz>
           </HostCpuInfo>
         </propSet>
         <propSet>
           <name>summary.quickStats.overallCpuUsage</name>
           <hz>17000000</hz>
         </propSet>
       </returnval>
     </RetrieveHostCPUUsage>
</vmware-infrastructure-response>

The following table shows the response elements for the Retrieve Host CPU Usage operation.

Adapter response elements for the Retrieve Host CPU Usage operation

Element

Definition

<HostCPUInfo>

Contains information about the CPUs.

numCpuCores - Number of physical CPU cores on the host

numCpuPackages - Number of physical CPU packages on the host.
numCpuThreads - Number of physical CPU threads on the host.

hz - CPU speed per core
The value of the hz element might be an averaged value if the speed is not uniform across all cores. The total CPU speed of the box is defined as hz * numCpuCores

<overallCpuUsage>

Aggregated CPU usage across all cores on the host, in MHz.

This element is available only if the host is connected.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

TrueSight Orchestration Content 21.02