richard.wong.com wrote:
> [...] Are there any simple or straightforward tests I could try to
> verify that the metrics I get from subsequent fetches are indeed
> container metrics and not host metrics?
One heuristic is to check pmcd.hostname. That will generally vary
between the host and each container. Another one could be to check a
cgroup.* metric. When polled from a containery context, the
instance-domain is implicitly restricted to the container's own
cgroups; when polled from host context, it's the full indom.
> So far using pmchart, I notice that the values of some metrics will
> be the same given a plain hostspec, a hostspec with a valid
> container,
Yes, this could be for a variety of reasons. One is that not all
pmdas have been converted to container-aware operation; another is
that the kernel does not virtualize all of its state to be
container-specific. (I don't know of a recorded pcp bug to track
progress on the former; there should be.)
> and a hostspec with a container which does not exist.
That is a bug: http://oss.sgi.com/bugzilla/show_bug.cgi?id=1111
- FChE
|