On Thu, Mar 02, 2017 at 11:24:00PM -0300, Marcelo Tosatti wrote:
> On Mon, Feb 27, 2017 at 03:22:56PM +0800, Eli Qiao wrote:
> > Add new virsh command line `nodecachestats` to expose the cache usage
> > on a node.
> 
> Testing:
> 
> Setup: one guest with 3072 bytes reserved for it.
> 
> Test-1: start libvirt with free cache.
> resctrlfs default: L3:0=fffff;1=fffff
> 
> # LD_LIBRARY_PATH=/root/git/libvirt/src/.libs/ ./virshnodegetcachestats
> ret=0 nparams=10
> L3.0: 13824
> L3.1: 13824

The program does:

        ret = virNodeGetCacheStats(conn, ptr, &nparams, 0);
        fprintf(stdout, "ret=%d nparams=%d\n", ret, nparams);
        w = ptr;
        for (i=0; i<nparams; i++) {
                printf("%s: %d\n", w->field, w->value);
                w++;
        }

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to