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

Chapter 4 Using the Perl Interface to Extended Accounting

The Perl interface provides a Perl binding to the extended accounting tasks and projects. The interface allows the accounting files produced by the exacct framework to be read by Perl scripts. The interface also allows the writing of exacct files by Perl scripts.

This chapter includes the following topics:

Extended Accounting Overview

The exacct is a new accounting framework for the Solaris operating system provides additional functionality to that provided by the traditional SVR4 accounting mechanism. Traditional SVR4 accounting has these drawbacks:

The exacct framework addresses the limitations of SVR4 accounting and provides a configurable, open, and extensible framework for the collection of accounting data.

For a more extensive overview of extended accounting, see Chapter 4, Extended Accounting (Overview), in System Administration Guide: Solaris Containers-Resource Management and Solaris Zones.

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";

Perl Modules

The various project, task and exacct-related functions have been separated into groups, and each group is placed in a separate Perl module. Each function has the Sun Microsystems standard Sun::Solaris:: Perl package prefix.

Table 4–1 Perl Modules

Module 

Description 

Sun::Solaris::Project Module

Provides functions to access the project manipulation functions: getprojid(2), setproject(3PROJECT), project_walk(3PROJECT), getprojent(3PROJECT), getprojbyname(3PROJECT), getprojbyid(3PROJECT), getdefaultproj(3PROJECT), inproj(3PROJECT), getprojidbyname(3PROJECT), setprojent(3PROJECT), endprojent(3PROJECT), fgetprojent(3PROJECT).

Sun::Solaris::Task Module

Provides functions to access the task manipulation functions settaskid(2) and gettaskid(2).

Sun::Solaris::Exacct Module

Top-level exacct module. Functions in this module access both the exacct-related system calls getacct(2), putacct(2), and wracct(2) as well as the libexacct(3LIB) library function ea_error(3EXACCT). This module contains constants for all the various exacct EO_*, EW_*, EXR_*, P_* and TASK_* macros.

Sun::Solaris::Exacct::Catalog Module

Provides object-oriented methods to access the bitfields within an exacct catalog tag as well as the EXC_*, EXD_* and EXD_* macros.

Sun::Solaris::Exacct::File Module

Provides object-oriented methods to access the libexacct(3LIB) accounting file functions: ea_open(3EXACCT), ea_close(3EXACCT), ea_get_creator(3EXACCT), ea_get_hostname(3EXACCT), ea_next_object(3XACCT), ea_previous_object(3EXACCT), ea_write_object(3EXACCT).

Sun::Solaris::Exacct::Object Module

Provides object-oriented methods to access the individual exacct accounting file object. An exacct object is represented as an opaque reference that is blessed into the appropriate Sun::Solaris::Exacct::Object subclass. This module is further subdivided into the two types of possible object: Item and Group. Methods are also provided to access the ea_match_object_catalog(3EXACCT), ea_attach_to_object(3EXACCT) functions.

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

Provides object-oriented methods to access an individual exacct accounting file Item. Objects of this type inherit from Sun::Solaris::Exacct::Object.

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

Provides object-oriented methods to access an individual exacct accounting file Group. Objects of this type inherit from Sun::Solaris::Exacct::Object, and provide access to the ea_attach_to_group(3EXACCT) function. The Items contained within the Group are presented as a perl array.

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

Private array type, used as the type of the array within a Sun::Solaris::Exacct::Object::Group.

Sun::Solaris::Project Module

The Sun::Solaris::Project module provides wrappers for the project-related system calls and the libproject(3LIB) library.

Sun::Solaris::Project Constants

The Sun::Solaris::Project module uses constants from the project-related header files.

MAXPROJID

PROJNAME_MAX

PROJF_PATH

PROJECT_BUFSZ

SETPROJ_ERR_TASK

SETPROJ_ERR_POOL

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

The perl extensions to the libexacct(3LIB) API provide the following functions for projects.

setproject(3PROJECT)

setprojent(3PROJECT)

getdefaultproj(3PROJECT)

inproj(3PROJECT)

getprojent(3PROJECT)

fgetprojent(3PROJECT)

getprojbyname(3PROJECT)

getprojbyid(3PROJECT)

getprojbyname(3PROJECT)

endprojent(3PROJECT)

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

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

Sun::Solaris::Project 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

getprojid()

:LIBCALLS

