xref: /onnv-gate/usr/src/cmd/perl/contrib/Sun/Solaris/Exacct/README (revision 12388:1bc8d55b0dfd)
1#
2# Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
3#
4
5Licensing
6---------
7This module is released under the Perl Artistic License.
8
9Availability
10------------
11This module is only available for Solaris 9 onwards.
12
13Description
14-----------
15This module provided access to the Solaris Extended Accounting (exacct)
16subsystem, which is part of the Solaris resource management infrastructure.
17
18For more information on Solaris Extended Accounting, see the libexacct(3LIB)
19and acctadm(1M) manpages and the following on-line documentation:
20
21System Administration Guide: Resource Management and Network Services
22Chapter 7 - Extended Accounting
23http://docs.sun.com/db/doc/816-7125, or any later version
24
25An example of how this module might be used is to dump the contents of an
26exacct data file:
27
28use Sun::Solaris::Exacct qw(:EXACCT_ALL);
29die("Usage is dumpexacct <exacct file>\n") unless (@ARGV == 1);
30my $ef = ea_new_file($ARGV[0], &O_RDONLY) || die(ea_error_str());
31printf("Creator:  %s\n", $ef->creator());
32printf("Hostname: %s\n\n", $ef->hostname());
33while (my $obj = $ef->get()) {
34        ea_dump_object($obj);
35}
36if (ea_error() != EXR_OK && ea_error() != EXR_EOF)  {
37        printf("\nERROR: %s\n", ea_error_str());
38        exit(1);
39}
40exit(0);
41
42Installation
43------------
44
451. Uncompress and untar the archive
462. cd to the module directory
473. perl Makefile.PL; make install
48
49If you are using gcc and wish to build this module against the perl shipped as
50part of Solaris, see the Solaris-PerlGcc module, also available from CPAN.
51