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

Document Information

Preface

1.  Resource Management in the Oracle Solaris Operating System

2.  Projects and Tasks

3.  Using the C Interface to Extended Accounting

4.  Using the Perl Interface to Extended Accounting

Extended Accounting Overview

Perl Interface to libexacct

Object Model

Benefits of Using the Perl Interface to libexacct

Perl Double-Typed Scalars

Perl Modules

Sun::Solaris::Project Module

Sun::Solaris::Project Constants

Sun::Solaris::Project Functions, Class Methods, and Object Methods

Sun::Solaris::Project Exports

Sun::Solaris::Task Module

Sun::Solaris::Task Constants

Sun::Solaris::Task Functions, Class Methods, and Object Methods

Sun::Solaris::Task Exports

Sun::Solaris::Exacct Module

Sun::Solaris::Exacct Constants

Sun::Solaris::Exacct Functions, Class Methods, and Object Methods

Sun::Solaris::Exacct Exports

Sun::Solaris::Exacct::Catalog Module

Sun::Solaris::Exacct::Catalog Constants

Sun::Solaris::Exacct::Catalog Functions, Class Methods, and Object Methods

Sun::Solaris::Exacct::Catalog Exports

Sun::Solaris::Exacct::File Module

Sun::Solaris::Exacct::File Constants

Sun::Solaris::Exacct::File Functions, Class Methods, and Object Methods

Sun::Solaris::Exacct::File Exports

Sun::Solaris::Exacct::Object Module

Sun::Solaris::Exacct::Object Constants

Sun::Solaris::Exacct::Object Functions, Class Methods, and Object Methods

Sun::Solaris::Exacct::Object Exports

Sun::Solaris::Exacct::Object::Item Module

Sun::Solaris::Exacct::Object::Item Constants

Sun::Solaris::Exacct::Object::Item Functions, Class Methods, and Object Methods

Sun::Solaris::Exacct::Object::Item Exports

Sun::Solaris::Exacct::Object::Group Module

Sun::Solaris::Exacct::Object::Group Constants

Sun::Solaris::Exacct::Object::Group Functions, Class Methods, and Object Methods

Sun::Solaris::Exacct::Object::Group Exports

Sun::Solaris::Exacct::Object::_Array Module

Sun::Solaris::Exacct::Object::_Array Constants

Sun::Solaris::Exacct::Object::_Array Functions, Class Methods, and Object Methods

Sun::Solaris::Exacct::Object::_Array Exports

Perl Code Examples

Output From dump Method

5.  Resource Controls

6.  Resource Pools

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

8.  Configuration Examples

Index

Perl Interface to libexacct

Object Model

The Sun::Solaris::Exacct module is the parent of all the classes provided by libexacct(3LIB) library. libexacct(3LIB) provides operations on types of entities: exacct format files, catalog tags and exacct objects. exacct objects are subdivided into two types.

Benefits of Using the Perl Interface to libexacct

The Perl extensions to extended accounting provide a Perl interface to the underlying libexacct(3LIB) API and offer the following enhancements.

Perl Double-Typed Scalars

The modules described in this document make extensive use of the Perl double-typed scalar facility. The double-typed scalar facility allows a scalar value to behave either as an integer or as a string, depending upon the context. This behavior is the same as exhibited by the $! Perl variable (errno). The double-typed scalar facility avoids the need to map from an integer value into the corresponding string in order to display a value. The following example illustrates the use of double-typed scalars.

# Assume $obj is a Sun::Solaris::Item
my $type = $obj->type();

# prints out "2 EO_ITEM"
printf("%d %s\n", $type, $type);

# Behaves as an integer, $i == 2
my $i = 0 + $type;

# Behaves as a string, $s = "abc EO_ITEM xyx"
my $s = "abc $type xyz";