How to get the available and used value of memory and cpu of every Virtual machine in Opennebula 5.0.2 using XML-RPC?

I want to get the values of cpu and memory usage. How to get those data?

I do not know!
I need values of custom vars and sugest my personal solution :

install onecontext from

and put your interesting information:

#old style
#echo “curl -k -X “PUT” $ONEGATE_ENDPOINT/vm --header “X-ONEGATE-TOKEN: $TOKENTXT” --header “X-ONEGATE-VMID: $VMID” --data-binary @$TMP_DIR/metrics”

#new style
echo "onegate vm update $VMID --data cat $TMP_DIR/metrics"

Some explain information at

The XML-RPC call is You’ll get an xml with all the VM information in XML form. To get a example of this XML data you can use the command:

$ onevm show -x <vmid>