@Sample(name="print-counters",
description="This sample writes available VM, Hostsystem or ResourcePool perf counters into the file specified")
public class PrintCounters
extends ConnectedVimServiceBase
PrintCounters
This sample writes available VM, Hostsystem or ResourcePool
perf counters into the file specified
Parameters:
url [required] : url of the web service
username [required] : username for the authentication
password [required] : password for the authentication
entitytype [required] : Managed entity
[HostSystem|VirtualMachine|ResourcePool]
entityname [required] : name of the managed entity
filename [required] : Full path of filename to write to
Command Line:
Save counters available for a host
run.bat com.vmware.performance.PrintCounters
--url https://myHost.com/sdk
--username [user] --password [password] --entitytype HostSystem
--entityname myHost.com --filename myHostCounters
ConnectedVimServiceBase.ConnectionExceptionPROP_ME_NAME, SVC_INST_NAME| Constructor and Description |
|---|
PrintCounters() |
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
void |
setEntityname(java.lang.String entityname) |
void |
setEntitytype(java.lang.String entitytype) |
void |
setFilename(java.lang.String filename) |
basicConnectionFromConnection, connect, disconnect, getServiceInstanceReference, setConnection, setHostConnection@Option(name="entitytype",
description="Managed entity [HostSystem|VirtualMachine|ResourcePool]")
public void setEntitytype(java.lang.String entitytype)
@Option(name="entityname",
description="name of the managed entity")
public void setEntityname(java.lang.String entityname)
@Option(name="filename",
description="Full path of filename to write to")
public void setFilename(java.lang.String filename)
@Action
public void run()
throws com.vmware.vim25.RuntimeFaultFaultMsg,
java.io.IOException,
com.vmware.vim25.InvalidPropertyFaultMsg
com.vmware.vim25.RuntimeFaultFaultMsgjava.io.IOExceptioncom.vmware.vim25.InvalidPropertyFaultMsg