[pve-devel] batch migrate : add a optionnal flag to check available memory on target node ?
Alexandre DERUMIER
aderumier at odiso.com
Sat Jan 13 11:45:53 CET 2018
> How is it possible to get stats of targetnode, from sourcenode ? (cluster
> resources api ?)
>># pvesh get /cluster/resources --type node
Thanks Dietmar.
But does I really need to do a run_command('pvesh ...'), parse the json, ...
Isn't it possible to use a perl function to do it ?
maybe PVE::API2Tools::extract_node_stats($node, $members, $rrd) ?
----- Mail original -----
De: "dietmar" <dietmar at proxmox.com>
À: "aderumier" <aderumier at odiso.com>, "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Samedi 13 Janvier 2018 08:30:43
Objet: Re: [pve-devel] batch migrate : add a optionnal flag to check available memory on target node ?
> How is it possible to get stats of targetnode, from sourcenode ? (cluster
> resources api ?)
# pvesh get /cluster/resources --type node
[
{
"cpu" : 0.00540930640914729,
"disk" : 150681653248,
"id" : "node/anode",
"level" : "",
"maxcpu" : 8,
"maxdisk" : 195782651904,
"maxmem" : 8323002368,
"mem" : 1217204224,
"node" : "anode",
"status" : "online",
"type" : "node",
"uptime" : 178538
}
]
More information about the pve-devel
mailing list