private void ComposeGPUData() { m_PGPUs = new List <PGPUInfo>(); var PGPUs = new List <XenAPI.PGPU>(Connection.Cache.PGPUs); PGPUs.Sort(); foreach (XenAPI.PGPU pGpu in PGPUs) { Host host = Connection.Resolve(pGpu.host); if (host == null) { continue; } PCI pci = Connection.Resolve(pGpu.PCI); string temperature = PropertyAccessorHelper.PGPUTemperatureString(pGpu, MetricUpdater); string powerStatus = PropertyAccessorHelper.PGPUPowerUsageString(pGpu, MetricUpdater); string utilisation = PropertyAccessorHelper.PGPUUtilisationString(pGpu, MetricUpdater); string memInfo = PropertyAccessorHelper.PGPUMemoryUsageString(pGpu, MetricUpdater); PGPUInfo buf = new PGPUInfo(pGpu.Name(), pGpu.uuid, host.Name(), pci.pci_id, utilisation, memInfo, temperature, powerStatus); m_PGPUs.Add(buf); } }
private void ComposeGPUData() { m_PGPUs = new List<PGPUInfo>(); var PGPUs = new List<XenAPI.PGPU>(Connection.Cache.PGPUs); PGPUs.Sort(); foreach (XenAPI.PGPU pGpu in PGPUs) { Host host= Connection.Resolve(pGpu.host); if (host == null) continue; PCI pci = Connection.Resolve(pGpu.PCI); string temperature = PropertyAccessorHelper.PGPUTemperatureString(pGpu, MetricUpdater); string powerStatus = PropertyAccessorHelper.PGPUPowerUsageString(pGpu, MetricUpdater); string utilisation = PropertyAccessorHelper.PGPUUtilisationString(pGpu, MetricUpdater); string memInfo = PropertyAccessorHelper.PGPUMemoryUsageString(pGpu, MetricUpdater); PGPUInfo buf = new PGPUInfo(pGpu.Name, pGpu.uuid, host.Name, pci.pci_id, utilisation, memInfo, temperature, powerStatus); m_PGPUs.Add(buf); } }