xref: /illumos-gate/usr/src/lib/libexacct/demo/README (revision 7c478bd9)
1*7c478bd9Sstevel@tonic-gate#
2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate#
4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate# with the License.
8*7c478bd9Sstevel@tonic-gate#
9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate# and limitations under the License.
13*7c478bd9Sstevel@tonic-gate#
14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate#
20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate#
22*7c478bd9Sstevel@tonic-gate
23*7c478bd9Sstevel@tonic-gateCopyright 2002 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gateUse is subject to license terms.
25*7c478bd9Sstevel@tonic-gate
26*7c478bd9Sstevel@tonic-gate#ident	"%Z%%M%	%I%	%E% SMI"
27*7c478bd9Sstevel@tonic-gate
28*7c478bd9Sstevel@tonic-gate1. Introduction
29*7c478bd9Sstevel@tonic-gate
30*7c478bd9Sstevel@tonic-gateThis directory contains  source code for the "exdump"  utility that uses
31*7c478bd9Sstevel@tonic-gatelibexacct to print the content  of extended accounting files produced by
32*7c478bd9Sstevel@tonic-gatethe kernel.
33*7c478bd9Sstevel@tonic-gate
34*7c478bd9Sstevel@tonic-gateThis  utility   demonstrates  how  developers  can  use   the  libexacct
35*7c478bd9Sstevel@tonic-gateprogramming API to extract  extended accounting data. libexacct(3LIB) is
36*7c478bd9Sstevel@tonic-gatethe only interface for reading and  writing  files  in  variable  length
37*7c478bd9Sstevel@tonic-gategeneral-purpose accounting file format  used  by  the  kernel  to  store
38*7c478bd9Sstevel@tonic-gatevarious types of accounting data.
39*7c478bd9Sstevel@tonic-gate
40*7c478bd9Sstevel@tonic-gate2. Configuration
41*7c478bd9Sstevel@tonic-gate
42*7c478bd9Sstevel@tonic-gateExdump can be compiled as either a 32-bit or 64-bit application; because
43*7c478bd9Sstevel@tonic-gateexacct is endian-neutral, exdump can read exacct files from either SPARC
44*7c478bd9Sstevel@tonic-gateor Intel sources on SPARC or Intel platforms. exdump prints one line for
45*7c478bd9Sstevel@tonic-gateeach record it encounters in the exacct file.
46*7c478bd9Sstevel@tonic-gate
47*7c478bd9Sstevel@tonic-gateThe Makefile contained in this directory is set up to use the C compiler
48*7c478bd9Sstevel@tonic-gate(cc) and lint  utility found in your  $PATH.  If you wish  to change the
49*7c478bd9Sstevel@tonic-gateconfiguration, edit  the CC  and LINT macro  definitions in  Makefile to
50*7c478bd9Sstevel@tonic-gatepoint to the appropriate pathnames.
51*7c478bd9Sstevel@tonic-gate
52*7c478bd9Sstevel@tonic-gate3. Targets
53*7c478bd9Sstevel@tonic-gate
54*7c478bd9Sstevel@tonic-gateThe Makefile in this directory supports the following targets:
55*7c478bd9Sstevel@tonic-gate
56*7c478bd9Sstevel@tonic-gate	make all (default)	- build exdump executable
57*7c478bd9Sstevel@tonic-gate	make lint		- run lint against exdump
58*7c478bd9Sstevel@tonic-gate	make clean		- remove object files
59*7c478bd9Sstevel@tonic-gate	make clobber		- remove objects, and lint files
60*7c478bd9Sstevel@tonic-gate
61*7c478bd9Sstevel@tonic-gateTo  build the  exdump,  execute  "make" in  this  directory.  This  will
62*7c478bd9Sstevel@tonic-gateexecute the default "make all" target.
63*7c478bd9Sstevel@tonic-gate
64*7c478bd9Sstevel@tonic-gate4. References
65*7c478bd9Sstevel@tonic-gate
66*7c478bd9Sstevel@tonic-gateExacct files:	/var/adm/exacct/proc, /var/adm/exacct/task
67*7c478bd9Sstevel@tonic-gateMan pages:	acctadm(1M), libexacct(3LIB)
68*7c478bd9Sstevel@tonic-gateDocumentation:	"System Administration Guide:
69*7c478bd9Sstevel@tonic-gate		Resource Management and Network Services"
70*7c478bd9Sstevel@tonic-gate		"System Administration Guide: IP Services"
71