Examples of HostHardwareSummary


Examples of com.vmware.vim25.HostHardwareSummary

    // directly from VMware resource pool
    //
    // When we break cluster hosts into individual hosts used in our resource allocator,
    // we will have to populate ComputeResourceSummary by ourselves here
    //
    HostHardwareSummary hardwareSummary = getHostHardwareSummary();

    ComputeResourceSummary resourceSummary = new ComputeResourceSummary();

    // TODO: not sure how hyper-threading is counted in VMware
        resourceSummary.setNumCpuCores(hardwareSummary.getNumCpuCores());

    // Note: memory here is in Byte unit
    resourceSummary.setTotalMemory(hardwareSummary.getMemorySize());

        // Total CPU is based on (# of cores) x Mhz
        int totalCpu = hardwareSummary.getCpuMhz() * hardwareSummary.getNumCpuCores();
    resourceSummary.setTotalCpu(totalCpu);

    HostListSummaryQuickStats stats = getHostQuickStats();
    if(stats.getOverallCpuUsage() == null || stats.getOverallMemoryUsage() == null)
      throw new Exception("Unable to get valid overal CPU/Memory usage data, host may be disconnected");

    resourceSummary.setEffectiveCpu(totalCpu - stats.getOverallCpuUsage());

    // Note effective memory is in MB unit
    resourceSummary.setEffectiveMemory(hardwareSummary.getMemorySize()/(1024*1024) - stats.getOverallMemoryUsage());

      if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - getHyperHostHardwareSummary() done");

    return resourceSummary;
View Full Code Here

Examples of com.vmware.vim25.HostHardwareSummary

    super(context, morType, morValue);
  }
 
  public HostHardwareSummary getHostHardwareSummary() throws Exception {
    HostConnectInfo hostInfo = _context.getService().queryHostConnectionInfo(_mor);
    HostHardwareSummary hardwareSummary = hostInfo.getHost().getHardware();
    return hardwareSummary;
  }
View Full Code Here

Examples of com.vmware.vim25.HostHardwareSummary

      if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - getHyperHostResourceSummary(). target MOR: " + _mor.get_value());
   
    VmwareHypervisorHostResourceSummary summary = new VmwareHypervisorHostResourceSummary();
   
        HostHardwareSummary hardwareSummary = getHostHardwareSummary();
    // TODO: not sure how hyper-thread is counted in VMware resource pool
        summary.setCpuCount(hardwareSummary.getNumCpuCores());
    summary.setMemoryBytes(hardwareSummary.getMemorySize());
    summary.setCpuSpeed(hardwareSummary.getCpuMhz());

      if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - getHyperHostResourceSummary() done");
    return summary;
  }
View Full Code Here

Examples of com.vmware.vim25.HostHardwareSummary

    // directly from VMware resource pool
    //
    // When we break cluster hosts into individual hosts used in our resource allocator,
    // we will have to populate ComputeResourceSummary by ourselves here
    //
    HostHardwareSummary hardwareSummary = getHostHardwareSummary();
   
    ComputeResourceSummary resourceSummary = new ComputeResourceSummary();
   
    // TODO: not sure how hyper-threading is counted in VMware
        resourceSummary.setNumCpuCores(hardwareSummary.getNumCpuCores());
   
    // Note: memory here is in Byte unit
    resourceSummary.setTotalMemory(hardwareSummary.getMemorySize());
   
        // Total CPU is based on (# of cores) x Mhz
        int totalCpu = hardwareSummary.getCpuMhz() * hardwareSummary.getNumCpuCores();
    resourceSummary.setTotalCpu(totalCpu);

    HostListSummaryQuickStats stats = getHostQuickStats();
    if(stats.getOverallCpuUsage() == null || stats.getOverallMemoryUsage() == null)
      throw new Exception("Unable to get valid overal CPU/Memory usage data, host may be disconnected");
   
    resourceSummary.setEffectiveCpu(totalCpu - stats.getOverallCpuUsage());
   
    // Note effective memory is in MB unit
    resourceSummary.setEffectiveMemory(hardwareSummary.getMemorySize()/(1024*1024) - stats.getOverallMemoryUsage());
   
      if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - getHyperHostHardwareSummary() done");
     
    return resourceSummary;
View Full Code Here

Examples of com.vmware.vim25.HostHardwareSummary

        super(context, morType, morValue);
    }

    public HostHardwareSummary getHostHardwareSummary() throws Exception {
        HostConnectInfo hostInfo = _context.getService().queryHostConnectionInfo(_mor);
        HostHardwareSummary hardwareSummary = hostInfo.getHost().getHardware();
        return hardwareSummary;
    }
View Full Code Here

