Hi Folks, Recently, I noticed that xentop stopped showing Domain-0''s CPU utilization and other stats. First, is that the intended behavior for some reason? Assuming its not, am I the only one observing this issue? I dug into the source code a bit and traced the problem to the xenstat_get_domain_name() function, which essentially finds the name of a domain by reading some values from xenstore. But this function fails for Domain-0, and therefore xenstat_get_node() ignore Domain-0''s stats. In particular, "/local/domain/0/vm" does not exist for Domain-0 while it does for all other domains. I am not an expert on what/how values are stored in xenstore. But is there a reason why such a convoluted logic is used to determine a domain''s name? Why not just read the value in "/local/domain/domain_id/name"? I did exactly that and now I can see Domain-0''s stats in xentop. Is this a bug? If so, I can submit a patch. Thanks. --Kaushik
On Thu, 2012-03-08 at 18:06 -0500, Kaushik Kumar Ram wrote:> Hi Folks, > > Recently, I noticed that xentop stopped showing Domain-0''s CPU > utilization and other stats. > > First, is that the intended behavior for some reason? Assuming its > not, am I the only one observing this issue? > > I dug into the source code a bit and traced the problem to the > xenstat_get_domain_name() function, which essentially finds the name > of a domain by reading some values from xenstore. But this function > fails for Domain-0, and therefore xenstat_get_node() ignore Domain-0''s > stats. > In particular, "/local/domain/0/vm" does not exist for Domain-0 while > it does for all other domains. > > I am not an expert on what/how values are stored in xenstore. But is > there a reason why such a convoluted logic is used to determine a > domain''s name? Why not just read the value in > "/local/domain/domain_id/name"? > > I did exactly that and now I can see Domain-0''s stats in xentop. > > Is this a bug? If so, I can submit a patch.I think it is a bug. It was discussed before at http://lists.xen.org/archives/html/xen-devel/2011-11/msg00579.html Looks like IanJ intended to apply the patch (http://lists.xen.org/archives/html/xen-devel/2011-11/msg01486.html) but I guess it got dropped. I''ve CC''d him now> > Thanks. > > --Kaushik > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
Ian Campbell writes ("Re: [Xen-devel] Xentop - Domain-0 statistics"):> Looks like IanJ intended to apply the patch > (http://lists.xen.org/archives/html/xen-devel/2011-11/msg01486.html) but > I guess it got dropped. I''ve CC''d him nowThanks, yes. I will apply it (assuming it still fits...) Ian.
Ian Campbell writes ("Re: [Xen-devel] Xentop - Domain-0 statistics"):> Looks like IanJ intended to apply the patch > (http://lists.xen.org/archives/html/xen-devel/2011-11/msg01486.html) butDaniel De Graaf writes ("[Xen-devel] [PATCH 2/2] xenstat: Use local domain names"):> The domain name stored in /local/domain/$domid/name is simpler to > access and is the only domain name modified by "xl rename". Use this > domain name in libxenstat''s reporting.Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com> Thanks, Ian.