xref: /illumos-gate/usr/src/cmd/perl/contrib/Sun/Solaris/Project/README (revision 8b80e8cb6855118d46f605e91b5ed4ce83417395)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29Licensing
30---------
31This module is released under the Perl Artistic License.
32
33Availability
34------------
35This module is only available for Solaris 9 onwards.
36
37Description
38-----------
39This module provided access to the Solaris Project subsystem, which is part of
40the Solaris resource management infrastructure.
41
42For more information on Solaris Projects, see the project(4) manpage and the
43following on-line documentation:
44
45System Administration Guide: Resource Management and Network Services
46Chapter 6 - Projects and Tasks
47http://docs.sun.com/db/doc/816-7125
48
49An example of how this module might be used is to put the Apache httpd under
50resource management control, so that the total resources used by Apache can be
51limited using Solaris resource management.  Assuming mod_perl is installed for
52Apache, and a project with the appropriate limits has been established
53(see documentation references above), the following code in the Apache Perl
54startup file will place Apache under RM control:
55
56use Sun::Solaris::Project qw(:ALL);
57my $user = getpwuid(Apache->server->uid());
58setproject(getdefaultproj($user), $user, 0) == 0 || die($!);
59
60Installation
61------------
62
631. Uncompress and untar the archive
642. cd to the module directory
653. perl Makefile.PL; make install
66
67If you are using gcc and wish to build this module against the perl shipped as
68part of Solaris, see the Solaris-PerlGcc module, also available from CPAN.
69