technique built into IBM's POWER processors.
- libvirt
- CPU, disk and network I/O statistics from virtual machines.
+ CPU, memory, disk and network I/O statistics from virtual machines.
- madwifi
Queries very detailed usage statistics from wireless LAN adapters and
} /* void init_value_list */
static void
+memory_submit (unsigned long memory, virDomainPtr dom, const char *type)
+{
+ value_t values[1];
+ value_list_t vl = VALUE_LIST_INIT;
+
+ init_value_list (&vl, dom);
+
+ values[0].gauge = memory;
+
+ vl.values = values;
+ vl.values_len = 1;
+
+ sstrncpy (vl.type, type, sizeof (vl.type));
+
+ plugin_dispatch_values (&vl);
+}
+
+static void
cpu_submit (unsigned long long cpu_time,
virDomainPtr dom, const char *type)
{
interface_devices[i].path);
#endif
- /* Get CPU usage, VCPU usage for each domain. */
+ /* Get CPU usage, memory, VCPU usage for each domain. */
for (i = 0; i < nr_domains; ++i) {
virDomainInfo info;
virVcpuInfoPtr vinfo = NULL;
}
cpu_submit (info.cpuTime, domains[i], "virt_cpu_total");
+ memory_submit (info.memory, domains[i], "memory");
vinfo = malloc (info.nrVirtCpu * sizeof (vinfo[0]));
if (vinfo == NULL) {