vm_usage.h revision 0209230bf1261579beab4f55226bb509e6b850cb
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_VM_USAGE_H
#define _SYS_VM_USAGE_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
*
* If VMUSAGE_ALL_* or VMUSAGE_COL_* are passed from a non-global-zone, the
* flag is treated as VMUSAGE_*. For example, VMUSAGE_ALL_ZONES would be
* treated as VMUSAGE_ZONE.
*
* If VMUSAGE_SYSTEM is passed from a non-global zone, a result of type
* VMUSAGE_SYSTEM will be returned, but it will only reflect the usage
* of the calling zone.
*
* VMUSAGE_* requests results for the calling zone.
* VMUSAGE_ALL_* requests results for all zones.
* VMUSAGE_COL_* requests results for all zones, but collapses out the zoneid.
* For example, VMUSAGE_COL_PROJECTS requests results for all
* projects in all zones, and project N in ANY zone is treated
* as the same project.
*/
/* caller's zone */
/* caller's zones */
/* ruser) in the caller's zone */
/* euser */
/* all zones */
/* zones */
/* ruser) in all zones */
/* euser */
/* all zones. Collapse zoneid. */
/* ruser), in all zones. Collapse */
/* zoneid */
/* euser */
typedef struct vmusage {
/* VMUSAGE_COL_* results */
/* ALL_ZONES means that the result */
/* reflects swap and rss usage for */
/* VMUSAGE_(SYSTEM|ZONE|PROJECTS| */
/* TASKS|RUSERS|EUSERS) */
/* in bytes */
} vmusage_t;
#ifdef _KERNEL
void vm_usage_init();
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_VM_USAGE_H */