1acctcom(1) User Commands acctcom(1)
2
3
4
6 acctcom - search and print process accounting files
7
9 acctcom [-abfhikmqrtv] [-C sec] [-e time] [-E time]
10 [-g group] [-H factor] [-I chars] [-l line]
11 [-n pattern] [-o output-file] [-O sec] [-s time]
12 [-S time] [-u user] [filename]...
13
14
16 The acctcom utility reads filenames, the standard input, or
17 /var/adm/pacct, in the form described by acct.h(3HEAD) and writes
18 selected records to standard output. Each record represents the execu‐
19 tion of one process. The output shows the COMMAND NAME, USER, TTYNAME,
20 START TIME, END TIME, REAL (SEC), CPU (SEC), MEAN SIZE (K), and option‐
21 ally, F (the fork()/exec() flag: 1 for fork() without exec()), STAT
22 (the system exit status), HOG FACTOR, KCORE MIN, CPU FACTOR, CHARS
23 TRNSFD, and BLOCKS READ (total blocks read and written).
24
25
26 A `#' is prepended to the command name if the command was executed
27 with super-user privileges. If a process is not associated with a known
28 terminal, a `?' is printed in the TTYNAME field.
29
30
31 If no filename is specified, and if the standard input is associated
32 with a terminal or /dev/null (as is the case when using `&' in the
33 shell), /var/adm/pacct is read; otherwise, the standard input is read.
34
35
36 If any filename arguments are given, they are read in their respective
37 order. Each file is normally read forward, that is, in chronological
38 order by process completion time. The file /var/adm/pacct is usually
39 the current file to be examined; a busy system may need several such
40 files of which all but the current file are found in /var/adm/pacct‐
41 incr.
42
44 The following options are supported:
45
46 -a Show some average statistics about the processes
47 selected. The statistics will be printed after the
48 output records.
49
50
51 -b Read backwards, showing latest commands first. This
52 option has no effect when standard input is read.
53
54
55 -f Print the fork()/exec() flag and system exit status
56 columns in the output. The numeric output for this
57 option will be in octal.
58
59
60 -h Instead of mean memory size, show the fraction of
61 total available CPU time consumed by the process dur‐
62 ing its execution. This "hog factor" is computed as
63 (total CPU time)/(elapsed time).
64
65
66 -i Print columns containing the I/O counts in the out‐
67 put.
68
69
70 -k Instead of memory size, show total kcore-minutes.
71
72
73 -m Show mean core size (the default).
74
75
76 -q Do not print any output records, just print the aver‐
77 age statistics as with the -a option.
78
79
80 -r Show CPU factor (user-time/(system-time + user-
81 time)).
82
83
84 -t Show separate system and user CPU times.
85
86
87 -v Exclude column headings from the output.
88
89
90 -C sec Show only processes with total CPU time (system-time
91 + user-time) exceeding sec seconds.
92
93
94 -e time Select processes existing at or before time.
95
96
97 -E time Select processes ending at or before time. Using the
98 same time for both -S and -E shows the processes that
99 existed at time.
100
101
102 -g group Show only processes belonging to group. The group may
103 be designated by either the group ID or group name.
104
105
106 -H factor Show only processes that exceed factor, where factor
107 is the "hog factor" as explained in option -h above.
108
109
110 -I chars Show only processes transferring more characters than
111 the cutoff number given by chars.
112
113
114 -l line Show only processes belonging to terminal
115 /dev/term/line.
116
117
118 -n pattern Show only commands matching pattern that may be a
119 regular expression as in regcmp(3C), except + means
120 one or more occurrences.
121
122
123 -o output-file Copy selected process records in the input data for‐
124 mat to output-file; suppress printing to standard
125 output.
126
127
128 -O sec Show only processes with CPU system time exceeding
129 sec seconds.
130
131
132 -s time Select processes existing at or after time, given in
133 the format hr[:min[:sec]].
134
135
136 -S time Select processes starting at or after time.
137
138
139 -u user Show only processes belonging to user. The user may
140 be specified by a user ID, a login name that is then
141 converted to a user ID, `#' (which designates only
142 those processes executed with superuser privileges),
143 or `?' (which designates only those processes associ‐
144 ated with unknown user IDs).
145
146
148 /etc/group system group file
149
150
151 /etc/passwd system password file
152
153
154 /var/adm/pacctincr active processes accounting file
155
156
158 See attributes(5) for descriptions of the following attributes:
159
160
161
162
163 ┌─────────────────────────────┬─────────────────────────────┐
164 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
165 ├─────────────────────────────┼─────────────────────────────┤
166 │Availability │SUNWaccu │
167 ├─────────────────────────────┼─────────────────────────────┤
168 │CSI │Enabled │
169 └─────────────────────────────┴─────────────────────────────┘
170
172 ps(1), acct(1M), acctcms(1M), acctcon(1M), acctmerg(1M), acctprc(1M),
173 acctsh(1M), fwtmp(1M), runacct(1M), su(1M), acct(2), regcmp(3C),
174 acct.h(3HEAD), utmp(4), attributes(5)
175
176
177 System Administration Guide: Basic Administration
178
180 acctcom reports only on processes that have terminated; use ps(1) for
181 active processes.
182
183
184
185SunOS 5.11 11 Jan 1996 acctcom(1)