本文整理汇总了Java中com.vmware.vim25.VirtualMachineQuickStats类的典型用法代码示例。如果您正苦于以下问题:Java VirtualMachineQuickStats类的具体用法?Java VirtualMachineQuickStats怎么用?Java VirtualMachineQuickStats使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VirtualMachineQuickStats类属于com.vmware.vim25包,在下文中一共展示了VirtualMachineQuickStats类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import com.vmware.vim25.VirtualMachineQuickStats; //导入依赖的package包/类
public void run() {
VirtualMachineQuickStats vmStats = virtualMachine.getSummary().getQuickStats();
String virtualMachineName = virtualMachine.getName();
virtualMachineName = applyReplacers(virtualMachineName, replacers);
String baseMetricName = baseMetricPath + "|" + "VirtualMachine" + "|" + virtualMachineName;
printMetric(baseMetricName + "|Ballooned Memory", vmStats.getBalloonedMemory());
printMetric(baseMetricName + "|Compressed Memory", vmStats.getCompressedMemory());
printMetric(baseMetricName + "|Overhead Memory Consumed", vmStats.getConsumedOverheadMemory());
printMetric(baseMetricName + "|Distributed CPU Entitlement", vmStats.getDistributedCpuEntitlement());
printMetric(baseMetricName + "|Distributed Memory Entitlement", vmStats.getDistributedMemoryEntitlement());
printMetric(baseMetricName + "|Guest Memory Usage", vmStats.getGuestMemoryUsage());
printMetric(baseMetricName + "|Host Memory Usage", vmStats.getHostMemoryUsage());
printMetric(baseMetricName + "|Overall CPU Usage", vmStats.getOverallCpuUsage());
printMetric(baseMetricName + "|Overall CPU Demand", vmStats.getOverallCpuDemand());
printMetric(baseMetricName + "|Private Memory", vmStats.getPrivateMemory());
printMetric(baseMetricName + "|Shared Memory", vmStats.getSharedMemory());
printMetric(baseMetricName + "|Static CPU Entitlement", vmStats.getStaticCpuEntitlement());
printMetric(baseMetricName + "|Static Memory Entitlement", vmStats.getStaticMemoryEntitlement());
printMetric(baseMetricName + "|Swapped Memory", vmStats.getSwappedMemory());
printMetric(baseMetricName + "|Up Time", vmStats.getUptimeSeconds());
VirtualHardware hardware = virtualMachine.getConfig().getHardware();
printMetric(baseMetricName + "|Memory MB", hardware.getMemoryMB());
printMetric(baseMetricName + "|Num CPU", hardware.getNumCPU());
}