PSARC 2010/291: zonestat

An interesting ARC case found it’s way into the case log: Stephen Lawrence proposed the zonestat to the architecture review comitee. This feature consists out of two components. The zonestatd and the zonestat command. Stephen writes about the zonestatd:

A new smf service svc:/system/zones-monitoring:default will execute a zones monitoring daemon. This daemon will implement monitoring the system configuration, managing extended accounting, and computing memory utilization on behalf of clients.

This zonestatd is queried by the zonestat command to deliver data about the resource utilization of zones.

# zonestat 5 1
    SUMMARY
                        -----CPU------------- ----PHYSICAL--- ----VIRTUAL----
                   ZONE USED %PART %CAP %SHRU USED  PCT  %CAP  USED  PCT %CAP
                [total] 9.74   30%    -     - 7576M  23%    - 11.6G  24%    -
               [system] 0.28  0.8%    -     - 6535M  19%    - 10.4G  21%    -
                 global 9.10   28%    -     -  272M 0.8%    -  366M 0.7%    -
              kodiak-ab 0.32  1.0%    -     -  256M 0.7%    -  265M 0.5%    -
             kodiak-rie 0.00  0.0%    -     - 22.7M 0.0%    - 49.4M 0.1%    -

Due to the implementation with a daemonized part, you can even tell the daemon to compute a report about the utilization in certain intervals:

# zonestat -p -r memory -q -R average,high 30s 24h 1h

Please read Stephens case document for for more information.