Home > other >  Using libvirt JAVA API access KVM memory data errors
Using libvirt JAVA API access KVM memory data errors

Time:10-04

Using libvirt JAVA API access to the remote host on KVM memory data, test multiple KVM showed memory utilization in 100%, and the horizontal low constant,
The Java API (http://libvirt.org/sources/java/javadoc/) : :
CLASS: DomainInfo
Field:
Long maxMem
The maximum memory in KBytes allowed
Long memory
The memory in KBytes 2 by the domain

Code:
 Domain currentDomain; 
CurrentDomain=kVMConnect. DomainLookupByName ((String) kvmList. GetSelectedValue ());
DomainInfo dinfo=currentDomain. GetInfo ();
System. The out. Println (" charges: Memory "+ dinfo. MaxMem +" \ n ");
System. The out. Println (" informs the Memory: "+ dinfo. Memory +" \ n ");


Output:
Allowed the Memory: 2048000
Informs the Memory: 2048000

Ps: the utilization rate of 100%,

CodePudding user response:

I also encountered the same problem, please help!

CodePudding user response:

And I also encountered this problem, the request
  • Related