setproject(), activeprojects(), getprojent(), setprojent(), endprojent(), getprojbyname(), getprojbyid(), getdefaultproj(), fgetprojent(), inproj(), getprojidbyname()

:CONSTANTS

MAXPROJID_TASK, PROJNAME_MAX, PROJF_PATH, PROJECT_BUFSZ, SETPROJ_ERR, SETPROJ_ERR_POOL

:ALL

:SYSCALLS, :LIBCALLS, :CONSTANTS

Sun::Solaris::Task Module

The Sun::Solaris::Task module provides wrappers for the settaskid(2) and gettaskid(2) system calls.

Sun::Solaris::Task Constants

The Sun::Solaris::Task module uses the following constants.

TASK_NORMAL

TASK_FINAL

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

The perl extensions to the libexacct(3LIB) API provides the following functions for tasks.

settaskid(2)

gettaskid(2)

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

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

Sun::Solaris::Task 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

settaskid(), gettaskid()

:CONSTANTS

TASK_NORMAL and TASK_FINAL

:ALL

:SYSCALLS and :CONSTANTS

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

Sun::Solaris::Exacct::Catalog Module

The Sun::Solaris::Exacct::Catalog module 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 Sun::Solaris::Exacct::Catalog class. Methods can be used to manipulate fields in a catalog tag.

Sun::Solaris::Exacct::Catalog Constants

All the EXT_*, EXC_* and EXD_* macros are extracted during the module build process from the /usr/include/sys/exact_catalog.h file and are provided as constants. Constants passed to the Sun::Solaris::Exacct::Catalog methods can either be an integer value, such as EXT_UINT8, or the string representation of the same variable, such as “EXT_UINT8”.

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

The Perl extensions to the libexacct(3LIB) API provide the following class methods forSun::Solaris::Exacct::Catalog. Exacct(3PERL) andExacct::Catalog(3PERL)

register

new

The Perl extensions to the libexacct(3LIB) API provide the following object methods for Sun::Solaris::Exacct::Catalog.

value

type

catalog

id

type_str

catalog_str

id_str

Sun::Solaris::Exacct::Catalog 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 

:CONSTANTS

EXT_*, EXC_* and EXD_*.

:ALL

:CONSTANTS

Additionally, any constants defined with the register() function can optionally be exported into the caller's package.

Sun::Solaris::Exacct::File Module

The Sun::Solaris::Exacct::File module provides wrappers for the exacct functions that manipulate accounting files. The interface is object-oriented, and allows the creation and reading of exacct files. The C library calls that are wrapped by this module are:

ea_open(3EXACCT)

ea_close(3EXACCT)

ea_next_object(3EXACCT)

ea_previous_object(3EXACCT)

ea_write_object(3EXACCT)

ea_get_object(3EXACCT)

ea_get_creator(3EXACCT)

ea_get_hostname(3EXACCT)

The file read and write methods operate on Sun::Solaris::Exacct::Object objects. These methods perform all the necessary memory management, packing, unpacking and structure conversions that are required.

Sun::Solaris::Exacct::File Constants

Sun::Solaris::Exacct::File provides the EO_HEAD, EO_TAIL, EO_NO_VALID_HDR, EO_POSN_MSK and EO_VALIDATE_MSK constants. Other constants that are needed by the new() method are in the standard Perl Fcntl module. Table 4–2 describes the action of new() for various values of $oflags and $aflags.

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

The Sun::Solaris::Exacct::File module has no functions.

The Perl extensions to the libexacct(3LIB) API provide the following class method forSun::Solaris::Exacct::File.

new

The following table describes the new() action for combinations of the $oflags and $aflags parameters.

Table 4–2 $oflags and $aflags Parameters

$oflags 

$aflags 

Action 

O_RDONLY

Absent or EO_HEAD

Open for reading at the start of the file. 

O_RDONLY

EO_TAIL

Open for reading at the end of the file. 

O_WRONLY

Ignored 

File must exist, open for writing at the end of the file. 

O_WRONLY | O_CREAT

Ignored 

Create file if the file does not exist. Otherwise, truncate, and open for writing. 

O_RDWR

Ignored 

File must exist, open for reading or writing, at the end of the file. 

O_RDWR | O_CREAT

Ignored 

Create file if the file does not exist. Otherwise, truncate, and open for reading or writing. 


Note –

