*unit = "";
return (double)val;
} else if (val < (1024.0l * 1024.0l)) {
- *unit = "KB";
+ *unit = "KiB";
return (((double)val / 1024.0l));
} else if (val < (1024.0l * 1024.0l * 1024.0l)) {
- *unit = "MB";
+ *unit = "MiB";
return (double)val / (1024.0l * 1024.0l);
} else if (val < (1024.0l * 1024.0l * 1024.0l * 1024.0l)) {
- *unit = "GB";
+ *unit = "GiB";
return (double)val / (1024.0l * 1024.0l * 1024.0l);
} else {
- *unit = "TB";
+ *unit = "TiB";
return (double)val / (1024.0l * 1024.0l * 1024.0l * 1024.0l);
}
}
}
if (info.maxMem != UINT_MAX)
- vshPrint(ctl, "%-15s %lu kB\n", _("Max memory:"),
+ vshPrint(ctl, "%-15s %lu KiB\n", _("Max memory:"),
info.maxMem);
else
vshPrint(ctl, "%-15s %s\n", _("Max memory:"),
_("no limit"));
- vshPrint(ctl, "%-15s %lu kB\n", _("Used memory:"),
+ vshPrint(ctl, "%-15s %lu KiB\n", _("Used memory:"),
info.memory);
} else {
memory = 0;
for (cell = 0; cell < nodes_cnt; cell++) {
- vshPrint(ctl, "%5lu: %10llu kB\n", nodes_id[cell],
+ vshPrint(ctl, "%5lu: %10llu KiB\n", nodes_id[cell],
(nodes_free[cell]/1024));
memory += nodes_free[cell];
}
vshPrintExtra(ctl, "--------------------\n");
- vshPrintExtra(ctl, "%5s: %10llu kB\n", _("Total"), memory/1024);
+ vshPrintExtra(ctl, "%5s: %10llu KiB\n", _("Total"), memory/1024);
} else {
if (!cell_given) {
memory = virNodeGetFreeMemory(ctl->conn);
}
if (cell == -1)
- vshPrint(ctl, "%s: %llu kB\n", _("Total"), (memory/1024));
+ vshPrint(ctl, "%s: %llu KiB\n", _("Total"), (memory/1024));
else
- vshPrint(ctl, "%d: %llu kB\n", cell, (memory/1024));
+ vshPrint(ctl, "%d: %llu KiB\n", cell, (memory/1024));
}
func_ret = true;
vshPrint(ctl, "%-20s %d\n", _("Core(s) per socket:"), info.cores);
vshPrint(ctl, "%-20s %d\n", _("Thread(s) per core:"), info.threads);
vshPrint(ctl, "%-20s %d\n", _("NUMA cell(s):"), info.nodes);
- vshPrint(ctl, "%-20s %lu kB\n", _("Memory size:"), info.memory);
+ vshPrint(ctl, "%-20s %lu KiB\n", _("Memory size:"), info.memory);
return true;
}
}
for (i = 0; i < nparams; i++)
- vshPrint(ctl, "%-7s: %20llu kB\n", params[i].field, params[i].value);
+ vshPrint(ctl, "%-7s: %20llu KiB\n", params[i].field, params[i].value);
ret = true;
*/
static const vshCmdInfo info_migrate_setspeed[] = {
{"help", N_("Set the maximum migration bandwidth")},
- {"desc", N_("Set the maximum migration bandwidth (in Mbps) for a domain "
+ {"desc", N_("Set the maximum migration bandwidth (in MiB/s) for a domain "
"which is being migrated to another host.")},
{NULL, NULL}
};
static const vshCmdOptDef opts_migrate_setspeed[] = {
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
- {"bandwidth", VSH_OT_INT, VSH_OFLAG_REQ, N_("migration bandwidth limit in Mbps")},
+ {"bandwidth", VSH_OT_INT, VSH_OFLAG_REQ,
+ N_("migration bandwidth limit in MiB/s")},
{NULL, 0, 0, NULL}
};
*/
static const vshCmdInfo info_migrate_getspeed[] = {
{"help", N_("Get the maximum migration bandwidth")},
- {"desc", N_("Get the maximum migration bandwidth (in Mbps) for a domain.")},
+ {"desc", N_("Get the maximum migration bandwidth (in MiB/s) for a domain.")},
{NULL, NULL}
};
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
{"path", VSH_OT_DATA, VSH_OFLAG_REQ, N_("fully-qualified path of disk")},
{"dest", VSH_OT_DATA, VSH_OFLAG_REQ, N_("path of the copy to create")},
- {"bandwidth", VSH_OT_DATA, VSH_OFLAG_NONE, N_("bandwidth limit in MB/s")},
+ {"bandwidth", VSH_OT_DATA, VSH_OFLAG_NONE, N_("bandwidth limit in MiB/s")},
{"shallow", VSH_OT_BOOL, 0, N_("make the copy share a backing chain")},
{"reuse-external", VSH_OT_BOOL, 0, N_("reuse existing destination")},
{"raw", VSH_OT_BOOL, 0, N_("use raw destination file")},
static const vshCmdOptDef opts_block_pull[] = {
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
{"path", VSH_OT_DATA, VSH_OFLAG_REQ, N_("fully-qualified path of disk")},
- {"bandwidth", VSH_OT_DATA, VSH_OFLAG_NONE, N_("bandwidth limit in MB/s")},
+ {"bandwidth", VSH_OT_DATA, VSH_OFLAG_NONE, N_("bandwidth limit in MiB/s")},
{"base", VSH_OT_DATA, VSH_OFLAG_NONE,
N_("path of backing file in chain for a partial pull")},
{"wait", VSH_OT_BOOL, 0, N_("wait for job to finish")},
{"info", VSH_OT_BOOL, VSH_OFLAG_NONE,
N_("get active job information for the specified disk")},
{"bandwidth", VSH_OT_DATA, VSH_OFLAG_NONE,
- N_("set the Bandwidth limit in MB/s")},
+ N_("set the Bandwidth limit in MiB/s")},
{NULL, 0, 0, NULL}
};
print_job_progress(type, info.end - info.cur, info.end);
if (info.bandwidth != 0)
- vshPrint(ctl, _(" Bandwidth limit: %lu MB/s\n"), info.bandwidth);
+ vshPrint(ctl, _(" Bandwidth limit: %lu MiB/s\n"), info.bandwidth);
return true;
}