Previous Topic: dpmvc getresources Command--Get VM ResourcesNext Topic: dpmvc getsnapshots Command--Get VM Snapshots


dpmvc getshares Command--Get VM Shares

The dpmvc getshares command lets you view how many shares of CPU or memory are allocated to a VM.

This command has the following format:

dpmvc getshares 
[-sc sc_url] {-cpu|-memory} 
-datacenter_name datacentername 
-vm_name vmname 
[-vc_server vcserver] 
[-pre] 
[-post] 
[-ws_user wsuser] 
[-ws_password wspassword] 
[-prompt {yes|no}]
[-locale iso639value]
-sc sc_url

(Optional) Defines the URL for the service controller host.

Example: https://hostname:port/...

hostname

Defines the fully qualified host where the service controller is installed.

Example: localhost.ca.com

port

Defines the listening port for the service controller server.

Example: 80

-cpu|-memory

Displays how many shares of CPU or memory are allocated to a VM. Shares are used to determine which VMs are given more of the available physical resources proportionally to other running VMs. If you allocate more shares to a VM, more physical resources are given to that VM. If you allocate fewer shares to a VM, less physical resources are given to that VM.

-cpu

Specifies that CPU values are being retrieved. Do not use with
-memory.

-memory

Specifies that memory values are being retrieved. Do not use with
-cpu.

-datacenter_name datacentername

Specifies the data center where the VM is located.

-vm_name vmname

Specifies the VM.

-vc_server vcservername

Specifies the vCenter Server to access when you have multiple vCenter Servers. Optional for single vCenter Server environments.

-pre

(Optional) Specifies whether to generate an event before the operation is performed.

-post

(Optional) Specifies whether to generate an event after the operation is performed.

-ws_user wsuser

(Optional) Specifies the web service user name to connect to the VC Platform Management Module (PMM).

-ws_password wspassword

(Optional) Specifies the password for the web service user to connect to the VC Performance Management Module (PMM).

-prompt {yes|no}

(Optional) Specifies whether you are prompted for the web service user ID and password.

Default: Yes

-locale iso639value

(Optional) Specifies an IS0 639_3166 combination to override the default English output, for example, fr_FR for French. To use the locale of the command prompt, specify "native".

Example: Get the CPU Values for a VM

This example retrieves CPU values for usa-vm2.

dpmvc getshares -resource all -datacenter_name MyCity -vm_name usa-vm2 
-vc_server vc_server_1

Example: Get the CPU values for a VM in a Single vCenter Server Environment

This example retrieves CPU values for usa-vm2.

dpmvc getshares -resource all -datacenter_name MyCity -vm_name usa-vm2

Example: Get the Memory Values for a VM using Global Credentials in a Multiple vCenter Server Environment

This example shows getting the individual resource cpulimit for vm uss-vm3.

dpmvc getshares -resource cpulimit -datacenter_name MyCity -vm_name uss-vm3 
-vc_server vc_server_1