The only valid values for $oflags are the combinations of O_RDONLY, O_WRONLY, O_RDWR or O_CREAT. $aflags describes the required positioning in the file for O_RDONLY. Either EO_HEAD or EO_TAIL are allowed. If absent, EO_HEAD is assumed.


The perl extensions to the libexacct(3LIB) API provide the following object methods forSun::Solaris::Exacct::File.

creator

hostname

next

previous

get

write


Note –

Close a Sun::Solaris::Exacct::File. There is no explicit close() method for a Sun::Solaris::Exacct::File. The file is closed when the filehandle object is undefined or reassigned.


Sun::Solaris::Exacct::File Exports

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

Tag 

Constant or Function 

:CONSTANTS

EO_HEAD, EO_TAIL, EO_NO_VALID_HDR, EO_POSN_MSK, EO_VALIDATE_MSK.

:ALL

:CONSTANTS and Fcntl(:DEFAULT).

Sun::Solaris::Exacct::Object Module

The Sun::Solaris::Exacct::Object module serves as a parent of the two possible types of exacct objects: Items and Groups. An exacct Item is a single data value, an embedded exacct object, or a block of raw data. An example of a single data value is the number of seconds of user CPU time consumed by a process. An exacct Group is an ordered collection of 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 exacct objects inside the enclosing Group.

The Sun::Solaris::Exacct::Object module contains methods that are common to both exacct Items and Groups. Note that the attributes of Sun::Solaris::Exacct::Object and all classes derived from it are read-only after initial creation via new(). The attributes made read-only prevents the inadvertent modification of the attributes which could give rise to inconsistent catalog tags and data values. The only exception to the read-only attributes is the array used to store the Items inside a Group object. This array can be modified using the normal perl array operators.

Sun::Solaris::Exacct::Object Constants

Sun::Solaris::Exacct::Object provides the EO_ERROR, EO_NONE, EO_ITEM and EO_GROUP constants.

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

The Sun::Solaris::Exacct::Object module has no functions.

The Perl extensions to the libexacct(3LIB) API provide the following class method forSun::Solaris::Exacct::Object.

dump

The Perl extensions to the libexacct(3LIB) API provide the following object methods forSun::Solaris::Exacct::Object.

type

catalog

match_catalog

value

Sun::Solaris::Exacct::Object 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 

:CONSTANTS

EO_ERROR, EO_NONE, EO_ITEM and EO_GROUP

:ALL

:CONSTANTS

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

The Sun::Solaris::Exacct::Object::Item module is used for exacct data Items. An exacct data Item is represented as an opaque reference, blessed into the Sun::Solaris::Exacct::Object::Item class, which is a subclass of the Sun::Solaris::Exacct::Object class. The underlying exacct data types are mapped onto Perl types as follows.

Table 4–3 exacct Data Types Mapped to Perl Data Types

exacct type

Perl internal type 

EXT_UINT8

IV (integer) 

EXT_UINT16

IV (integer) 

EXT_UINT32

IV (integer) 

EXT_UINT64

IV (integer) 

EXT_DOUBLE

NV (double) 

EXT_STRING

PV (string) 

EXT_EXACCT_OBJECT

Sun::Solaris::Exacct::Object subclass

EXT_RAW

PV (string) 

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

Sun::Solaris::Exacct::Object::Item has no constants.

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

Sun::Solaris::Exacct::Object::Item has no functions.

Sun::Solaris::Exacct::Object::Item inherits all class methods from the Sun::Solaris::Exacct::Object base class, plus the new() class method.

new

Sun::Solaris::Exacct::Object::Item inherits all object methods from the Sun::Solaris::Exacct::Object base class.

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

Sun::Solaris::Exacct::Object::Item has no exports.

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

The Sun::Solaris::Exacct::Object::Group module is used for exacct Group objects. An exacct Group object is represented as an opaque reference, blessed into the Sun::Solaris::Exacct::Object::Group class, which is a subclass of the Sun::Solaris::Exacct::Object class. The Items within a Group are stored inside a Perl array, and a reference to the array can be accessed via the inherited value() method. This means that 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 Sun::Solaris::Exacct::Object class. Group objects can also be nested inside each other merely by adding an existing Group as a data Item.

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

Sun::Solaris::Exacct::Object::Group has no constants.

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

Sun::Solaris::Exacct::Object::Group has no functions.

Sun::Solaris::Exacct::Object::Group inherits all class methods from the Sun::Solaris::Exacct::Object base class, plus the new() class method.

