A mechanism is disclosed for virtualizing system statistics in an
operating system environment (OSE) that has been partitioned into a
global zone and one or more non-global zones. The OSE comprises processes
and system resources. Each process is associated with a zone. Each
resource may be associated with a statistical data structure. Statistical
data about a resource is stored in that resource's statistical data
structure. Each statistical data structure is associated with at least
one zone and one or more key values. A process may specify key values.
The kernel may select a set of statistical data structures that are
associated with the process' associated zone. The kernel may return, to
the process, a list of statistical data structures in the set, or
statistical data contained in one of the set's statistical data
structures that matches the process-specified key values.