vl->host[sizeof (vl->host) - 1] = '\0';
/* Construct the plugin instance field according to PluginInstanceFormat. */
vl->host[sizeof (vl->host) - 1] = '\0';
/* Construct the plugin instance field according to PluginInstanceFormat. */
if (strcasecmp (key, "HostnameFormat") == 0) {
char *value_copy;
char *fields[HF_MAX_FIELDS];
if (strcasecmp (key, "HostnameFormat") == 0) {
char *value_copy;
char *fields[HF_MAX_FIELDS];
if (strcasecmp (fields[i], "hostname") == 0)
hostname_format[i] = hf_hostname;
else if (strcasecmp (fields[i], "name") == 0)
if (strcasecmp (fields[i], "hostname") == 0)
hostname_format[i] = hf_hostname;
else if (strcasecmp (fields[i], "name") == 0)
if (strcasecmp (key, "PluginInstanceFormat") == 0) {
char *value_copy;
char *fields[PLGINST_MAX_FIELDS];
if (strcasecmp (key, "PluginInstanceFormat") == 0) {
char *value_copy;
char *fields[PLGINST_MAX_FIELDS];
if (strcasecmp (fields[i], "none") == 0) {
plugin_instance_format[i] = plginst_none;
break;
if (strcasecmp (fields[i], "none") == 0) {
plugin_instance_format[i] = plginst_none;
break;
fprintf (stderr, "block device %d %s:%s\n",
i, virDomainGetName (block_devices[i].dom),
block_devices[i].path);
fprintf (stderr, "block device %d %s:%s\n",
i, virDomainGetName (block_devices[i].dom),
block_devices[i].path);
fprintf (stderr, "interface device %d %s:%s\n",
i, virDomainGetName (interface_devices[i].dom),
interface_devices[i].path);
#endif
/* Get CPU usage, memory, VCPU usage for each domain. */
fprintf (stderr, "interface device %d %s:%s\n",
i, virDomainGetName (interface_devices[i].dom),
interface_devices[i].path);
#endif
/* Get CPU usage, memory, VCPU usage for each domain. */
vcpu_submit (vinfo[j].cpuTime,
domains[i], vinfo[j].number, "virt_vcpu");
vcpu_submit (vinfo[j].cpuTime,
domains[i], vinfo[j].number, "virt_vcpu");
- status = virDomainMemoryStats (domains[i], minfo, VIR_DOMAIN_MEMORY_STAT_NR, 0);
+ status = virDomainMemoryStats (domains[i], minfo, VIR_DOMAIN_MEMORY_STAT_NR, 0);
struct _virDomainBlockStats stats;
if (virDomainBlockStats (block_devices[i].dom, block_devices[i].path,
struct _virDomainBlockStats stats;
if (virDomainBlockStats (block_devices[i].dom, block_devices[i].path,
virDomainPtr dom = NULL;
const char *name;
char *xml = NULL;
xmlDocPtr xml_doc = NULL;
xmlXPathContextPtr xpath_ctx = NULL;
xmlXPathObjectPtr xpath_obj = NULL;
virDomainPtr dom = NULL;
const char *name;
char *xml = NULL;
xmlDocPtr xml_doc = NULL;
xmlXPathContextPtr xpath_ctx = NULL;
xmlXPathObjectPtr xpath_obj = NULL;
char *path = NULL;
char *address = NULL;
xmlNodePtr xml_interface;
xml_interface = xml_interfaces->nodeTab[j];
if (!xml_interface) continue;
char *path = NULL;
char *address = NULL;
xmlNodePtr xml_interface;
xml_interface = xml_interfaces->nodeTab[j];
if (!xml_interface) continue;
if (child->type != XML_ELEMENT_NODE) continue;
if (xmlStrEqual(child->name, (const xmlChar *) "target")) {
if (child->type != XML_ELEMENT_NODE) continue;
if (xmlStrEqual(child->name, (const xmlChar *) "target")) {
sfree (interface_devices[i].path);
sfree (interface_devices[i].address);
sfree (interface_devices[i].number);
sfree (interface_devices[i].path);
sfree (interface_devices[i].address);
sfree (interface_devices[i].number);