Solaris Containers: Resource Management and Solaris Zones Developer's Guide

Sun::Solaris::Exacct Module

The Sun::Solaris::Exacct module provides wrappers for the ea_error(3EXACCT) function, and for all the exacct system calls.

Sun::Solaris::Exacct Constants

The Sun::Solaris::Exacct module provides constants from the various exacct header files. The P_PID, P_TASKID, P_PROJID and all the EW_*, EP_*, EXR_* macros are extracted during the module build process. The macros are extracted from the exacct header files under /usr/include and provided as Perl constants. Constants passed to the Sun::Solaris::Exacct functions can either be an integer value such as. EW_FINAL or a string representation of the same variable such as. “EW_FINAL”.

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

The perl extensions to the libexacct(3LIB) API provide the following functions for the Sun::Solaris::Exacct module.

getacct(2)

putacct(2)

wracct(2)

ea_error(3EXACCT)

ea_error_str

ea_register_catalog

ea_new_file

ea_new_item

ea_new_group

ea_dump_object


Note –

ea_error_str() is provided as a convenience, so that repeated blocks of code like the following can be avoided:

if (ea_error() == EXR_SYSCALL_FAIL) {
        print("error: $!\n");
} else {
        print("error: ", ea_error(), "\n");
}

The Sun::Solaris::Exacct module has no class methods.

The Sun::Solaris::Exacct module has no object methods.

Sun::Solaris::Exacct Exports

By default, nothing is exported from this module. The following tags can be used to selectively import constants and functions defined in this module.

Tag 

Constant or Function 

:SYSCALLS

getacct(), putacct(), wracct()

:LIBCALLS

ea_error(), ea_error_str()

:CONSTANTS

P_PID, P_TASKID, P_PROJID

, EW_*, EP_*, EXR_*

:SHORTAND

ea_register_catalog(), ea_new_catalog(), ea_new_file(), ea_new_item(), ea_new_group(), ea_dump_object()

:ALL

:SYSCALLS, :LIBCALLS, :CONSTANTS and :SHORTHAND

:EXACCT_CONSTANTS

:CONSTANTS, plus the :CONSTANTS tags for Sun::Solaris::Catalog, Sun::Solaris::File, Sun::Solaris::Object

:EXACCT_ALL

:ALL, plus the :ALL tags for Sun::Solaris::Catalog, Sun::Solaris::File, Sun::Solaris::Object