new

Sun::Solaris::Exacct::Object::Group inherits all object methods from the Sun::Solaris::Exacct::Object base class, plus the new() class method.

as_hash

as_hashlist 

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

Sun::Solaris::Exacct::Object::Group has no exports.

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

The Sun::Solaris::Exacct::Object::_Array class is used internally for enforcing type checking of the data Items that are placed in an exacct Group. Sun::Solaris::Exacct::Object::_Array should not be created directly by the user.

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

Sun::Solaris::Exacct::Object::_Array has no constants.

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

Sun::Solaris::Exacct::Object::_Array has no functions.

Sun::Solaris::Exacct::Object::_Array has internal-use class methods.

Sun::Solaris::Exacct::Object::_Array uses perl TIEARRAY methods.

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

Sun::Solaris::Exacct::Object::_Array has no exports.

Perl Code Examples

This section shows perl code examples for accessing exacct files.


Example 4–1 Using the Pseudocode Prototype

In typical use the Perl exacct library reads existing exacct files. Use pseudocode to show the relationships of the various Perl exacct classes. Illustrate in pseudocode the process of opening and scanning an exacct file, and processing objects of interest. In the following pseudocode, the ‘convenience’ functions are used in the interest of clarity.

-- Open the exacct file ($f is a Sun::Solaris::Exacct::File)
my $f = ea_new_file(...)

-- While not EOF ($o is a Sun::Solaris::Exacct::Object)
while (my $o = $f->get())

        -- Check to see if object is of interest
        if ($o->type() == &EO_ITEM)
             ...

        -- Retrieve the catalog ($c is a Sun::Solaris::Exacct::Catalog)
        $c = $o->catalog()

        -- Retrieve the value
        $v = $o->value();

        -- $v is a reference to a Sun::Solaris::Exacct::Group for a Group
        if (ref($v))
              ....

        -- $v is perl scalar for Items
        else


Example 4–2 Recursively dumping an exacct Object

sub dump_object
{
    my ($obj, $indent) = @_;
    my $istr = '  ' x $indent;

    #
    # Retrieve the catalog tag.  Because we are doing this in an array
    # context, the catalog tag will be returned as a (type, catalog, id) 
    # triplet, where each member of the triplet will behave as an integer
    # or a string, depending on context.  If instead this next line provided
    # a scalar context, e.g.
    #    my $cat  = $obj->catalog()->value();
    # then $cat would be set to the integer value of the catalog tag.
    #
    my @cat = $obj->catalog()->value();

    #
    # If the object is a plain item
    #
    if ($obj->type() == &EO_ITEM) {
          #
          # Note:  The '%s' formats provide s string context, so the
          # components of the catalog tag will be displayed as the
          # symbolic values.  If we changed the '%s' formats to '%d',
          # the numeric value of the components would be displayed.
          #
          printf("%sITEM\n%s  Catalog = %s|%s|%s\n", 
              $istr, $istr, @cat);
          $indent++;

          #
          # Retrieve the value of the item.  If the item contains in 
          # turn a nested exacct object (i.e. a item or group), then 
          # the value method will return a reference to the appropriate 
          # sort of perl object (Exacct::Object::Item or 
          # Exacct::Object::Group). We could of course figure out that 
          # the item contained a nested item or group by examining 
          # the catalog tag in @cat and looking for a type of 
          # EXT_EXACCT_OBJECT or EXT_GROUP.
          my $val = $obj->value();
          if (ref($val)) {
             # If it is a nested object, recurse to dump it.
             dump_object($val, $indent);
          } else {
             # Otherwise it is just a 'plain' value, so display it.
             printf("%s  Value = %s\n", $istr, $val);
          }

        #
        # Otherwise we know we are dealing with a group.  Groups represent
        # contents as a perl list or array (depending on context), so we 
        # can process the contents of the group with a 'foreach' loop, which
        # provides a list context.  In a list context the value method 
        # returns the content of the group as a perl list, which is the 
        # quickest mechanism, but doesn't allow the group to be modified. 
        # If we wanted to modify the contents of the group we could do so 
        # like this:
        #    my $grp = $obj->value();   # Returns an array reference
        #    $grp->[0] = $newitem;
        # but accessing the group elements this way is much slower.
        #
        } else {
                printf("%sGROUP\n%s  Catalog = %s|%s|%s\n",
                    $istr, $istr, @cat);
                $indent++;
                # 'foreach' provides a list context.
                foreach my $val ($obj->value()) {
                        dump_object($val, $indent);
                }
                printf("%sENDGROUP\n", $istr);
        }
}


