summaryrefslogtreecommitdiff
path: root/usr/src/man/man3perl
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/man/man3perl')
-rw-r--r--usr/src/man/man3perl/Exacct.3perl351
-rw-r--r--usr/src/man/man3perl/Exacct::Catalog.3perl234
-rw-r--r--usr/src/man/man3perl/Exacct::File.3perl246
-rw-r--r--usr/src/man/man3perl/Exacct::Object.3perl216
-rw-r--r--usr/src/man/man3perl/Exacct::Object::Group.3perl123
-rw-r--r--usr/src/man/man3perl/Exacct::Object::Item.3perl108
-rw-r--r--usr/src/man/man3perl/Kstat.3perl171
-rw-r--r--usr/src/man/man3perl/Lgrp.3perl1170
-rw-r--r--usr/src/man/man3perl/Makefile52
-rw-r--r--usr/src/man/man3perl/Privilege.3perl332
-rw-r--r--usr/src/man/man3perl/Project.3perl277
-rw-r--r--usr/src/man/man3perl/Task.3perl118
-rw-r--r--usr/src/man/man3perl/Ucred.3perl256
13 files changed, 3654 insertions, 0 deletions
diff --git a/usr/src/man/man3perl/Exacct.3perl b/usr/src/man/man3perl/Exacct.3perl
new file mode 100644
index 0000000000..c0fd1cb75b
--- /dev/null
+++ b/usr/src/man/man3perl/Exacct.3perl
@@ -0,0 +1,351 @@
+'\" te
+.\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved.
+.\" 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 or http://www.opensolaris.org/os/licensing. 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]
+.TH Exacct 3PERL "1 Dec 2002" "SunOS 5.11" "Perl Library Functions"
+.SH NAME
+Exacct \- exacct system calls and error handling
+.SH SYNOPSIS
+.LP
+.nf
+use Sun::Solaris::Exacct qw(:EXACCT_ALL);
+my $ea_rec = getacct(P_PID, $$);
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+This module provides access to the \fBea_error\fR(3EXACCT) function and for all
+the extended accounting system calls. Constants from the various
+\fBlibexacct\fR(3LIB) header files are also provided.
+.SS "Constants"
+.sp
+.LP
+The \fBP_PID\fR, \fBP_TASKID\fR, \fBP_PROJID\fR and all the \fBEW_*\fR,
+\fBEP_*\fR, \fBEXR_*\fR macros are provided as Perl constants.
+.SS "Functions"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetacct($idtype, $id)\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fB$idtype\fR parameter must be either \fBP_TASKID\fR or \fBP_PID\fR and
+\fB$id\fR must be a corresponding task or process ID. This function returns an
+object of type \fBSun::Solaris::Exacct::Object\fR, representing the unpacked
+accounting buffer returned by the underlying \fBgetacct\fR(2) system call. In
+the event of error, \fBundef\fR is returned.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBputacct($idtype, $id, $record)\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fB$idtype\fR parameter must be either \fBP_TASKID\fR or \fBP_PID\fR and
+\fB$id\fR must be a corresponding task or process ID. If $record is of type
+Sun::Solaris::Exacct::Object, it is converted to the corresponding packed
+\fBlibexacct\fR object and passed to the \fBputacct\fR(2) system call. If
+\fB$record\fR is not of type \fBSun::Solaris::Exacct::Object\fR it is converted
+to a string using the normal Perl conversion rules and stored as a raw buffer.
+For predictable and endian-independent results, any raw buffers should be
+constructed using the Perl \fBpack()\fR function. This function returns true on
+success and false on failure.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwracct($idtype, $id, $flags)\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fB$idtype\fR parameter must be either \fBP_TASKID\fR or \fBP_PID\fR and
+\fB$id\fR must be a corresponding task or process ID. The \fB$flags\fR
+parameter must be either \fBEW_INTERVAL\fR or \fBEW_PARTIAL\fR. The parameters
+are passed directly to the underlying \fBwracct\fR(2) system call. This
+function returns true on success and false on failure.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBea_error()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function provides access to the \fBea_error\fR(3EXACCT) function. It
+returns a double-typed scalar that becomes one of the EXR_* constants. In a
+string context it becomes a descriptive error message. This is the exacct
+equivalent to the \fB$!(errno)\fR Perl variable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBea_error_str()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns a double-typed scalar that in a numeric context will be
+one of the EXR_* constants as returned by ea_error. In a string context it
+describes the value returned by ea_error. If ea_error returns EXR_SYSCALL_FAIL,
+the string value returned is the value returned by \fBstrerror\fR(3C). This
+function is provided as a convenience so that repeated blocks of code like the
+following can be avoided:
+.sp
+.in +2
+.nf
+if (ea_error() == EXR_SYSCALL_FAIL) {
+ print("error: $!\en");
+} else {
+ print("error: ", ea_error(), "\en");
+}
+.fi
+.in -2
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBea_register_catalog($cat_pfx, $catalog_id, $export, @idlist)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This convenience function is a wrapper around the
+\fBSun::Solaris::Exacct::Catalog->register()\fR method.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBea_new_catalog($integer)\fR\fR
+.ad
+.br
+.na
+\fB\fBea_new_catalog($cat_obj)\fR\fR
+.ad
+.br
+.na
+\fB\fBea_new_catalog($type, $catalog, $id)\fR\fR
+.ad
+.sp .6
+.RS 4n
+These convenience functions are wrappers around the
+\fBSun::Solaris::Exacct::Catalog->new()\fR method. See
+\fBExacct::Catalog\fR(3PERL).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBea_new_file($name, $oflags, creator => $creator, aflags => $aflags, mode
+=> $mode)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This convenience function is a wrapper around the
+\fBSun::Solaris::Exacct::File->new()\fR method. See \fBExacct::File\fR(3PERL).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBea_new_item($catalog, $value)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This convenience function is a wrapper around the
+\fBSun::Solaris::Exacct::Object::Item->new()\fR method. See
+\fBExacct::Object::Item\fR(3PERL).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBea_new_group($catalog, @objects)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This convenience function is a wrapper around the
+\fBSun::Solaris::Exacct::Object::Group->new()\fR method. See
+\fBExacct::Object::Group\fR(3PERL).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBea_dump_object($object, $filehandle)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This convenience function is a wrapper around the
+\fBSun::Solaris::Exacct::Object->dump()\fR method. See
+\fBExacct::Object\fR(3PERL).
+.RE
+
+.SS "Class methods"
+.sp
+.LP
+None.
+.SS "Object methods"
+.sp
+.LP
+None.
+.SS "Exports"
+.sp
+.LP
+By default nothing is exported from this module. The following tags can be used
+to selectively import constants and functions defined in this module:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:SYSCALLS\fR\fR
+.ad
+.RS 21n
+.rt
+\fBgetacct()\fR, \fBputacct()\fR, and \fBwracct()\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:LIBCALLS\fR\fR
+.ad
+.RS 21n
+.rt
+\fBea_error()\fR and \fBea_error_str()\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:CONSTANTS\fR\fR
+.ad
+.RS 21n
+.rt
+\fBP_PID\fR, \fBP_TASKID\fR, \fBP_PROJID\fR, \fBEW_*\fR, \fBEP_*\fR, and
+\fBEXR_*\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:SHORTHAND\fR\fR
+.ad
+.RS 21n
+.rt
+\fBea_register_catalog()\fR, \fBea_new_catalog()\fR, \fBea_new_file()\fR,
+\fBea_new_item()\fR, and \fBea_new_group()\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:ALL\fR\fR
+.ad
+.RS 21n
+.rt
+\fB:SYSCALLS\fR, \fB:LIBCALLS\fR, \fB:CONSTANTS\fR, and \fB:SHORTHAND\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:EXACCT_CONSTANTS\fR\fR
+.ad
+.RS 21n
+.rt
+\fB:CONSTANTS\fR, plus the \fB:CONSTANTS\fR tags for
+\fBSun::Solaris::Catalog\fR, \fBSun::Solaris::File\fR, and
+\fBSun::Solaris::Object\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:EXACCT_ALL\fR\fR
+.ad
+.RS 21n
+.rt
+\fB:ALL\fR, plus the \fB:ALL\fR tags for \fBSun::Solaris::Catalog\fR,
+\fBSun::Solaris::File\fR, and \fBSun::Solaris::Object\fR
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBgetacct\fR(2), \fBputacct\fR(2), \fBwracct\fR(2), \fBea_error\fR(3EXACCT),
+\fBExacct::Catalog\fR(3PERL), \fBExacct::File\fR(3PERL),
+\fBExacct::Object\fR(3PERL), \fBExacct::Object::Group\fR(3PERL),
+\fBExacct::Object::Item\fR(3PERL), \fBlibexacct\fR(3LIB), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The modules described in the section 3PERL manual pages make extensive use of
+the Perl "double-typed scalar" facility. This facility allows a scalar value to
+behave either as an integer or as a string, depending upon context. It is the
+same behavior as exhibited by the \fB$!\fR Perl variable (\fBerrno\fR). It is
+useful because it avoids the need to map from an integer value to the
+corresponding string to display a value. Some examples are provided below:
+.sp
+.in +2
+.nf
+# Assume $obj is a Sun::Solaris::Item
+my $type = $obj->type();
+
+# Print "2 EO_ITEM"
+printf("%d %s\en", $type, $type);
+
+# Behave as an integer, $i == 2
+my $i = 0 + $type;
+
+# Behave as a string, $s = "abc EO_ITEM xyx"
+my $s = "abc $type xyz";
+.fi
+.in -2
+
+.sp
+.LP
+Wherever a function or method is documented as returning a double-typed scalar,
+the returned value exhibits this type of behavior.
diff --git a/usr/src/man/man3perl/Exacct::Catalog.3perl b/usr/src/man/man3perl/Exacct::Catalog.3perl
new file mode 100644
index 0000000000..be7a09cbe9
--- /dev/null
+++ b/usr/src/man/man3perl/Exacct::Catalog.3perl
@@ -0,0 +1,234 @@
+'\" te
+.\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved.
+.\" 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 or http://www.opensolaris.org/os/licensing. 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]
+.TH Exacct::Catalog 3PERL "1 Dec 2002" "SunOS 5.11" "Perl Library Functions"
+.SH NAME
+Exacct::Catalog \- exacct catalog tag manipulation
+.SH SYNOPSIS
+.LP
+.nf
+use Sun::Solaris::Exacct::Catalog qw(:ALL);
+my $ea_cat = Sun::Solaris::Exacct::Catalog->new(
+ &EXT_UINT64 | &EXC_DEFAULT | &EXD_PROC_PID);
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+This class provides a wrapper around the 32-bit integer used as a catalog tag.
+The catalog tag is represented as a Perl object blessed into the
+\fBSun::Solaris::Exacct::Catalog\fR class so that methods can be used to
+manipulate fields in a catalog tag.
+.SS "Constants"
+.sp
+.LP
+All the \fBEXT_\fR*, \fBEXC_\fR*, and \fBEXD_\fR* macros are provided as
+constants. Constants passed to the methods below can either be the integer
+value such as \fBEXT_UINT8\fR or the string representation such as
+"\fBEXT_UINT8\fR".
+.SS "Functions"
+.sp
+.LP
+None.
+.SS "Class methods"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBregister($cat_pfx, $catalog_id, $export, @idlist)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This method is used to register application-defined \fBlibexacct\fR(3LIB)
+catalogs with the exacct Perl library. See
+<\fB/usr/include/sys/exacct_catalog.h\fR> for details of the catalog tag
+format. This method allows symbolic names and strings to be used for
+manipulating application-defined catalogs. The first two parameters define the
+catalog prefix and associated numeric catalog ID. If the \fB$export\fR
+parameter is true, the constants are exported into the caller's package. The
+final parameter is a list of (\fBid\fR, \fBname\fR) pairs that identify the
+required constants. The constants created by this method are formed by
+appending \fB$cat_pfx\fR and "_" to each name in the list, replacing any spaces
+with underscore characters and converting the resulting string to uppercase
+characters. The \fB$catalog_name\fR value is also created as a constant by
+prefixing it with\fB EXC_\fR and converting it to uppercase characters. Its
+value becomes that of \fB$catalog_id\fR shifted left by 24 bits. For example,
+the following call:
+.sp
+.in +2
+.nf
+Sun::Solaris::Exacct::Catalog->ea_register("MYCAT", 0x01, 1,
+ FIRST => 0x00000001, SECOND => 0x00000010);
+.fi
+.in -2
+
+results in the definition of the following constants:
+.sp
+.in +2
+.nf
+EXC_MYCAT 0x01 << 24
+MYCAT_FIRST 0x00000001
+MYCAT_SECOND 0x00000010
+.fi
+.in -2
+
+Only the catalog ID value of 0x01 is available for application use
+(\fBEXC_LOCAL\fR). All other values are reserved. While it is possible to use
+values other than 0x01, they might conflict with future extensions to the
+\fBlibexacct\fR file format.
+.sp
+If any errors are detected during this method, a string is returned containing
+the appropriate error message. If the call is sucessful, \fBundef\fR is
+returned.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnew($integer)\fR\fR
+.ad
+.br
+.na
+\fB\fBnew($cat_obj)\fR\fR
+.ad
+.br
+.na
+\fB\fBnew($type, $catalog, $id)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This method creates and returns a new Catalog object, which is a wrapper around
+a 32-bit integer catalog tag. Three possible argument lists can be given. The
+first variant is to pass an integer formed by bitwise-inclusive OR of the
+appropriate \fBEX[TCD]_\fR* constants. The second variant is to pass an
+existing Catalog object that will be copied. The final variant is to pass in
+the type, catalog and ID fields as separate values. Each of these values can be
+either an appropriate integer constant or the string representation of the
+constant.
+.RE
+
+.SS "Object methods"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBvalue()\fR\fR
+.ad
+.RS 17n
+.rt
+This method allows the value of the catalog tag to be queried. In a scalar
+context it returns the 32-bit integer representing the tag. In a list context
+it returns a (\fBtype\fR, \fBcatalog\fR, \fBid\fR) triplet, where each member
+of the triplet is a dual-typed scalar.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtype()\fR\fR
+.ad
+.RS 17n
+.rt
+This method returns the type field of the catalog tag as a dual-typed scalar.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcatalog()\fR\fR
+.ad
+.RS 17n
+.rt
+This method returns the catalog field of the catalog tag as a dual-typed
+scalar.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBid()\fR\fR
+.ad
+.RS 17n
+.rt
+This method returns the id field of the catalog tag as a dual-typed scalar.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtype_str()\fR\fR
+.ad
+.br
+.na
+\fB\fBcatalog_str()\fR\fR
+.ad
+.br
+.na
+\fB\fBid_str()\fR\fR
+.ad
+.RS 17n
+.rt
+These methods return string representations of the appropriate value. These
+methods can be used for textual output of the various catalog fields. The
+string representations of the constants are formed by removing the \fBEXT_\fR,
+\fBEXC_\fR, or \fBEXD_\fR prefix, replacing any underscore characters with
+spaces, and converting the remaining string to lowercase characters.
+.RE
+
+.SS "Exports"
+.sp
+.LP
+By default nothing is exported from this module. The following tags can be used
+to selectively import constants and functions defined in this module:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:CONSTANTS\fR\fR
+.ad
+.RS 14n
+.rt
+\fBEXT_\fR*, \fBEXC_\fR*, and \fBEXD_\fR*
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:ALL\fR\fR
+.ad
+.RS 14n
+.rt
+\fB:CONSTANTS\fR
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBExacct\fR(3PERL), \fBExacct::File\fR(3PERL), \fBExacct::Object\fR(3PERL),
+\fBExacct::Object::Group\fR(3PERL), \fBExacct::Object::Item\fR(3PERL),
+\fBlibexacct\fR(3LIB), \fBattributes\fR(5)
diff --git a/usr/src/man/man3perl/Exacct::File.3perl b/usr/src/man/man3perl/Exacct::File.3perl
new file mode 100644
index 0000000000..4246148720
--- /dev/null
+++ b/usr/src/man/man3perl/Exacct::File.3perl
@@ -0,0 +1,246 @@
+'\" te
+.\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved.
+.\" 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 or http://www.opensolaris.org/os/licensing. 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]
+.TH Exacct::File 3PERL "1 Dec 2002" "SunOS 5.11" "Perl Library Functions"
+.SH NAME
+Exacct::File \- exacct file manipulation
+.SH SYNOPSIS
+.LP
+.nf
+use Sun::Solaris::Exacct::File qw(:ALL);
+my $ea_file = Sun::Solaris::Exacct::File->new($myfile, &O_RDONLY);
+my $ea_obj = $ea_file->get();
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+This module provides access to the \fBlibexacct\fR(3LIB) functions that
+manipulate accounting files. The interface is object-oriented and allows the
+creation and reading of \fBlibexacct\fR files. The C library calls wrapped by
+this module are \fBea_open\fR(3EXACCT), \fBea_close\fR(3EXACCT),
+\fBea_next_object\fR(3EXACCT), \fBea_previous_object\fR(3EXACCT),
+\fBea_write_object\fR(3EXACCT), \fBea_get_object\fR(3EXACCT),
+\fBea_get_creator\fR(3EXACCT), and \fBea_get_hostname\fR(3EXACCT). The file
+read and write methods all operate on \fBSun::Solaris::Exacct::Object\fR
+objects and perform all the necessary memory management, packing, unpacking,
+and structure conversions that are required.
+.SS "Constants"
+.sp
+.LP
+\fBEO_HEAD\fR, \fBEO_TAIL\fR, \fBEO_NO_VALID_HDR\fR, \fBEO_POSN_MSK\fR, and
+\fBEO_VALIDATE_MSK\fR. Other constants needed by the \fBnew()\fR method below
+are in the standard Perl Fcntl module.
+.SS "Functions"
+.sp
+.LP
+None.
+.SS "Class methods"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnew($name, $oflags, creator => $creator,\fR\fR
+.ad
+.sp .6
+.RS 4n
+This method opens a \fBlibexacct\fR file as specified by the mandatory
+parameters \fB$name\fR and \fB$oflags\fR, and returns a
+\fBSun::Solaris::Exacct::File\fR object, or \fBundef\fR if an error occurs. The
+parameters \fB$creator\fR, \fB$aflags\fR, and \fB$mode\fR are optional and are
+passed as (\fBname\fR => \fBvalue\fR) pairs. The only valid values for
+\fB$oflags\fR are the combinations of \fBO_RDONLY\fR, \fBO_WRONLY\fR,
+\fBO_RDWR\fR, and \fBO_CREAT\fR described below.
+.sp
+The \fB$creator\fR parameter is a string describing the creator of the file. If
+it is required (for instance, when writing to a file) but absent, it is set to
+the string representation of the caller's UID. The \fB$aflags\fR parameter
+describes the required positioning in the file for \fBO_RDONLY\fR access:
+either \fBEO_HEAD\fR or \fBEO_TAIL\fR are allowed. If absent, \fBEO_HEAD\fR is
+assumed. The \fB$mode\fR parameter is the file creation mode and is ignored
+unless \fBO_CREAT\fR is specified in \fB$oflags\fR. If \fB$mode\fR is
+unspecified, the file creation mode is set to 0666 (octal). If an error occurs,
+it can be retrieved with the \fBSun::Solaris::Exacct::ea_error()\fR function.
+See \fBExacct\fR(3PERL).
+.sp
+
+.sp
+.TS
+tab();
+cw(1.83i) cw(1.83i) cw(1.83i)
+lw(1.83i) lw(1.83i) lw(1.83i)
+.
+\fB$oflags\fR\fB$aflags\fRAction
+\fBO_RDONLY\fRAbsent or \fBEO_HEAD\fRT{
+Open for reading at the start of the file.
+T}
+\fBO_RDONLY\fR\fBEO_TAIL\fROpen for reading at the end of the file.
+\fBO_WRONLY\fRIgnoredT{
+File must exist, open for writing at the end of the file.
+T}
+\fBO_WRONLY\fR | \fBO_CREAT\fRIgnoredT{
+Create file if it does not exist, otherwise truncate and open for writing.
+T}
+\fBO_RDWR\fRIgnoredT{
+File must exist, open for reading/writing, positioned at the end of the file.
+T}
+\fBO_RDWR\fR | \fBO_CREAT\fRIgnoredT{
+Create file if it does not exist, otherwise truncate and open for reading/writing.
+T}
+.TE
+
+.RE
+
+.SS "Object methods"
+.sp
+.LP
+There is no explicit \fBclose()\fR method for a
+\fBSun::Solaris::Exacct::File\fR. The file is closed when the file handle
+object is undefined or reassigned.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcreator()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This method returns a string containing the creator of the file or \fBundef\fR
+if the file does not contain the information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhostname()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This method returns a string containing the hostname on which the file was
+created, or \fBundef\fR if the file does not contain the information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnext()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This method reads the header information of the next record in the file. In a
+scalar context the value of the type field is returned as a dual-typed scalar
+that will be one of \fBEO_ITEM\fR, \fBEO_GROUP\fR, or \fBEO_NONE\fR. In a list
+context it returns a two-element list containing the values of the type and
+catalog fields. The type element is a dual-typed scalar. The catalog element is
+blessed into the \fBSun::Solaris::Exacct::Catalog\fR class. If an error occurs,
+\fBundef\fR or (\fBundef\fR, \fBundef\fR) is returned depending upon context.
+The status can be accessed with the \fBSun::Solaris::Exacct::ea_error()\fR
+function.See \fBExacct\fR(3PERL).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprevious()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This method reads the header information of the previous record in the file. In
+a scalar context it returns the type field. In a list context it returns the
+two-element list containing the values of the type and catalog fields, in the
+same manner as the \fBnext()\fR method. Error are also returned in the same
+manner as the \fBnext()\fR method.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBget()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This method reads in the \fBlibexacct\fR record at the current position in the
+file and returns a \fBSun::Solaris::Exacct::Object\fR containing the unpacked
+data from the file. This object can then be further manipulated using its
+methods. In case of error undef is returned and the error status is made
+available with the \fBSun::Solaris::Exacct::ea_error()\fR function. After this
+operation, the position in the file is set to the start of the next record in
+the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwrite(@ea_obj)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This method converts the passed list of Sun::Solaris::Exacct::Objects into
+\fBlibexacct\fR file format and appends them to the \fBlibexacct\fR file, which
+must be open for writing. This method returns true if successful and false
+otherwise. On failure the error can be examined with the
+\fBSun::Solaris::Exacct::ea_error()\fR function.
+.RE
+
+.SS "Exports"
+.sp
+.LP
+By default nothing is exported from this module. The following tags can be used
+to selectively import constants defined in this module:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:CONSTANTS\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBEO_HEAD\fR, \fBEO_TAIL\fR, \fBEO_NO_VALID_HDR\fR, \fBEO_POSN_MSK\fR, and
+\fBEO_VALIDATE_MSK\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:ALL\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fB:CONSTANTS\fR, Fcntl(\fB:DEFAULT\fR).
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBea_close\fR(3EXACCT), \fBea_get_creator\fR(3EXACCT),
+\fBea_get_hostname\fR(3EXACCT), \fBea_get_object\fR(3EXACCT),
+\fBea_next_object\fR(3EXACCT), \fBea_open\fR(3EXACCT),
+\fBea_previous_object\fR(3EXACCT), \fBea_write_object\fR(3EXACCT),
+\fBExacct\fR(3PERL), \fBExacct::Catalog\fR(3PERL), \fBExacct::Object\fR(3PERL),
+\fBExacct::Object::Group\fR(3PERL), \fBExacct::Object::Item\fR(3PERL),
+\fBlibexacct\fR(3LIB), \fBattributes\fR(5)
diff --git a/usr/src/man/man3perl/Exacct::Object.3perl b/usr/src/man/man3perl/Exacct::Object.3perl
new file mode 100644
index 0000000000..c0bf54c3db
--- /dev/null
+++ b/usr/src/man/man3perl/Exacct::Object.3perl
@@ -0,0 +1,216 @@
+'\" te
+.\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved.
+.\" 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 or http://www.opensolaris.org/os/licensing. 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]
+.TH Exacct::Object 3PERL "1 Dec 2002" "SunOS 5.11" "Perl Library Functions"
+.SH NAME
+Exacct::Object \- exacct object manipulation
+.SH SYNOPSIS
+.LP
+.nf
+use Sun::Solaris::Exacct::Object qw(:ALL);
+print($ea_obj->value(), "\en");
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+This module is used as a parent of the two possible types of Perl exacct
+objects: Items and Groups. An Item is either a single data value such as the
+number of seconds of user CPU time consumed by a process, an embedded Perl
+exacct object, or a block of raw data. A Group is an ordered collection of
+Perl exacct Items such as all of the resource usage values for a particular
+process or task. If Groups need to be nested within each other, the inner
+Groups can be stored as embedded Perl exacct objects inside the enclosing
+Group.
+.sp
+.LP
+This module contains methods that are common to both Perl exacct Items and
+Groups. The attributes of \fBSun::Solaris::Exacct::Object\fR and all classes
+derived from it are read-only after initial creation with \fBnew()\fR. This
+behavior prevents the inadvertent modification of the attributes that could
+produce inconsistent catalog tags and data values. The only exception is the
+array used to store the Items inside a Group object, which can be modified
+using the normal Perl array operators. See the \fBvalue()\fR method below.
+.SS "Constants"
+.sp
+.LP
+\fBEO_ERROR\fR, \fBEO_NONE\fR, \fBEO_ITEM\fR, and \fBEO_GROUP\fR.
+.SS "Functions"
+.sp
+.LP
+None.
+.SS "Class methods"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdump($object, $filehandle)\fR\fR
+.ad
+.RS 30n
+.rt
+This method dumps formatted text representation of a Perl exacct object to the
+supplied file handle. If no file handle is specified, the text representation
+is dumped to \fBSTDOUT\fR. See EXAMPLES below for sample output.
+.RE
+
+.SS "Object methods"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtype()\fR\fR
+.ad
+.RS 27n
+.rt
+This method returns the type field of the Perl exacct object. The value of the
+type field is returned as a dual-typed scalar and is either \fBEO_ITEM\fR,
+\fBEO_GROUP\fR, or \fBEO_NONE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcatalog()\fR\fR
+.ad
+.RS 27n
+.rt
+This method returns the catalog field of the Perl exacct object. The value is
+returned as a \fBSun::Solaris::Exacct::Catalog\fR object.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmatch_catalog($catalog)\fR\fR
+.ad
+.RS 27n
+.rt
+This method matches the passed catalog tag against the object. True is returned
+of a match occurs. Otherwise false is returned. This method has the same
+behavior as the underlying \fBea_match_object_catalog\fR(3EXACCT) function.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBvalue()\fR\fR
+.ad
+.RS 27n
+.rt
+This method returns the value of the Perl exacct object. In the case of an
+Item, this object will normally be a Perl scalar, either a number or string.
+For raw Items, the buffer contained inside the object is returned as a Perl
+string that can be manipulated with the Perl \fBunpack()\fR function. If the
+Item contains either a nested Item or a nested Group, the enclosed Item is
+returned as a reference to an object of the appropriate subtype of the
+\fBSun::Solaris::Exacct::Object\fR class.
+.sp
+For Group objects, if \fBvalue()\fR is called in a scalar context, the return
+value is a reference to the underlying array used to store the component Items
+of the Group. Since this array can be manipulated with the normal Perl array
+indexing syntax and array operators, the objects inside the Group can be
+manipulated. All objects in the array must be derived from the
+\fBSun::Solaris::Exacct::Object\fR class. Any attempt to insert something else
+into the array will generate a fatal runtime error that can be caught with an
+\fBeval { }\fR block.
+.sp
+If \fBvalue()\fR is called in a list context for a Group object, it returns a
+list of all the objects in the Group. Unlike the array reference returned in a
+scalar context, this list cannot be manipulated to add or delete Items from a
+Group. This mechanism is considerably faster than the array mechanism described
+above and is the preferred mechanism if a Group is being examined in a
+read-only manner.
+.RE
+
+.SS "Exports"
+.sp
+.LP
+By default nothing is exported from this module. The following tags can be used
+to selectively import constants and functions defined in this module:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:CONSTANTS\fR\fR
+.ad
+.RS 14n
+.rt
+\fBEO_ERROR\fR, \fBEO_NONE\fR, \fBEO_ITEM\fR, and \fBEO_GROUP\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:ALL\fR\fR
+.ad
+.RS 14n
+.rt
+\fB:CONSTANTS\fR
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fROutput of the \fBdump()\fR method for a Perl exacct Group
+object.
+.sp
+.LP
+The following is an example of output of the \fBdump()\fR method for a Perl
+exacct Group object.
+
+.sp
+.in +2
+.nf
+GROUP
+ Catalog = EXT_GROUP|EXC_DEFAULT|EXD_GROUP_PROC_PARTIAL
+ ITEM
+ Catalog = EXT_UINT32|EXC_DEFAULT|EXD_PROC_PID
+ Value = 3
+ ITEM
+ Catalog = EXT_UINT32|EXC_DEFAULT|EXD_PROC_UID
+ Value = 0
+ ITEM
+ Catalog = EXT_UINT32|EXC_DEFAULT|EXD_PROC_GID
+ Value = 0
+ ITEM
+ Catalog = EXT_UINT32|EXC_DEFAULT|EXD_PROC_PROJID
+ Value = 0
+ ITEM
+ Catalog = EXT_UINT32|EXC_DEFAULT|EXD_PROC_TASKID
+ Value = 0
+ ITEM
+ Catalog = EXT_STRING|EXC_DEFAULT|EXD_PROC_COMMAND
+ Value = fsflush
+ENDGROUP
+.fi
+.in -2
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBea_match_object_catalog\fR(3EXACCT), \fBExacct\fR(3PERL),
+\fBExacct::Catalog\fR(3PERL), \fBExacct::File\fR(3PERL),
+\fBExacct::Object::Group\fR(3PERL), \fBExacct::Object::Item\fR(3PERL),
+\fBlibexacct\fR(3LIB), \fBattributes\fR(5)
diff --git a/usr/src/man/man3perl/Exacct::Object::Group.3perl b/usr/src/man/man3perl/Exacct::Object::Group.3perl
new file mode 100644
index 0000000000..ba67e5cc32
--- /dev/null
+++ b/usr/src/man/man3perl/Exacct::Object::Group.3perl
@@ -0,0 +1,123 @@
+'\" te
+.\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved.
+.\" 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 or http://www.opensolaris.org/os/licensing. 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]
+.TH Exacct::Object::Group 3PERL "1 Dec 2002" "SunOS 5.11" "Perl Library Functions"
+.SH NAME
+Exacct::Object::Group \- exacct group manipulation
+.SH SYNOPSIS
+.LP
+.nf
+use Sun::Solaris::Exacct::Object;
+my $ea_grp = Sun::Solaris::Exacct::Object::Group->new(
+ & EXT_GROUP | &EXC_DEFAULT | &EXD_GROUP_PROC);
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+This module is used for manipulating \fBlibexacct\fR(3LIB) Group objects. A
+\fBlibexacct\fR Group object is represented as an opaque reference blessed into
+the \fBSun::Solaris::Exacct::Object::Group\fR class, which is a subclass of the
+\fBSun::Solaris::Exacct::Object\fR class. The Items within a Group are stored
+inside a Perl array. A reference to the array can be accessed with the
+inherited \fBvalue()\fR method. The individual Items within a Group can be
+manipulated with the normal Perl array syntax and operators. All data elements
+of the array must be derived from the \fBSun::Solaris::Exacct::Object\fR class.
+Group objects can also be nested inside each other simply by adding an existing
+Group as a data Item.
+.SS "Constants"
+.sp
+.LP
+None.
+.SS "Functions"
+.sp
+.LP
+None.
+.SS "Class methods"
+.sp
+.LP
+Class methods include those inherited from the
+\fBSun::Solaris::Exacct::Object\fR base class, plus the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnew($catalog, @objects)\fR\fR
+.ad
+.RS 27n
+.rt
+This method creates and returns a new
+\fBSun::Solaris::Exacct::Object::Group\fR. The catalog tag can be either an
+integer or a \fBSun::Solaris::Exacct::Catalog\fR. The catalog tag should be a
+valid catalog tag for a Perl exacct Group object. The \fB@objects\fR parameter
+is a list of \fBSun::Solaris::Exacct::Object\fR to be stored inside the Group.
+A copy of all the passed Items is taken and any Group objects are recursively
+copied. The contents of the returned Group object can be accessed with the
+array returned by the value method.
+.RE
+
+.SS "Object methods"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBas_hash()\fR\fR
+.ad
+.RS 17n
+.rt
+This method returns the contents of the group as a hash reference. It uses the
+string value of each item's catalog ID as the hash entry key and the scalar
+value returned by \fBvalue()\fR as the hash entry value. This form should be
+used if there are no duplicate catalog tags in the group.
+.sp
+This method and its companion \fBas_hashlist()\fR are the fastest ways to
+access the contents of a Group.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBas_hashlist()\fR\fR
+.ad
+.RS 17n
+.rt
+This method returns the contents of the group as a hash reference. It uses the
+string value of each item's catalog id as the hash entry key and an array of
+the scalar values returned by \fBvalue()\fR as the hash entry value for all the
+items that share a common key. This form should be used if there might be
+duplicate catalog tags in the group.
+.sp
+This method and its companion \fBas_hash()\fR are the fastest ways to access
+the contents of a Group.
+.RE
+
+.SS "Exports"
+.sp
+.LP
+None.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBExacct\fR(3PERL), \fBExacct::Catalog\fR(3PERL), \fBExacct::File\fR(3PERL),
+\fBExacct::Object\fR(3PERL), \fBExacct::Object::Item\fR(3PERL),
+\fBlibexacct\fR(3LIB), \fBattributes\fR(5)
diff --git a/usr/src/man/man3perl/Exacct::Object::Item.3perl b/usr/src/man/man3perl/Exacct::Object::Item.3perl
new file mode 100644
index 0000000000..4099e7660c
--- /dev/null
+++ b/usr/src/man/man3perl/Exacct::Object::Item.3perl
@@ -0,0 +1,108 @@
+'\" te
+.\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved.
+.\" 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 or http://www.opensolaris.org/os/licensing. 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]
+.TH Exacct::Object::Item 3PERL "1 Dec 2002" "SunOS 5.11" "Perl Library Functions"
+.SH NAME
+Exacct::Object::Item \- exacct item manipulation
+.SH SYNOPSIS
+.LP
+.nf
+use Sun::Solaris::Exacct::Object;
+my $ea_item = Sun::Solaris::Exacct::Object::Item->new(
+ &EXT_UINT64 | &EXC_DEFAULT | &EXD_PROC_PID, $$);
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+This module is used for manipulating \fBlibexacct\fR(3LIB) data Items. A
+\fBlibexacct\fR Item is represented as an opaque reference blessed into the
+\fBSun::Solaris::Exacct::Object::Item\fR class, which is a subclass of the
+\fBSun::Solaris::Exacct::Object\fR class. The underlying \fBlibexacct\fR data
+types are mapped onto Perl types as follows:
+.sp
+
+.sp
+.TS
+tab();
+cw(2.75i) cw(2.75i)
+lw(2.75i) lw(2.75i)
+.
+libexacct typePerl internal type
+\fBEXT_UINT8\fRIV (integer)
+\fBEXT_UINT16\fRIV (integer)
+\fBEXT_UINT32\fRIV (integer)
+\fBEXT_UINT64\fRIV (integer)
+\fBEXT_DOUBLE\fRNV (double)
+\fBEXT_STRING\fRPV (string)
+\fBEXT_RAW\fRPV (string)
+\fBEXT_EXACCT_OBJECT\fR\fBSun::Solaris::Exacct::Object subclass\fR
+.TE
+
+.SS "Constants"
+.sp
+.LP
+None.
+.SS "Functions"
+.sp
+.LP
+None.
+.SS "Class methods"
+.sp
+.LP
+Class methods include those inherited from the
+\fBSun::Solaris::Exacct::Object\fR base class, plus the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnew($catalog, $value)\fR\fR
+.ad
+.RS 25n
+.rt
+This method creates and returns a new \fBSun::Solaris::Exacct::Object::Item\fR.
+The catalog tag can be either an integer or a
+\fBSun::Solaris::Exacct::Catalog\fR. This catalog tag controls the conversion
+of the Perl value to the corresponding Perl exacct data type as described in
+the table above. If the catalog tag has a type field of
+\fBEXT_EXACCT_OBJECT\fR, the value must be a reference to either an Item or a
+Group object and the passed object is recursively copied and stored inside the
+new Item. Because the returned Item is constant, it is impossible, for example,
+to create an Item representing CPU seconds and subsequently modify its value or
+change its catalog value. This behavior is intended to prevent mismatches
+between the catalog tag and the data value.
+.RE
+
+.SS "Object methods"
+.sp
+.LP
+Object methods are those inherited from the \fBSun::Solaris::Exacct::Object\fR.
+.SS "Exports"
+.sp
+.LP
+None.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBExacct\fR(3PERL), \fBExacct::Catalog\fR(3PERL), \fBExacct::File\fR(3PERL),
+\fBExacct::Object\fR(3PERL), \fBExacct::Object::Group\fR(3PERL),
+\fBlibexacct\fR(3LIB), \fBattributes\fR(5)
diff --git a/usr/src/man/man3perl/Kstat.3perl b/usr/src/man/man3perl/Kstat.3perl
new file mode 100644
index 0000000000..d718afb77f
--- /dev/null
+++ b/usr/src/man/man3perl/Kstat.3perl
@@ -0,0 +1,171 @@
+'\" te
+.\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved.
+.\" 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 or http://www.opensolaris.org/os/licensing. 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]
+.TH Kstat 3PERL "21 Jul 2005" "SunOS 5.11" "Perl Library Functions"
+.SH NAME
+Kstat \- Perl tied hash interface to the kstat facility
+.SH SYNOPSIS
+.LP
+.nf
+use Sun::Solaris::Kstat;
+
+Sun::Solaris::Kstat->new();
+Sun::Solaris::Kstat->update();
+Sun::Solaris::Kstat->{module}{instance}{name}{statistic}
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+Kernel statistics are categorized using a 3-part key consisting of the module,
+the instance, and the statistic name. For example, CPU information can be found
+under \fBcpu_stat:0:cpu_stat0\fR, as in the above example. The method
+\fBSun::Solaris::Kstat\fR\(->\fBnew()\fR creates a new 3-layer tree of Perl
+hashes with the same structure; that is, the statistic for CPU 0 can be
+accessed as \fB$ks\(->{cpu_stat}{0}{cpu_stat0}\fR. The fourth and lowest layer
+is a tied hash used to hold the individual statistics values for a particular
+system resource.
+.sp
+.LP
+For performance reasons, the creation of a \fBSun::Solaris::Kstat\fR object is
+not accompanied by a following read of all possible statistics. Instead, the
+3-layer structure described above is created, but reads of a statistic's values
+are done only when referenced. For example, accessing
+\fB$ks\(->{cpu_stat}{0}{cpu_stat0}{syscall}\fR will read in all the statistics
+for CPU 0, including user, system, and wait times, and the other CPU
+statistics, as well as the number of system call entries. Once you have
+accessed a lowest level statistics value, calling \fB$ks\fR\(->\fBupdate()\fR
+will automatically update all the individual values of any statistics you have
+accessed.
+.sp
+.LP
+There are two values of the lowest-level hash that can be read without causing
+the full set of statistics to be read from the kernel. These are "class", which
+is the \fBkstat\fR class of the statistics, and "crtime"n, which is the time
+that the kstat was created. See \fBkstat\fR(3KSTAT) for full details of these
+fields.
+.SS "Methods"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnew()\fR\fR
+.ad
+.RS 12n
+.rt
+Create a new kstat statistics hierarchy and return a reference to the top-level
+hash. Use it like any normal hash to access the statistics.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBupdate()\fR\fR
+.ad
+.RS 12n
+.rt
+Update all the statistics that have been accessed so far. In scalar context,
+\fBupdate()\fR returns 1 if the \fBkstat\fR structure has changed, and 0
+otherwise. In list context, \fBupdate()\fR returns references to two arrays:
+the first holds the keys of any kstats that have been added, and the second
+holds the keys of any kstats that have been deleted. Each key will be returned
+in the form "\fBmodule\fR:\fBinstance\fR:\fBname\fR".
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRSun::Solaris::Kstat example
+.sp
+.in +2
+.nf
+use Sun::Solaris::Kstat;
+
+my $kstat = Sun::Solaris::Kstat->new();
+my ($usr1, $sys1, $wio1, $idle1) =
+ @{$kstat->{cpu_stat}{0}{cpu_stat0}}{qw(user kernel
+ wait idle)};
+print("usr sys wio idle\en");
+while (1) {
+ sleep 5;
+ if ($kstat->update()) {
+ print("Configuration changed\en");
+ }
+ my ($usr2, $sys2, $wio2, $idle2) =
+ @{$kstat->{cpu_stat}{0}{cpu_stat0}}{qw(user kernel
+ wait idle)};
+ printf(" %.2d %.2d %.2d %.2d\en",
+ ($usr2 - $usr1) / 5, ($sys2 - $sys1) / 5,
+ ($wio2 - $wio1) / 5, ($idle2 - $idle1) / 5);
+ $usr1 = $usr2;
+ $sys1 = $sys2;
+ $wio1 = $wio2;
+ $idle1 = $idle2;
+}
+.fi
+.in -2
+
+.SH SEE ALSO
+.sp
+.LP
+\fBperl\fR(1), \fBkstat\fR(1M), \fBkstat\fR(3KSTAT),
+\fBkstat_chain_update\fR(3KSTAT), \fBkstat_close\fR(3KSTAT),
+\fBkstat_open\fR(3KSTAT), \fBkstat_read\fR(3KSTAT)
+.SH NOTES
+.sp
+.LP
+As the statistics are stored in a tied hash, taking additional references of
+members of the hash, such as
+.sp
+.in +2
+.nf
+my $ref = \eks->{cpu_stat}{0}{cpu_stat0}{syscall};
+print("$$ref\en");
+.fi
+.in -2
+
+.sp
+.LP
+will be recorded as a hold on that statistic's value, preventing it from being
+updated by \fBrefresh()\fR. Copy the values explicitly if persistence is
+necessary.
+.sp
+.LP
+Several of the statistics provided by the \fBkstat\fR facility are stored as
+64-bit integer values. Perl 5 does not yet internally support 64-bit integers,
+so these values are approximated in this module. There are two classes of
+64-bit value to be dealt with:
+.sp
+.ne 2
+.mk
+.na
+\fB64-bit intervals and times\fR
+.ad
+.RS 30n
+.rt
+These are the \fBcrtime\fR and \fBsnaptime\fR fields of all the statistics
+hashes, and the \fBwtime\fR, \fBwlentime\fR, \fBwlastupdate\fR, \fBrtime\fR,
+\fBrlentime\fR and \fBrlastupdate\fR fields of the \fBkstat\fR I/O statistics
+structures. These are measured by the \fBkstat\fR facility in nanoseconds,
+meaning that a 32-bit value would represent approximately 4 seconds. The
+alternative is to store the values as floating-point numbers, which offer
+approximately 53 bits of precision on present hardware. 64-bit intervals and
+timers as floating point values expressed in seconds, meaning that time-related
+kstats are being rounded to approximately microsecond resolution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB64-bit counters\fR
+.ad
+.RS 30n
+.rt
+It is not useful to store these values as 32-bit values. As noted above,
+floating-point values offer 53 bits of precision. Accordingly, all 64-bit
+counters are stored as floating-point values.
+.RE
+
diff --git a/usr/src/man/man3perl/Lgrp.3perl b/usr/src/man/man3perl/Lgrp.3perl
new file mode 100644
index 0000000000..1d7c3afdfb
--- /dev/null
+++ b/usr/src/man/man3perl/Lgrp.3perl
@@ -0,0 +1,1170 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
+.\" 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 or http://www.opensolaris.org/os/licensing. 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]
+.TH Lgrp 3PERL "30 Aug 2006" "SunOS 5.11" "Perl Library Functions"
+.SH NAME
+Lgrp \- Perl interface to Solaris liblgrp library
+.SH SYNOPSIS
+.LP
+.nf
+use Sun::Solaris::Lgrp qw(:ALL);
+
+# initialize lgroup interface
+my $cookie = lgrp_init(LGRP_VIEW_OS | LGRP_VIEW_CALLER);
+my $l = Sun::Solaris::Lgrp->new(LGRP_VIEW_OS |
+ LGRP_VIEW_CALLER);
+
+my $version = lgrp_version(LGRP_VER_CURRENT | LGRP_VER_NONE);
+$version = $l->version(LGRP_VER_CURRENT | LGRP_VER_NONE);
+
+$home = lgrp_home(P_PID, P_MYID);
+$home = l->home(P_PID, P_MYID);
+
+lgrp_affinity_set(P_PID, $\fIpid\fR, $\fIlgrp\fR,
+ LGRP_AFF_STRONG | LGRP_AFF_WEAK | LGRP_AFF_NONE);
+$l->affinity_set(P_PID, $\fIpid\fR, $\fIlgrp\fR,
+ LGRP_AFF_STRONG | LGRP_AFF_WEAK | LGRP_AFF_NONE);
+
+my $affinity = lgrp_affinity_get(P_PID, $\fIpid\fR, $\fIlgrp\fR);
+$affinity = $l->affinity_get(P_PID, $\fIpid\fR, $\fIlgrp\fR);
+
+my $nlgrps = lgrp_nlgrps($\fIcookie\fR);
+$nlgrps = $l->nlgrps();
+
+my $root = lgrp_root($\fIcookie\fR);
+$root = l->root();
+
+$latency = lgrp_latency($\fIlgrp1\fR, $\fIlgrp2\fR);
+$latency = $l->latency($\fIlgrp1\fR, $\fIlgrp2\fR);
+
+my @children = lgrp_children($\fIcookie\fR, $\fIlgrp\fR);
+@children = l->children($lgrp);
+
+my @parents = lgrp_parents($\fIcookie\fR, $\fIlgrp\fR);
+@parents = l->parents($\fIlgrp\fR);
+
+my @lgrps = lgrp_lgrps($\fIcookie\fR);
+@lgrps = l->lgrps();
+
+@lgrps = lgrp_lgrps($\fIcookie\fR, $\fIlgrp\fR);
+@lgrps = l->lgrps($\fIlgrp\fR);
+
+my @leaves = lgrp_leaves($\fIcookie\fR);
+@leaves = l->leaves();
+
+my $is_leaf = lgrp_isleaf($\fIcookie\fR, $\fIlgrp\fR);
+$is_leaf = $l->is_leaf($\fIlgrp\fR);
+
+my @cpus = lgrp_cpus($\fIcookie\fR, $\fIlgrp\fR,
+ LGRP_CONTENT_HIERARCHY | LGRP_CONTENT_DIRECT);
+@cpus = l->cpus($\fIlgrp\fR, LGRP_CONTENT_HIERARCHY |
+ LGRP_CONTENT_DIRECT);
+
+my $memsize = lgrp_mem_size($\fIcookie\fR, $\fIlgrp\fR,
+ LGRP_MEM_SZ_INSTALLED | LGRP_MEM_SZ_FREE,
+ LGRP_CONTENT_HIERARCHY | LGRP_CONTENT_DIRECT);
+$memsize = l->mem_size($\fIlgrp\fR,
+ LGRP_MEM_SZ_INSTALLED | LGRP_MEM_SZ_FREE,
+ LGRP_CONTENT_HIERARCHY | LGRP_CONTENT_DIRECT);
+
+my $is_stale = lgrp_cookie_stale($\fIcookie\fR);
+$stale = l->stale();
+
+lgrp_fini($\fIcookie\fR);
+
+# The following is available for API version greater than 1:
+my @lgrps = lgrp_resources($\fIcookie\fR, $\fIlgrp\fR, LGRP_RSRC_CPU);
+
+# Get latencies from cookie
+$latency = lgrp_latency_cookie($\fIcookie\fR, $\fIfrom\fR, $\fIto\fR);
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+This module provides access to the \fBliblgrp\fR(3LIB) library and to various
+constants and functions defined in <\fBsys/lgrp_sys.h\fR>. It provides both the
+procedural and object interface to the library. The procedural interface
+requires (in most cases) passing around a transparent cookie. The object
+interface hides all the cookie manipulations from the user.
+.sp
+.LP
+Functions returning a scalar value indicate an error by returning \fBundef\fR.
+The caller can examine the \fB$!\fR variable to get the error value.
+.sp
+.LP
+Functions returning a list value return the number of elements in the list when
+called in scalar context. In the event of error, the empty list is returned in
+the array context and \fBundef\fR is returned in the scalar context.
+.SS "Constants"
+.sp
+.LP
+The constants are exported with \fB:CONSTANTS\fR or \fB:ALL\fR tags:
+.sp
+.in +2
+.nf
+use Sun::Solaris::Lgrp ':ALL';
+.fi
+.in -2
+
+.sp
+.LP
+or
+.sp
+.in +2
+.nf
+use Sun::Solaris::Lgrp ':CONSTANTS';
+.fi
+.in -2
+
+.sp
+.LP
+The following constants are available for use in Perl programs:
+.br
+.in +2
+\fBLGRP_NONE\fR
+.in -2
+.br
+.in +2
+\fBLGRP_VER_CURRENT\fR
+.in -2
+.br
+.in +2
+\fBLGRP_VER_NONE\fR
+.in -2
+.br
+.in +2
+\fBLGRP_VIEW_CALLER\fR
+.in -2
+.br
+.in +2
+\fBLGRP_VIEW_OS\fR
+.in -2
+.br
+.in +2
+\fBLGRP_AFF_NONE\fR
+.in -2
+.br
+.in +2
+\fBLGRP_AFF_STRONG\fR
+.in -2
+.br
+.in +2
+\fBLGRP_AFF_WEAK\fR
+.in -2
+.br
+.in +2
+\fBLGRP_CONTENT_DIRECT\fR
+.in -2
+.br
+.in +2
+\fBLGRP_CONTENT_HIERARCHY\fR
+.in -2
+.br
+.in +2
+\fBLGRP_MEM_SZ_FREE\fR
+.in -2
+.br
+.in +2
+\fBLGRP_MEM_SZ_FREE\fR
+.in -2
+.br
+.in +2
+\fBLGRP_RSRC_CPU\fR (1)
+.in -2
+.br
+.in +2
+\fBLGRP_RSRC_MEM\fR (1)
+.in -2
+.br
+.in +2
+\fBLGRP_CONTENT_ALL\fR (1)
+.in -2
+.br
+.in +2
+\fBLGRP_LAT_CPU_TO_MEM\fR (1)
+.in -2
+.br
+.in +2
+\fBP_PID\fR
+.in -2
+.br
+.in +2
+\fBP_LWPID\fR
+.in -2
+.br
+.in +2
+\fBP_MYID\fR
+.in -2
+.sp
+.LP
+(1) Available for versions of the \fBliblgrp\fR(3LIB) API greater than 1.
+.SS "Functions"
+.sp
+.LP
+A detailed description of each function follows. Since this module is intended
+to provide a Perl interface to the functions in \fBliblgrp\fR(3LIB), a very
+short description is given for the corresponding functions in this module and a
+reference is given to the complete description in the \fBliblgrp\fR manual
+pages. Any differences or additional functionality in the Perl module are
+highlighted and fully documented here.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_init([LGRP_VIEW_CALLER | LGRP_VIEW_OS])\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function initializes the lgroup interface and takes a snapshot of the
+lgroup hierarchy with the given view. Given the view, \fBlgrp_init()\fR returns
+a cookie representing this snapshot of the lgroup hierarchy. This cookie should
+be used with other routines in the lgroup interface needing the lgroup
+hierarchy. The \fBlgrp_fini()\fR function should be called with the cookie when
+it is no longer needed. Unlike \fBlgrp_init\fR(3LGRP), \fBLGRP_VIEW_OS\fR is
+assumed as the default if no view is provided.
+.sp
+Upon successful completion, \fBlgrp_init()\fR returns a cookie. Otherwise it
+returns \fBundef\fR and sets \fB$!\fR to indicate the error.
+.sp
+See \fBlgrp_init\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_fini\fR($\fIcookie\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This function takes a cookie, frees the snapshot of the lgroup hierarchy
+created by \fBlgrp_init()\fR, and cleans up anything else set up by
+\fBlgrp_init()\fR. After this function is called, the cookie returned by the
+lgroup interface might no longer be valid and should not be used.
+.sp
+Upon successful completion, 1 is returned. Otherwise, \fBundef\fR is returned
+and \fB$!\fR is set to indicate the error.
+.sp
+See \fBlgrp_fini\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_view\fR($\fIcookie\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This function takes a cookie representing the snapshot of the lgroup hierarchy
+and returns the snapshot's view of the lgroup hierarchy.
+.sp
+If the given view is \fBLGRP_VIEW_CALLER\fR, the snapshot contains only the
+resources that are available to the caller (such as those with respect to
+processor sets). When the view is \fBLGRP_VIEW_OS\fR, the snapshot contains
+what is available to the operating system.
+.sp
+Upon succesful completion, the function returns the view for the snapshot of
+the lgroup hierarchy represented by the given cookie. Otherwise, \fBundef\fR
+is returned and \fB$!\fR is set to indicate the error.
+.sp
+See \fBlgrp_view\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_home\fR($\fIidtype\fR, $\fIid\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the home lgroup for the given process or thread. The
+$\fIidtype\fR argument should be \fBP_PID\fR to specify a process and the
+$\fIid\fR argument should be its process ID. Otherwise, the $\fIidtype\fR
+argument should be \fBP_LWPID\fR to specify a thread and the $\fIid\fR argument
+should be its LWP ID. The value \fBP_MYID\fR can be used for the $\fIid\fR
+argument to specify the current process or thread.
+.sp
+Upon successful completion, \fBlgrp_home()\fR returns the ID of the home lgroup
+of the specified process or thread. Otherwise, \fBundef\fR is returned and
+\fB$!\fR is set to indicate the error.
+.sp
+See \fBlgrp_home\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_cookie_stale\fR($\fIcookie\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Upon successful completion, this function returns whether the cookie is stale.
+Otherwise, it returns \fBundef\fR and sets \fB$!\fR to indicate the error.
+.sp
+The \fBlgrp_cookie_stale()\fR function will fail with \fBEINVAL\fR if the
+cookie is not valid.
+.sp
+See \fBlgrp_cookie_stale\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_cpus\fR($\fIcookie\fR, $\fIlgrp\fR, $\fIcontext\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This function takes a cookie representing a snapshot of the lgroup hierarchy
+and returns the list of CPUs in the lgroup specified by $\fIlgrp\fR. The
+$\fIcontext\fR argument should be set to one of the following values to specify
+whether the direct contents or everything in this lgroup including its children
+should be returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLGRP_CONTENT_HIERARCHY\fR\fR
+.ad
+.RS 26n
+.rt
+everything within this hierarchy
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLGRP_CONTENT_DIRECT\fR\fR
+.ad
+.RS 26n
+.rt
+directly contained in lgroup
+.RE
+
+When called in scalar context, \fBlgrp_cpus()\fR function returns the number of
+CPUs contained in the specified lgroup.
+.sp
+In the event of error, \fBundef\fR is returned in scalar context and \fB$!\fR
+is set to indicate the error. In list context, the empty list is returned and
+\fB$!\fR is set.
+.sp
+See \fBlgrp_cpus\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_children\fR($\fIcookie\fR, $\fIlgrp\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This function takes a cookie representing a snapshot of the lgroup hierarchy
+and returns the list of lgroups that are children of the specified lgroup.
+.sp
+When called in scalar context, \fBlgrp_children()\fR returns the number of
+children lgroups for the specified lgroup.
+.sp
+In the event of error, \fBundef\fR or empty list is returned and \fB$!\fR is
+set to indicate the error.
+.sp
+See \fBlgrp_children\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_parents\fR($\fIcookie\fR, $\fIlgrp\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This function takes a cookie representing a snapshot of the lgroup hierarchy
+and returns the list of parents of the specified lgroup.
+.sp
+When called in scalar context, \fBlgrp_parents()\fR returns the number of
+parent lgroups for the specified lgroup.
+.sp
+In the event of error, \fBundef\fR or an empty list is returned and \fB$!\fR is
+set to indicate the error.
+.sp
+See \fBlgrp_parents\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_nlgrps\fR($\fIcookie\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This function takes a cookie representing a snapshot of the lgroup hierarchy.
+It returns the number of lgroups in the hierarchy, where the number is always
+at least one.
+.sp
+In the event of error, \fBundef\fR is returned and \fB$!\fR is set to
+\fBEINVAL\fR, indicating that the cookie is not valid.
+.sp
+See \fBlgrp_nlgrps\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_root\fR($\fIcookie\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the root lgroup ID.
+.sp
+In the event of error, \fBundef\fR is returned and \fB$!\fR is set to
+\fBEINVAL\fR, indicatng that the cookie is not valid.
+.sp
+See \fBlgrp_root\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_mem_size\fR($\fIcookie\fR, $\fIlgrp\fR, $\fItype\fR,
+$\fIcontent\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This function takes a cookie representing a snapshot of the lgroup hierarchy.
+The function returns the memory size of the given lgroup in bytes. The
+$\fItype\fR argument should be set to one of the following values:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLGRP_MEM_SZ_FREE\fR\fR
+.ad
+.RS 25n
+.rt
+free memory
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLGRP_MEM_SZ_INSTALLED\fR\fR
+.ad
+.RS 25n
+.rt
+installed memory
+.RE
+
+The $\fIcontent\fR argument should be set to one of the following values to
+specify whether the direct contents or everything in this lgroup including its
+children should be returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLGRP_CONTENT_HIERARCHY\fR\fR
+.ad
+.RS 26n
+.rt
+Return everything within this hierarchy.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLGRP_CONTENT_DIRECT\fR\fR
+.ad
+.RS 26n
+.rt
+Return that which is directly contained in this lgroup.
+.RE
+
+The total sizes include all the memory in the lgroup including its children,
+while the others reflect only the memory contained directly in the given
+lgroup.
+.sp
+Upon successful completion, the size in bytes is returned. Otherwise,
+\fBundef\fR is returned and \fB$!\fR is set to indicate the error.
+.sp
+See \fBlgrp_mem_size\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_version\fR([$\fIversion\fR])\fR
+.ad
+.sp .6
+.RS 4n
+This function takes an interface version number, $\fIversion\fR, as an argument
+and returns an lgroup interface version. The $\fIversion\fR argument should be
+the value of \fBLGRP_VER_CURRENT\fR or \fBLGRP_VER_NONE\fR to find out the
+current lgroup interface version on the running system.
+.sp
+If $\fIversion\fR is still supported by the implementation, then
+\fBlgrp_version()\fR returns the requested version. If \fBLGRP_VER_NONE\fR is
+returned, the implementation cannot support the requested version.
+.sp
+If $\fIversion\fR is \fBLGRP_VER_NONE\fR, \fBlgrp_version()\fR returns the
+current version of the library.
+.sp
+The following example tests whether the version of the interface used by the
+caller is supported:
+.sp
+.in +2
+.nf
+lgrp_version(LGRP_VER_CURRENT) == LGRP_VER_CURRENT or
+ die("Built with unsupported lgroup interface");
+.fi
+.in -2
+
+See \fBlgrp_version\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_affinity_set\fR($\fIidtype\fR, $\fIid\fR, $\fIlgrp\fR,
+$\fIaffinity\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This function sets the affinity that the LWP or set of LWPs specified by
+$\fIidtype\fR and $\fIid\fR have for the given lgroup. The lgroup affinity can
+be set to \fBLGRP_AFF_STRONG\fR, \fBLGRP_AFF_WEAK\fR, or \fBLGRP_AFF_NONE\fR.
+.sp
+If the $\fIidtype\fR is \fBP_PID\fR, the affinity is retrieved for one of the
+LWPs in the process or set for all the LWPs of the process with process ID
+(PID) $\fIid\fR. The affinity is retrieved or set for the LWP of the current
+process with LWP ID $\fIid\fR if $\fIidtype\fR is \fBP_LWPID\fR. If $\fIid\fR
+is \fBP_MYID\fR, then the current LWP or process is specified.
+.sp
+There are different levels of affinity that can be specified by a thread for a
+particuliar lgroup. The levels of affinity are the following from strongest to
+weakest:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLGRP_AFF_STRONG\fR\fR
+.ad
+.RS 19n
+.rt
+strong affinity
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLGRP_AFF_WEAK\fR\fR
+.ad
+.RS 19n
+.rt
+weak affinity
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLGRP_AFF_NONE\fR\fR
+.ad
+.RS 19n
+.rt
+no affinity
+.RE
+
+Upon successful completion, \fBlgrp_affinity_set()\fR returns 1. Otherwise, it
+returns \fBundef\fR and set \fB$!\fR to indicate the error.
+.sp
+See \fBlgrp_affinity_set\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_affinity_get\fR($\fIidtype\fR, $\fIid\fR, $\fIlgrp\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the affinity that the LWP has to a given lgroup.
+.sp
+See \fBlgrp_affinity_get\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_latency_cookie\fR($\fIcookie\fR, $\fIfrom\fR, $\fIto\fR,
+[$\fIbetween\fR=\fBLGRP_LAT_CPU_TO_MEM\fR])\fR
+.ad
+.sp .6
+.RS 4n
+This function takes a cookie representing a snapshot of the lgroup hierarchy
+and returns the latency value between a hardware resource in the $\fIfrom\fR
+lgroup to a hardware resource in the $\fIto\fR lgroup. If $\fIfrom\fR is the
+same lgroup as $\fIto\fR, the latency value within that lgroup is returned.
+.sp
+The optional $\fIbetween\fR argument should be set to \fBLGRP_LAT_CPU_TO_MEM\fR
+to specify between which hardware resources the latency should be measured. The
+only valid value is \fBLGRP_LAT_CPU_TO_MEM\fR, which represents latency from
+CPU to memory.
+.sp
+Upon successful completion, \fBlgrp_latency_cookie()\fR return 1. Otherwise,
+it returns \fBundef\fR and set \fB$!\fR to indicate the error. For LGRP API
+version 1, the \fBlgrp_latency_cookie()\fR is an alias for
+\fBlgrp_latency.()\fR
+.sp
+See \fBlgrp_latency_cookie\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_latency\fR($\fIfrom\fR, $\fIto\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This function is similiar to the \fBlgrp_latency_cookie()\fR function, but
+returns the latency between the given lgroups at the given instant in time.
+Since lgroups can be freed and reallocated, this function might not be able to
+provide a consistent answer across calls. For that reason,
+\fBlgrp_latency_cookie()\fR should be used in its place.
+.sp
+See \fBlgrp_latency\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_resources\fR($\fIcookie\fR, $\fIlgrp\fR, $\fItype\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the list of lgroups directly containing resources of the
+specified type. The resources are represented by a set of lgroups in which each
+lgroup directly contains CPU and/or memory resources.
+.sp
+The \fItype\fR can be specified as:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLGRP_RSRC_CPU\fR\fR
+.ad
+.RS 17n
+.rt
+CPU resources
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLGRP_RSRC_MEM\fR\fR
+.ad
+.RS 17n
+.rt
+memory resources
+.RE
+
+In the event of error, \fBundef\fR or an empty list is returned and \fB$!\fR is
+set to indicate the error.
+.sp
+This function is available only for API version 2 and returns \fBundef\fR or an
+empty list for API version 1 and sets \fB$!\fR to \fBEINVAL\fR.
+.sp
+See \fBlgrp_resources\fR(3LGRP) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_lgrps\fR($\fIcookie\fR, [$\fIlgrp\fR])\fR
+.ad
+.sp .6
+.RS 4n
+This function returns a list of all lgroups in a hierarchy starting from
+$\fIlgrp\fR. If $\fIlgrp\fR is not specified, uses the value of
+\fBlgrp_root\fR($\fIcookie\fR). This function returns the empty list on
+failure.
+.sp
+When called in scalar context, this function returns the total number of
+lgroups in the system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_leaves\fR($\fIcookie\fR, [$\fIlgrp\fR])\fR
+.ad
+.sp .6
+.RS 4n
+This function returns a list of all leaf lgroups in a hierarchy starting from
+$\fIlgrp\fR. If $\fIlgrp\fR is not specified, this function uses the value of
+\fBlgrp_root\fR($\fIcookie\fR). It returns \fBundef\fR or an empty list on
+failure.
+.sp
+When called in scalar context, this function returns the total number of leaf
+lgroups in the system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp_isleaf\fR($\fIcookie\fR, $\fIlgrp\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This function returns True if $\fIlgrp\fR is a leaf (has no children).
+Otherwise it returns False.
+.RE
+
+.SS "Object methods"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnew\fR([$\fIview\fR])\fR
+.ad
+.sp .6
+.RS 4n
+This method creates a new \fBSun::Solaris::Lgrp\fR object. An optional argument
+is passed to the \fBlgrp_init()\fR function. By default this method uses
+\fBLGRP_VIEW_OS\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcookie()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This method returns a transparent cookie that can be passed to functions
+accepting the cookie.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBversion\fR([$\fIversion\fR])\fR
+.ad
+.sp .6
+.RS 4n
+Without the argument, this method returns the current version of the
+\fBliblgrp\fR(3LIB) library. This method is a wrapper for \fBlgrp_version()\fR
+with \fBLGRP_VER_NONE\fR as the default version argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstale()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This method returns T if the lgroup information in the object is stale and F
+otherwise. It is a wrapper for \fBlgrp_cookie_stale()\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBview()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This method returns the snapshot's view of the lgroup hierarchy. It is a
+wrapper for \fBlgrp_view()\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBroot()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This method returns the root lgroup. It is a wrapper for \fBlgrp_root()\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBchildren\fR($\fIlgrp\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This method returns the list of lgroups that are children of the specified
+lgroup. It is a wrapper for \fBlgrp_children()\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBparents\fR($\fIlgrp\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This method returns the list of lgroups that are parents of the specified
+lgroup. It is a wrapper for \fBlgrp_parents()\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnlgrps()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This method returns the number of lgroups in the hierarchy. It is a wrapper for
+\fBlgrp_nlgrps()\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmem_size\fR($\fIlgrp\fR, $\fItype\fR, $\fIcontent\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This method returns the memory size of the given lgroup in bytes. It is a
+wrapper for \fBlgrp_mem_size()\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcpus\fR($\fIlgrp\fR, $\fIcontext\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This method returns the list of CPUs in the lgroup specified by $lgrp. It is a
+wrapper for \fBlgrp_cpus()\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBresources\fR($\fIlgrp\fR, $\fItype\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This method returns the list of lgroups directly containing resources of the
+specified type. It is a wrapper for \fBlgrp_resources()\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhome\fR($\fIidtype\fR, $\fIid\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This method returns the home lgroup for the given process or thread. It is a
+wrapper for \fBlgrp_home()\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBaffinity_get\fR($\fIidtype\fR, $\fIid\fR, $\fIlgrp\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This method returns the affinity that the LWP has to a given lgrp. It is a
+wrapper for \fBlgrp_affinity_get()\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBaffinity_set\fR($\fIidtype\fR, $\fIid\fR, $\fIlgrp\fR,
+$\fIaffinity\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This method sets the affinity that the LWP or set of LWPs specified by
+$\fIidtype\fR and $\fIid\fR have for the given lgroup. It is a wrapper for
+lgrp_affinity_set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrps\fR([$\fIlgrp\fR])\fR
+.ad
+.sp .6
+.RS 4n
+This method returns list of all lgroups in a hierarchy starting from
+$\fIlgrp\fR or the \fBlgrp_root()\fR if $\fIlgrp\fR is not specified. It is a
+wrapper for \fBlgrp_lgrps()\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBleaves\fR([$\fIlgrp\fR])\fR
+.ad
+.sp .6
+.RS 4n
+This method returns a list of all leaf lgroups in a hierarchy starting from
+$\fIlgrp\fR. If $\fIlgrp\fR is not specified, this method uses the value of
+\fBlgrp_root()\fR. It is a wrapper for \fBlgrp_leaves()\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBisleaf\fR($\fIlgrp\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This method returns True if $\fIlgrp\fR is leaf (has no children) and False
+otherwise. It is a wrapper for \fBlgrp_isleaf()\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlatency\fR($\fIfrom\fR, $\fIto\fR)\fR
+.ad
+.sp .6
+.RS 4n
+This method returns the latency value between a hardware resource in the
+$\fIfrom\fR lgroup to a hardware resource in the $\fIto\fR lgroup. It uses
+\fBlgrp_latency()\fR for version 1 of \fBliblgrp\fR and
+\fBlgrp_latency_cookie()\fR for newer versions.
+.RE
+
+.SS "Exports"
+.sp
+.LP
+By default nothing is exported from this module. The following tags can be used
+to selectively import constants and functions defined in this module:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:LGRP_CONSTANTS\fR\fR
+.ad
+.RS 19n
+.rt
+\fBLGRP_AFF_NONE\fR, \fBLGRP_AFF_STRONG\fR, \fBLGRP_AFF_WEAK\fR,
+\fBLGRP_CONTENT_DIRECT\fR, \fBLGRP_CONTENT_HIERARCHY\fR,
+\fBLGRP_MEM_SZ_FREE\fR, \fBLGRP_MEM_SZ_INSTALLED\fR, \fBLGRP_VER_CURRENT\fR,
+\fBLGRP_VER_NONE\fR, \fBLGRP_VIEW_CALLER\fR, \fBLGRP_VIEW_OS\fR,
+\fBLGRP_NONE\fR, \fBLGRP_RSRC_CPU\fR, \fBLGRP_RSRC_MEM\fR,
+\fBLGRP_CONTENT_ALL\fR, \fBLGRP_LAT_CPU_TO_MEM\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:PROC_CONSTANTS\fR\fR
+.ad
+.RS 19n
+.rt
+\fBP_PID\fR, \fBP_LWPID\fR, \fBP_MYID\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:CONSTANTS\fR\fR
+.ad
+.RS 19n
+.rt
+\fB:LGRP_CONSTANTS\fR, \fB:PROC_CONSTANTS\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:FUNCTIONS\fR\fR
+.ad
+.RS 19n
+.rt
+\fBlgrp_affinity_get()\fR, \fBlgrp_affinity_set()\fR, \fBlgrp_children()\fR,
+\fBlgrp_cookie_stale()\fR, \fBlgrp_cpus()\fR, \fBlgrp_fini()\fR,
+\fBlgrp_home()\fR, \fBlgrp_init()\fR, \fBlgrp_latency()\fR,
+\fBlgrp_latency_cookie()\fR, \fBlgrp_mem_size()\fR, \fBlgrp_nlgrps()\fR,
+\fBlgrp_parents()\fR, \fBlgrp_root()\fR, \fBlgrp_version()\fR,
+\fBlgrp_view()\fR, \fBlgrp_resources()\fR, \fBlgrp_lgrps()\fR,
+\fBlgrp_leaves()\fR, \fBlgrp_isleaf()\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:ALL\fR\fR
+.ad
+.RS 19n
+.rt
+\fB:CONSTANTS\fR, \fB:FUNCTIONS\fR
+.RE
+
+.SS "Error values"
+.sp
+.LP
+The functions in this module return \fBundef\fR or an empty list when an
+underlying library function fails. The \fB$!\fR is set to provide more
+information values for the error. The following error codes are possible:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBEINVAL\fR\fR
+.ad
+.RS 10n
+.rt
+The value supplied is not valid.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBENOMEM\fR\fR
+.ad
+.RS 10n
+.rt
+There was not enough system memory to complete an operation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBEPERM\fR\fR
+.ad
+.RS 10n
+.rt
+The effective user of the calling process does not have appropriate privileges,
+and its real or effective user ID does not match the real or effective user ID
+of one of the threads.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBESRCH\fR\fR
+.ad
+.RS 10n
+.rt
+The specified process or thread was not found.
+.RE
+
+.SS "Difference in the API versions"
+.sp
+.LP
+The \fBliblgrp\fR(3LIB) library is versioned. The exact version that was used
+to compile a module is available through the \fBlgrp_version()\fR function.
+.sp
+.LP
+Version 2 of the \fBlgrp_user\fR API introduced the following constants and
+functions not present in version 1:
+.br
+.in +2
+\fBLGRP_RSRC_CPU\fR constant
+.in -2
+.br
+.in +2
+\fBLGRP_RSRC_MEM\fR constant
+.in -2
+.br
+.in +2
+\fBLGRP_CONTENT_ALL\fR constant
+.in -2
+.br
+.in +2
+\fBLGRP_LAT_CPU_TO_MEM\fR constant
+.in -2
+.br
+.in +2
+\fBlgrp_resources()\fR function
+.in -2
+.br
+.in +2
+\fBlgrp_latency_cookie()\fR function
+.in -2
+.sp
+.LP
+The \fBLGRP_RSRC_CPU\fR and \fBLGRP_RSRC_MEM\fR constants are not defined for
+version 1. The \fBlgrp_resources()\fR function is defined for version 1 but
+always returns an empty list. The \fBlgrp_latency_cookie()\fR function is an
+alias for \fBlgrp_latency()\fR for version 1.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUnstable
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBlgrp_affinity_get\fR(3LGRP), \fBlgrp_affinity_set\fR(3LGRP),
+\fBlgrp_children\fR(3LGRP), \fBlgrp_cookie_stale\fR(3LGRP),
+\fBlgrp_cpus\fR(3LGRP), \fBlgrp_fini\fR(3LGRP), \fBlgrp_home\fR(3LGRP),
+\fBlgrp_init\fR(3LGRP), \fBlgrp_latency\fR(3LGRP),
+\fBlgrp_latency_cookie\fR(3LGRP), \fBlgrp_mem_size\fR(3LGRP),
+\fBlgrp_nlgrps\fR(3LGRP), \fBlgrp_parents\fR(3LGRP),
+\fBlgrp_resources\fR(3LGRP), \fBlgrp_root\fR(3LGRP), \fBlgrp_version\fR(3LGRP),
+\fBlgrp_view\fR(3LGRP), \fBliblgrp\fR(3LIB), \fBattributes\fR(5)
diff --git a/usr/src/man/man3perl/Makefile b/usr/src/man/man3perl/Makefile
new file mode 100644
index 0000000000..3c30b0a0ea
--- /dev/null
+++ b/usr/src/man/man3perl/Makefile
@@ -0,0 +1,52 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
+#
+
+# Copyright 2011, Richard Lowe
+
+include ../../Makefile.master
+
+MANSECT = 3perl
+
+MANFILES = Exacct.3perl \
+ Exacct\:\:Catalog.3perl \
+ Exacct\:\:File.3perl \
+ Exacct\:\:Object.3perl \
+ Exacct\:\:Object\:\:Group.3perl \
+ Exacct\:\:Object\:\:Item.3perl \
+ Kstat.3perl \
+ Lgrp.3perl \
+ Privilege.3perl \
+ Project.3perl \
+ Task.3perl \
+ Ucred.3perl
+
+.KEEP_STATE:
+
+include ../Makefile.man
+
+#
+# When KEEP_STATE is in effect and a target has a colon in the name (like the
+# Exacct::* pages above, dmake will write them to the state file unescaped,
+# creating a file which then cannot be reparsed, breaking any build other than
+# the first in this directory:
+#
+# See CR 6987108 make will write un-escaped :'s to .make.state, break itself
+#
+# As a workaround, install the files manually in a FRC target.
+CMD= $(INS) -s -m $(FILEMODE) -f $(ROOTMAN)/man$(MANSECT)
+install: FRC
+ @for file in $(MANFILES); do \
+ if [[ $$file -nt $(ROOTMAN)/man$(MANSECT)/$$file ]]; then \
+ $(ECHO) $(CMD) $$file; \
+ $(RM) $(ROOTMAN)man$(MANSECT)/$$file; \
+ $(CMD) $$file; \
+ fi \
+ done;
diff --git a/usr/src/man/man3perl/Privilege.3perl b/usr/src/man/man3perl/Privilege.3perl
new file mode 100644
index 0000000000..454a389a5e
--- /dev/null
+++ b/usr/src/man/man3perl/Privilege.3perl
@@ -0,0 +1,332 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
+.\" 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 or http://www.opensolaris.org/os/licensing. 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]
+.TH Privilege 3PERL "30 Jan 2004" "SunOS 5.11" "Perl Library Functions"
+.SH NAME
+Privilege \- Perl interface to Privileges
+.SH SYNOPSIS
+.LP
+.nf
+use Sun::Solaris::Privilege qw(:ALL);
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+This module provides wrappers for the Privilege-related system and library
+calls. Also provided are constants from the various Privilege-related headers
+and dynamically-generated constants for all the privileges and privilege sets.
+.SS "Constants"
+.sp
+.LP
+\fBPRIV_STR_SHORT\fR, \fBPRIV_STR_LIT\fR, \fBPRIV_STR_PORT\fR, \fBPRIV_ON\fR,
+\fBPRIV_OFF\fR, \fBPRIV_SET\fR, \fBPRIV_AWARE\fR, and \fBPRIV_DEBUG\fR.
+.SS "Functions"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetppriv($which)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the process privilege set specified by
+\fB\fR\fB$which\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsetppriv($op, $which, $set)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function modified the privilege set specified by $which in the as
+specified by the \fB$op\fR and \fB$set\fR arguments. If \fB$op\fR is
+\fBPRIV_ON\fR, the privileges in \fB$set\fR are added to the set specified. If
+\fB$op\fR is \fBPRIV_OFF\fR, the privileges in \fB$set\fR are removed from the
+set specified. If \fB$op\fR is \fBPRIV_SET\fR, the specified set is made equal
+to \fB$set\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetpflags($flag)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the value associated with process \fB$flag\fR or
+\fBundef\fR on error. Possible values for \fB$flag\fR are \fBPRIV_AWARE\fR and
+\fBPRIV_DEBUG\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsetppflags($flag, $val)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function sets the process flag \fB$flag\fR to \fB$val\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_fillset()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns a new privilege set with all privileges set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_emptyset()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns a new empty privilege set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_isemptyset($set)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns whether or not \fB$set\fR is empty.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_isfullset($set)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns whether or not \fB$set\fR is full.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_isequalset($a, $b)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns whether sets \fB$a\fR and \fB$b\fR are equal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_issubset($a, $b)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns whether set \fB$a\fR is a subset of \fB$b\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_ismember($set, $priv)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns whether \fB$priv\fR is a member of \fB$set\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_ineffect($priv)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returned whether \fB$priv\fR is in the process's effective set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_intersect($a, $b)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns a new privilege set which is the intersection of \fB$a\fR
+and \fB$b\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_union($a, $b)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns a new privilege set which is the union of \fB$a\fR and
+\fB$b\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_inverse($a)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns a new privilege set which is the inverse of \fB$a\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_addset($set, $priv)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This functon adds the privilege \fB$priv\fR to \fB$set\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_copyset($a)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns a copy of the privilege set \fB$a\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpriv_delset($set, $priv)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function remove the privilege \fB$priv\fR from \fB$set\fR.
+.RE
+
+.SS "Class methods"
+.sp
+.LP
+None.
+.SS "Object methods"
+.sp
+.LP
+None.
+.SS "Exports"
+.sp
+.LP
+By default nothing is exported from this module. The following tags can be used
+to selectively import constants and functions defined in this module:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:SYSCALLS\fR\fR
+.ad
+.RS 14n
+.rt
+\fBgetppriv()\fR, \fBsetppriv()\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:LIBCALLS\fR\fR
+.ad
+.RS 14n
+.rt
+\fBpriv_addset()\fR, \fBpriv_copyset()\fR, \fBpriv_delset()\fR,
+\fBpriv_emptyset()\fR, \fBpriv_fillset()\fR, \fBpriv_intersect()\fR,
+\fBpriv_inverse()\fR, \fBpriv_isemptyset()\fR, \fBpriv_isequalset()\fR,
+\fBpriv_isfullset()\fR, \fBpriv_ismember()\fR, \fBpriv_issubset()\fR,
+\fBpriv_gettext()\fR, \fBpriv_union()\fR, \fBpriv_set_to_str()\fR,
+\fBpriv_str_to_set()\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:CONSTANTS\fR\fR
+.ad
+.RS 14n
+.rt
+\fBPRIV_STR_SHORT\fR, \fBPRIV_STR_LIT\fR, \fBPRIV_STR_PORT\fR, \fBPRIV_ON\fR,
+\fBPRIV_OFF\fR, \fBPRIV_SET\fR, \fBPRIV_AWARE\fR, \fBPRIV_DEBUG\fR, plus
+constants for all privileges and privilege sets.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:VARIABLES\fR\fR
+.ad
+.RS 14n
+.rt
+\fB%PRIVILEGES\fR, \fB%PRIVSETS\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:ALL\fR\fR
+.ad
+.RS 14n
+.rt
+\fB:SYSCALLS\fR, \fB:LIBCALLS\fR, \fB:CONSTANTS\fR, \fB:VARIABLES\fR
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBgetpflags\fR(2), \fBgetppriv\fR(2), \fBpriv_addset\fR(3C),
+\fBpriv_set\fR(3C), \fBpriv_str_to_set\fR(3C), \fBattributes\fR(5),
+\fBprivileges\fR(5)
diff --git a/usr/src/man/man3perl/Project.3perl b/usr/src/man/man3perl/Project.3perl
new file mode 100644
index 0000000000..eac8f0080d
--- /dev/null
+++ b/usr/src/man/man3perl/Project.3perl
@@ -0,0 +1,277 @@
+'\" te
+.\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved.
+.\" 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 or http://www.opensolaris.org/os/licensing. 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]
+.TH Project 3PERL "1 Dec 2002" "SunOS 5.11" "Perl Library Functions"
+.SH NAME
+Project \- Perl interface to Projects
+.SH SYNOPSIS
+.LP
+.nf
+use Sun::Solaris::Project qw(:ALL);
+my $projid = getprojid();
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+This module provides wrappers for the Project-related system calls and the
+\fBlibproject\fR(3LIB) library. Also provided are constants from the various
+Project-related headers.
+.SS "Constants"
+.sp
+.LP
+\fBMAXPROJID\fR, \fBPROJNAME_MAX\fR, \fBPROJF_PATH\fR, \fBPROJECT_BUFSZ\fR,
+\fBSETPROJ_ERR_TASK\fR, and \fBSETPROJ_ERR_POOL\fR.
+.SS "Functions"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetprojid()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the numeric project ID of the calling process or
+\fBundef\fR if the underlying \fBgetprojid\fR(2) system call is unsuccessful.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsetproject($project, $user, $flags)\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fB$user\fR is a member of the project specified by \fB$project\fR,
+\fBsetproject()\fR creates a new task and associates the appropriate resource
+controls with the process, task, and project. This function returns 0 on
+success. If the underlying task creation fails, \fBSETPROJ_ERR_TASK\fR is
+returned. If pool assignment fails, \fBSETPROJ_ERR_POOL\fR is returned. If any
+resource attribute assignments fail, an integer value corresponding to the
+offset of the failed attribute assignment in the project database is returned.
+See \fBsetproject\fR(3PROJECT).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBactiveprojects()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns a list of the currently active projects on the system.
+Each value in the list is the numeric ID of a currently active project.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetprojent()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the next entry from the project database. When called in
+a scalar context, \fBgetprojent()\fR returns only the name of the project. When
+called in a list context, \fBgetprojent()\fR returns a 6-element list
+consisting of:
+.sp
+.in +2
+.nf
+($name, $projid, $comment, \e@users, \e@groups, $attr)
+.fi
+.in -2
+
+\e@users and \e@groups are returned as arrays containing the appropriate user
+or project lists. On end-of-file \fBundef\fR is returned.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsetprojent()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function rewinds the project database to the beginning of the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBendprojent()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function closes the project database.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetprojbyname($name)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function searches the project database for an entry with the specified
+nam. It returns a 6-element list as returned by \fBgetprojent()\fR if the entry
+is found and \fBundef\fR if it cannot be found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetprojbyid($id)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function searches the project database for an entry with the specified ID.
+It returns a 6-element list as returned by \fBgetprojent()\fR if the entry is
+found or \fBundef\fR if it cannot be found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetdefaultproj($user)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the default project entry for the specified user in the
+same format as \fBgetprojent()\fR. It returns \fBundef\fR if the user cannot be
+found. See \fBgetdefaultproj\fR(3PROJECT) for information about the lookup
+process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfgetprojent($filehandle)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the next project entry from \fB$filehandle\fR, a Perl
+file handle that must refer to a previously opened file in \fBproject\fR(4)
+format. Return values are the same as for \fBgetprojent()\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinproj($user, $project)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function checks whether the specified user is able to use the project.
+This function returns true if the user can use the project and false otherwise.
+See \fBinproj\fR(3PROJECT).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetprojidbyname($project)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function searches the project database for the specified project. It
+returns the project ID if the project is found and \fBundef\fR if it is not
+found.
+.RE
+
+.SS "Class methods"
+.sp
+.LP
+None.
+.SS "Object methods"
+.sp
+.LP
+None.
+.SS "Exports"
+.sp
+.LP
+By default nothing is exported from this module. The following tags can be used
+to selectively import constants and functions defined in this module:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:SYSCALLS\fR\fR
+.ad
+.RS 14n
+.rt
+\fBgetprojid()\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:LIBCALLS\fR\fR
+.ad
+.RS 14n
+.rt
+\fBsetproject()\fR, \fBactiveprojects()\fR, \fBgetprojent()\fR,
+\fBsetprojent()\fR, \fBendprojent()\fR, \fBgetprojbyname()\fR,
+\fBgetprojbyid()\fR, \fBgetdefaultproj()\fR, \fBfgetprojent()\fR,
+\fBinproj()\fR, and \fBgetprojidbyname()\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:CONSTANTS\fR\fR
+.ad
+.RS 14n
+.rt
+\fBMAXPROJID\fR, \fBPROJNAME_MAX\fR, \fBPROJF_PATH\fR, \fBPROJECT_BUFSZ\fR,
+\fBSETPROJ_ERR_TASK\fR, and \fBSETPROJ_ERR_POOL\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:ALL\fR\fR
+.ad
+.RS 14n
+.rt
+:SYSCALLS\fB\fR, \fB:LIBCALLS\fR, and \fB:CONSTANTS\fR
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBgetprojid\fR(2), \fBgetdefaultproj\fR(3PROJECT), \fBinproj\fR(3PROJECT),
+\fBlibproject\fR(3LIB), \fBsetproject\fR(3PROJECT), \fBproject\fR(4),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man3perl/Task.3perl b/usr/src/man/man3perl/Task.3perl
new file mode 100644
index 0000000000..24de606d82
--- /dev/null
+++ b/usr/src/man/man3perl/Task.3perl
@@ -0,0 +1,118 @@
+'\" te
+.\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved.
+.\" 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 or http://www.opensolaris.org/os/licensing. 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]
+.TH Task 3PERL "1 Dec 2002" "SunOS 5.11" "Perl Library Functions"
+.SH NAME
+Task \- Perl interface to Tasks
+.SH SYNOPSIS
+.LP
+.nf
+use Sun::Solaris::Task qw(:ALL);
+my $taskid = gettaskid();
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+This module provides wrappers for the \fBgettaskid\fR(2) and \fBsettaskid\fR(2)
+system calls.
+.SS "Constants"
+.sp
+.LP
+\fBTASK_NORMAL\fR, \fBTASK_FINAL\fR.
+.SS "Functions"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsettaskid($project, $flags)\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fB$project\fR parameter must be a valid project ID and the \fB$flags\fR
+parameter must be \fBTASK_NORMAL\fR or \fBTASK_FINAL\fR. The parameters are
+passed through directly to the underlying \fBsettaskid()\fR system call. The
+new task ID is returned if the call succeeds. On failure \(mi1 is returned.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgettaskid()\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the numeric task ID of the calling process, or
+\fBundef\fR if the underlying \fBgettaskid()\fR system call is unsuccessful.
+.RE
+
+.SS "Class methods"
+.sp
+.LP
+None.
+.SS "Object methods"
+.sp
+.LP
+None.
+.SS "Exports"
+.sp
+.LP
+By default nothing is exported from this module. The following tags can be used
+to selectively import constants and functions defined in this module:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:SYSCALLS\fR\fR
+.ad
+.RS 14n
+.rt
+\fBsettaskid()\fR and \fBgettaskid()\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:CONSTANTS\fR\fR
+.ad
+.RS 14n
+.rt
+\fBTASK_NORMAL\fR and \fBTASK_FINAL\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:ALL\fR\fR
+.ad
+.RS 14n
+.rt
+\fB:SYSCALLS\fR and \fB:CONSTANTS\fR
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBgettaskid\fR(2), \fBsettaskid\fR(2), \fBattributes\fR(5)
diff --git a/usr/src/man/man3perl/Ucred.3perl b/usr/src/man/man3perl/Ucred.3perl
new file mode 100644
index 0000000000..f8b94a481e
--- /dev/null
+++ b/usr/src/man/man3perl/Ucred.3perl
@@ -0,0 +1,256 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
+.\" 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 or http://www.opensolaris.org/os/licensing. 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]
+.TH Ucred 3PERL "30 Jan 2004" "SunOS 5.11" "Perl Library Functions"
+.SH NAME
+Ucred \- Perl interface to User Credentials
+.SH SYNOPSIS
+.LP
+.nf
+use Sun::Solaris::Ucred qw(:ALL);
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+This module provides wrappers for the Ucred-related system and library calls.
+.SS "Constants"
+.sp
+.LP
+None.
+.SS "Functions"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_get($pid)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the credential of the process specified by \fB$pid\fR if
+the process exists and the calling process is permitted to obtain the
+credentials of that process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetpeerucred($fd)\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fB$fd\fR is a connected connection-oriented TLI endpoint, a connected
+\fBSOCK_STREAM\fR, or a \fBSOCK_SEQPKT\fR socket, \fBgetpeerucred()\fR returns
+the user credential of the peer at the time the connection was established, if
+availble.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_geteuid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the effective uid of a user credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getruid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the real uid of a user credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getsuid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the saved uid of a user credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getegid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the effective group of a user credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getrgid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the real group of a user credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getsgid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the saved group of a user credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getgroups($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the list of supplemental groups of a user credential, if
+available.An array of groups is returned in \fBARRAY\fR context; the number of
+groups is returned in \fBSCALAR\fR context.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getprivset($ucred, $which)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the privilege set specified by \fB$which\fR of a user
+credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getpflags($ucred, $flags)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the value of a specific process flag of a user
+credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getpid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the process ID of a user credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getprojid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the project ID of a user credential, if available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBucred_getzoneid($ucred)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This function returns the zone ID of a user credential, if available.
+.RE
+
+.SS "Class methods"
+.sp
+.LP
+None.
+.SS "Object methods"
+.sp
+.LP
+None.
+.SS "Exports"
+.sp
+.LP
+By default nothing is exported from this module. The following tags can be used
+to selectively import constants and functions defined in this module:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:SYSCALLS\fR\fR
+.ad
+.RS 13n
+.rt
+\fBucred_get()\fR, \fBgetpeerucred()\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:LIBCALLS\fR\fR
+.ad
+.RS 13n
+.rt
+\fBucred_geteuid()\fR, \fBucred_getruid()\fR, \fBucred_getsuid()\fR,
+\fBucred_getegid()\fR, \fBucred_getrgid()\fR, \fBucred_getsgid()\fR,
+\fBucred_getgroups()\fR, \fBucred_getprivset()\fR, \fBucred_getpflags()\fR,
+\fBucred_getpid()\fR, \fBucred_getzone()\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:ALL\fR\fR
+.ad
+.RS 13n
+.rt
+\fB:SYSCALLS()\fR, \fB:LIBCALLS()\fR
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBgetpeerucred\fR(3C), \fBucred_get\fR(3C), \fBattributes\fR(5)