[PVE-User] pvesh get current status and cpu value

Daniel Berteaud daniel at firewall-services.com
Mon Jun 4 10:48:24 CEST 2018



Le 04/06/2018 à 06:31, Dietmar Maurer a écrit :
>> Its complicated why this is 0, in short cpu usage is a counter its hard
>> to calculate actual usage in % without history data.
>>
>> /cluster/resources uses pvestatd which calculates that,
>> /nodes/{node}/(qemu|lxc)/status/current doesn't.
> Yes, this is probably the best workaround.

And it's  what I'm doing now, which is working great. Thanks to both of you

>  Please note that
> pvesh is mostly a debugging tool. 

Well, maybe it was designed as a debugging tool, but it perfectly fit my
needs. I needed JSON output of some elements, without having to deal
with authentication (especially without having to store cleartext
passwords somewhere)

> But we are working on a
> full feature API client tool, which provides about the same
> functionality, but queries the API daemon instead. This will
> then compute such values correctly.


I'll check this tool when it's available :-)

++

-- 

Logo FWS

	*Daniel Berteaud*

FIREWALL-SERVICES SAS.
Société de Services en Logiciels Libres
Tel : 05 56 64 15 32 <tel:0556641532>
Matrix: @dani:fws.fr
/www.firewall-services.com/




More information about the pve-user mailing list