Examples of com.vmware.vim25.HostHardwareSummary

        if (s_logger.isTraceEnabled())
            s_logger.trace("vCenter API trace - getHyperHostResourceSummary(). target MOR: " + _mor.getValue());

        VmwareHypervisorHostResourceSummary summary = new VmwareHypervisorHostResourceSummary();

        HostHardwareSummary hardwareSummary = getHostHardwareSummary();
        // TODO: not sure how hyper-thread is counted in VMware resource pool
        summary.setCpuCount(hardwareSummary.getNumCpuThreads());
        summary.setMemoryBytes(hardwareSummary.getMemorySize());
        summary.setCpuSpeed(hardwareSummary.getCpuMhz());
        summary.setCpuSockets((int)hardwareSummary.getNumCpuPkgs());

        if (s_logger.isTraceEnabled())
            s_logger.trace("vCenter API trace - getHyperHostResourceSummary() done");
        return summary;
    }
View Full Code Here

Examples of com.vmware.vim25.HostHardwareSummary

        // directly from VMware resource pool
        //
        // When we break cluster hosts into individual hosts used in our resource allocator,
        // we will have to populate ComputeResourceSummary by ourselves here
        //
        HostHardwareSummary hardwareSummary = getHostHardwareSummary();

        ComputeResourceSummary resourceSummary = new ComputeResourceSummary();

        // TODO: not sure how hyper-threading is counted in VMware
        resourceSummary.setNumCpuCores(hardwareSummary.getNumCpuCores());

        // Note: memory here is in Byte unit
        resourceSummary.setTotalMemory(hardwareSummary.getMemorySize());

        // Total CPU is based on (# of cores) x Mhz
        int totalCpu = hardwareSummary.getCpuMhz() * hardwareSummary.getNumCpuCores();
        resourceSummary.setTotalCpu(totalCpu);

        HostListSummaryQuickStats stats = getHostQuickStats();
        if (stats.getOverallCpuUsage() == null || stats.getOverallMemoryUsage() == null)
            throw new Exception("Unable to get valid overal CPU/Memory usage data, host may be disconnected");

        resourceSummary.setEffectiveCpu(totalCpu - stats.getOverallCpuUsage());

        // Note effective memory is in MB unit
        resourceSummary.setEffectiveMemory(hardwareSummary.getMemorySize() / (1024 * 1024) - stats.getOverallMemoryUsage());

        if (s_logger.isTraceEnabled())
            s_logger.trace("vCenter API trace - getHyperHostHardwareSummary() done");

        return resourceSummary;
View Full Code Here

Examples of com.vmware.vim25.HostHardwareSummary

    super(context, morType, morValue);
  }

  public HostHardwareSummary getHostHardwareSummary() throws Exception {
    HostConnectInfo hostInfo = _context.getService().queryHostConnectionInfo(_mor);
    HostHardwareSummary hardwareSummary = hostInfo.getHost().getHardware();
    return hardwareSummary;
  }
View Full Code Here

Examples of com.vmware.vim25.HostHardwareSummary

      if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - getHyperHostResourceSummary(). target MOR: " + _mor.getValue());

    VmwareHypervisorHostResourceSummary summary = new VmwareHypervisorHostResourceSummary();

        HostHardwareSummary hardwareSummary = getHostHardwareSummary();
    // TODO: not sure how hyper-thread is counted in VMware resource pool
        summary.setCpuCount(hardwareSummary.getNumCpuThreads());
    summary.setMemoryBytes(hardwareSummary.getMemorySize());
    summary.setCpuSpeed(hardwareSummary.getCpuMhz());
        summary.setCpuSockets((int)hardwareSummary.getNumCpuPkgs());

      if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - getHyperHostResourceSummary() done");
    return summary;
  }
View Full Code Here

Examples of com.vmware.vim25.HostHardwareSummary

    // directly from VMware resource pool
    //
    // When we break cluster hosts into individual hosts used in our resource allocator,
    // we will have to populate ComputeResourceSummary by ourselves here
    //
    HostHardwareSummary hardwareSummary = getHostHardwareSummary();

    ComputeResourceSummary resourceSummary = new ComputeResourceSummary();

    // TODO: not sure how hyper-threading is counted in VMware
        resourceSummary.setNumCpuCores(hardwareSummary.getNumCpuCores());

    // Note: memory here is in Byte unit
    resourceSummary.setTotalMemory(hardwareSummary.getMemorySize());

        // Total CPU is based on (# of cores) x Mhz
        int totalCpu = hardwareSummary.getCpuMhz() * hardwareSummary.getNumCpuCores();
    resourceSummary.setTotalCpu(totalCpu);

    HostListSummaryQuickStats stats = getHostQuickStats();
    if(stats.getOverallCpuUsage() == null || stats.getOverallMemoryUsage() == null)
      throw new Exception("Unable to get valid overal CPU/Memory usage data, host may be disconnected");

    resourceSummary.setEffectiveCpu(totalCpu - stats.getOverallCpuUsage());

    // Note effective memory is in MB unit
    resourceSummary.setEffectiveMemory(hardwareSummary.getMemorySize()/(1024*1024) - stats.getOverallMemoryUsage());

      if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - getHyperHostHardwareSummary() done");

    return resourceSummary;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.