Example 4–3 Creating a New Group Record and Writing to a File

# Prototype list of catalog tags and values.
my @items = (
   [ &EXT_STRING | &EXC_DEFAULT | &EXD_CREATOR      => "me"         ],
   [ &EXT_UINT32 | &EXC_DEFAULT | &EXD_PROC_PID     => $$           ],
   [ &EXT_UINT32 | &EXC_DEFAULT | &EXD_PROC_UID     => $<           ],
   [ &EXT_UINT32 | &EXC_DEFAULT | &EXD_PROC_GID     => $(           ],
   [ &EXT_STRING | &EXC_DEFAULT | &EXD_PROC_COMMAND => "/bin/stuff" ],
);

# Create a new group catalog object.
my $cat = new_catalog(&EXT_GROUP | &EXC_DEFAULT | &EXD_NONE);

# Create a new Group object and retrieve its data array.
my $group = new_group($cat);
my $ary = $group->value();

# Push the new Items onto the Group array.
foreach my $v (@items) {
        push(@$ary, new_item(new_catalog($v->[0]), $v->[1]));
}

# Nest the group within itself (performs a deep copy).
push(@$ary, $group);

# Dump out the group.
dump_object($group);


Example 4–4 Dumping an exacct File

#!/usr/bin/perl

use strict;
use warnings;
use blib;
use Sun::Solaris::Exacct qw(:EXACCT_ALL);

die("Usage is dumpexacct 

# Open the exact file and display the header information.
my $ef = ea_new_file($ARGV[0], &O_RDONLY) || die(error_str());
printf("Creator:  %s\n", $ef->creator());
printf("Hostname: %s\n\n", $ef->hostname());

# Dump the file contents
while (my $obj = $ef->get()) {
        ea_dump_object($obj);
}

# Report any errors
if (ea_error() != EXR_OK && ea_error() != EXR_EOF)  {
       printf("\nERROR: %s\n", ea_error_str());
       exit(1);
}
exit(0);

Output From dump Method

This example shows the formatted output of the Sun::Solaris::Exacct::Object->dump() method.

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_UINT64|EXC_DEFAULT|EXD_PROC_CPU_USER_SEC
    Value = 0
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_CPU_USER_NSEC
    Value = 0
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_CPU_SYS_SEC
    Value = 890
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_CPU_SYS_NSEC
    Value = 760000000
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_START_SEC
    Value = 1011869897
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_START_NSEC
    Value = 380771911
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_FINISH_SEC
    Value = 0
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_FINISH_NSEC
    Value = 0
  ITEM
    Catalog = EXT_STRING|EXC_DEFAULT|EXD_PROC_COMMAND
    Value = fsflush
  ITEM
    Catalog = EXT_UINT32|EXC_DEFAULT|EXD_PROC_TTY_MAJOR
    Value = 4294967295
  ITEM
    Catalog = EXT_UINT32|EXC_DEFAULT|EXD_PROC_TTY_MINOR
    Value = 4294967295
  ITEM
    Catalog = EXT_STRING|EXC_DEFAULT|EXD_PROC_HOSTNAME
    Value = mower
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_FAULTS_MAJOR
    Value = 0
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_FAULTS_MINOR
    Value = 0
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_MESSAGES_SND
    Value = 0
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_MESSAGES_RCV
    Value = 0
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_BLOCKS_IN
    Value = 19
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_BLOCKS_OUT
    Value = 40833
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_CHARS_RDWR
    Value = 0
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_CONTEXT_VOL
    Value = 129747
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_CONTEXT_INV
    Value = 79
  ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_SIGNALS
    Value = 0
    ITEM
    Catalog = EXT_UINT64|EXC_DEFAULT|EXD_PROC_SYSCALLS
    Value = 0
  ITEM
    Catalog = EXT_UINT32|EXC_DEFAULT|EXD_PROC_ACCT_FLAGS
    Value = 1
  ITEM
    Catalog = EXT_UINT32|EXC_DEFAULT|EXD_PROC_ANCPID
    Value = 0
  ITEM
    Catalog = EXT_UINT32|EXC_DEFAULT|EXD_PROC_WAIT_STATUS
    Value = 0
ENDGROUP