[virt-tools-list] Virt-top --script problem

Hui Kang hkang at cs.stonybrook.edu
Thu Nov 18 15:57:36 UTC 2010


On 11/18/10 7:48 AM, "Paolo Bonzini" <bonzini at gnu.org> wrote:

> On 11/18/2010 01:03 PM, Richard W.M. Jones wrote:
>> On Thu, Nov 18, 2010 at 12:13:22PM +0100, Paolo Bonzini wrote:
>>> On 11/18/2010 10:56 AM, Richard W.M. Jones wrote:
>>>>>>         snprintf (path, sizeof path,
>>>>>>   -              "/sys/devices/xen-backend/tap-%d-%d/statistics/%s",
>>>>>>   +              "/sys/devices/tap-%d-%d/statistics/%s",
>>>>>>                   domid, device, str);
>>>>>>         r = read_stat (path);
>>>>>>         return r;
>>>>>>   ----------------------------------------------------------------------
>>>> Paolo, is there a correct location for these statistics directories?
>>>> (It would have to work on RHEL 5 as well as upstream Xen).
> 
> It's really sysfs changes, not Xen changes.  Probably what you have now
> wouldn't work in the Novell forward-ported 2.6.32 dom0 kernel, too.
> 
>>> You could try /sys/bus/xen-backend/devices/*.  Hui, do you have that
>>> directory?
>> 
>> Is one of these paths the correct one that we should be using,
>> or should we be searching for all three?
> 
> /sys/bus/xen-backend/devices/* is a symlink in RHEL5 to where you're
> searching now, but it is a "real" directory in newer Linux versions (I'm
> using F14).  So, the possibilities are:
> 
> - Hui reports that /sys/bus/xen-backend/devices works for him.  In that
> case, it is the correct one;

I am using fedora 13 with 2.6.32.24. /sys/bus/xen-backend/devices works for
me. 

- Hui

> 
> - it doesn't work for him, in that case adding the directory I suggested
> is pointless, you can just add the one that works for him.
> 
> Paolo





More information about the virt-tools-list mailing list