2 .\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
3 .\" Copyright 1989 AT&T
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH ACCTPRC 8 "Jul 15, 2004"
9 acctprc, acctprc1, acctprc2 \- process accounting
13 \fB/usr/lib/acct/acctprc\fR
18 \fB/usr/lib/acct/acctprc1\fR [\fIctmp\fR]
23 \fB/usr/lib/acct/acctprc2\fR
29 \fBacctprc\fR reads the standard input and converts it to total accounting
30 records (see the \fBtacct\fR record in \fBacct.h\fR(3HEAD)). \fBacctprc\fR
31 divides CPU time into prime time and non-prime time and determines mean memory
32 size (in memory segment units). \fBacctprc\fR then summarizes the \fBtacct\fR
33 records, according to user IDs, and adds login names corresponding to the user
34 IDs. The summarized records are then written to the standard output.
35 \fBacctprc1\fR reads input in the form described by \fBacct.h\fR(3HEAD), adds
36 login names corresponding to user \fBIDs,\fR then writes for each process an
37 \fBASCII\fR line giving user \fBID,\fR login name, prime \fBCPU\fR time (tics),
38 non-prime \fBCPU\fR time (tics), and mean memory size (in memory segment
39 units). If \fIctmp\fR is given, it should contain a list of login sessions
40 sorted by user \fBID\fR and login name. If this file is not supplied, it
41 obtains login names from the password file, just as \fBacctprc\fR does. The
42 information in \fIctmp\fR helps it distinguish between different login names
43 that share the same user \fBID.\fR
46 From the standard input, \fBacctprc2\fR reads records in the form written by
47 \fBacctprc1\fR, summarizes them according to user \fBID\fR and name, then
48 writes the sorted summaries to the standard output as total accounting records.
51 \fBExample 1 \fRExamples of \fBacctprc\fR.
54 The \fBacctprc\fR command is typically used as shown below:
59 example% acctprc \|< /var/log/pacct \|> ptacct
66 The \fBacctprc1\fR and \fBacctprc2s\fR commands are typically used as shown
72 example% acctprc1 \|ctmp \|</var/log/pacct
73 example% acctprc2 > ptacct
82 \fB\fB/etc/passwd\fR\fR
91 \fBacctcom\fR(1), \fBacct\fR(8), \fBacctcms\fR(8), \fBacctcon\fR(8),
92 \fBacctmerg\fR(8), \fBacctsh\fR(8), \fBcron\fR(8), \fBfwtmp\fR(8),
93 \fBrunacct\fR(8), \fBacct\fR(2), \fBacct.h\fR(3HEAD), \fButmpx\fR(4),
98 Although it is possible for \fBacctprc1\fR to distinguish among login names
99 that share user \fBIDs\fR for commands run from a command line, it is difficult
100 for \fBacctprc1\fR to make this distinction for commands invoked in other ways.
101 A command run from \fBcron\fR(8) is an example of where \fBacctprc1\fR might
102 have difficulty. A more precise conversion can be done using the \fBacctwtmp\fR
103 program in \fBacct\fR(8). \fBacctprc\fR does not distinguish between users
104 with identical user IDs.
107 A memory segment of the mean memory size is a unit of measure for the number of
108 bytes in a logical memory segment on a particular processor.
111 During a single invocation of any given command, the \fBacctprc\fR,
112 \fBacctprc1\fR, and \fBacctprc2\fR commands can process a maximum of
117 6000 distinct sessions
123 1000 distinct terminal lines
129 2000 distinct login names
133 If at some point the actual number of any one of these items exceeds the
134 maximum, the command will not succeed.