}
/*
- * "hostkey" command
+ * "hostname" command
*/
static const vshCmdInfo info_hostname[] = {
{"help", N_("print the hypervisor hostname")},
return TRUE;
}
+/*
+ * "sysinfo" command
+ */
+static const vshCmdInfo info_sysinfo[] = {
+ {"help", N_("print the hypervisor sysinfo")},
+ {"desc",
+ N_("output an XML string for the hypervisor sysinfo, if available")},
+ {NULL, NULL}
+};
+
+static int
+cmdSysinfo (vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
+{
+ char *sysinfo;
+
+ if (!vshConnectionUsability(ctl, ctl->conn))
+ return FALSE;
+
+ sysinfo = virConnectGetSysinfo (ctl->conn, 0);
+ if (sysinfo == NULL) {
+ vshError(ctl, "%s", _("failed to get sysinfo"));
+ return FALSE;
+ }
+
+ vshPrint (ctl, "%s", sysinfo);
+ VIR_FREE(sysinfo);
+
+ return TRUE;
+}
+
/*
* "vncdisplay" command
*/
{"hostname", cmdHostname, NULL, info_hostname},
{"nodeinfo", cmdNodeinfo, NULL, info_nodeinfo},
{"qemu-monitor-command", cmdQemuMonitorCommand, opts_qemu_monitor_command, info_qemu_monitor_command},
+ {"sysinfo", cmdSysinfo, NULL, info_sysinfo},
{"uri", cmdURI, NULL, info_uri},
{NULL, NULL, NULL, NULL}
};
freecell NUMA free memory
hostname print the hypervisor hostname
qemu-monitor-command Qemu Monitor Command
+ sysinfo print the hypervisor sysinfo
uri print the hypervisor canonical URI
To display detailed information for a specific command, give its name as the
Print the hypervisor hostname.
+=item B<sysinfo>
+
+Print the XML representation of the hypervisor sysinfo, if available.
+
=item B<nodeinfo>
Returns basic information about the node, like number and type of CPU,