JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Resource Management, Oracle Solaris Zones, and Oracle Solaris 10 Zones Developer's Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Resource Management in the Oracle Solaris Operating System

2.  Projects and Tasks

3.  Using the C Interface to Extended Accounting

4.  Using the Perl Interface to Extended Accounting

5.  Resource Controls

6.  Resource Pools

7.  Design Considerations for Resource Management Applications in Oracle Solaris Zones

Oracle Solaris Zones Overview

IP Networking in Oracle Solaris Zones

About Applications in Oracle Solaris Zones

General Considerations When Writing Applications for Non-Global Zones

Specific Considerations for Shared-IP Non-Global Zones

Packaging Considerations in solaris Zones

API for Zones Monitoring Statistics

Monitoring Zone File System Activity

Oracle Solaris 10 Zones

8.  Configuration Examples

Index

API for Zones Monitoring Statistics

libzonestat.so.1 is a public API used by the zonestat command to retrieve and compute zone-related resource utilization information, with sorting and filtering options available. The zonestat library reports system wide and per-zone utilization of physical memory, virtual memory, and CPU resources. The zonestat command is documented in the zonestat(1) man page.

libzonestat computes commonly needed values, such as differences between two samples, and percentage used quantities. These statistics eliminate the need for consumers to do complex calculations. In addition to usage of physical resources, libzonestat also reports resource usage relative to each zone's configured resource limits.

The basic usage of libzonestat is as follows:

zs_ctl_t zsctl;
     zs_usage_t usage;

     /* open the statistics facility */
     zsctl = zs_open();

     for (;;) {
             /* read the current usage */
        usage = zs_usage_read(ctl);

        ... Interrogate the usage object for desired information ...
        ...

        if (quit)
            break;

        sleep(some_interval);    
     }
     zs_close(zsctl);

The following man pages, ordered to facilitate usage, describe the library interfaces: