当前位置: 首页>>代码示例>>Java>>正文


Java VirtualMachineQuickStats类代码示例

本文整理汇总了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());

        }
 
开发者ID:Appdynamics,项目名称:vmware-vsphere-monitoring-extension,代码行数:31,代码来源:VMMetricCollector.java


注:本文中的com.vmware.vim25.VirtualMachineQuickStats类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。