summaryrefslogtreecommitdiff
path: root/usr/src/man/man1m/acctadm.1m
blob: 2040762f06227f837415f95c09310dd7264198cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
'\" te
.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
.\" 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.
.\" 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.
.\" 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]
.TH ACCTADM 1M "April 9, 2016"
.SH NAME
acctadm \- configure extended accounting facility
.SH SYNOPSIS
.LP
.nf
\fB/usr/sbin/acctadm\fR [\fB-DEsrux\fR] [\fB-d\fR \fIresource_list\fR]
     [\fB-e\fR \fIresource_list\fR] [\fB-f\fR \fIfilename\fR]
     [task | process | flow | net]
.fi

.SH DESCRIPTION
.LP
\fBacctadm\fR configures various attributes of the extended accounting
facility. Without arguments, \fBacctadm\fR displays the current status of the
extended accounting facility.
.SH OPTIONS
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-d\fR \fIresource_list\fR\fR
.ad
.sp .6
.RS 4n
Disable reporting of resource usage for resource. Specify \fIresource_list\fR
as a comma-separated list of resources or resource groups.
.sp
This option requires an operand. See \fBOPERANDS\fR.
.RE

.sp
.ne 2
.na
\fB\fB-D\fR\fR
.ad
.sp .6
.RS 4n
Disable accounting of the given operand type without closing the accounting
file. This option can be used to temporarily stop writing accounting records to
the accounting file without closing it. To close the file use the \fB-x\fR
option. See \fB-x\fR.
.RE

.sp
.ne 2
.na
\fB\fB-e\fR \fIresource_list\fR\fR
.ad
.sp .6
.RS 4n
Enable reporting of resource usage for resource. Specify \fIresource_list\fR as
a comma-separated list of resources or resource groups.
.sp
This option requires an operand. See \fBOPERANDS\fR.
.RE

.sp
.ne 2
.na
\fB\fB-E\fR\fR
.ad
.sp .6
.RS 4n
Enable accounting of the given operand type without sending the accounting
output to a file. This option requires an operand. See \fBOPERANDS\fR.
.RE

.sp
.ne 2
.na
\fB\fB-f\fR \fIfilename\fR\fR
.ad
.sp .6
.RS 4n
Send the accounting output for the given operand type to \fIfilename\fR. If
\fIfilename\fR exists, its contents must be of the given accounting type.
.sp
This option requires an operand. See \fBOPERANDS\fR.
.RE

.sp
.ne 2
.na
\fB\fB-r\fR\fR
.ad
.sp .6
.RS 4n
Display available resource groups.
.sp
When this option is used with an operand, it displays resource groups available
for a given accounting type. When no operand is specified, this option displays
resource groups for all available accounting types. See OPERANDS.
.RE

.sp
.ne 2
.na
\fB\fB-s\fR\fR
.ad
.sp .6
.RS 4n
Start method for the \fBsmf\fR(5) instance. This option is used to restore the
extended accounting configuration at boot.
.RE

.sp
.ne 2
.na
\fB\fB-x\fR\fR
.ad
.sp .6
.RS 4n
Deactivate accounting of the given operand type. This option also closes the
accounting file for the given accounting type if it is currently open.
.sp
This option requires an operand. See \fBOPERANDS\fR.
.RE

.SH OPERANDS
.LP
The \fB-d\fR, \fB-D\fR, \fB-e\fR, \fB-E\fR, \fB-f\fR, and \fB-x\fR options
require an operand.
.sp
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fBprocess\fR\fR
.ad
.sp .6
.RS 4n
Run \fBacctadm\fR on the process accounting components of the extended
accounting facility.
.RE

.sp
.ne 2
.na
\fB\fBtask\fR\fR
.ad
.sp .6
.RS 4n
Run \fBacctadm\fR on the task accounting components of the extended accounting
facility.
.RE

.sp
.ne 2
.na
\fB\fBflow\fR\fR
.ad
.sp .6
.RS 4n
Run \fBacctadm\fR on the IPQoS accounting components of the extended accounting
facility.
.RE

.sp
.ne 2
.na
\fB\fBnet\fR\fR
.ad
.sp .6
.RS 4n
Run \fBacctadm\fR on links and flows administered by \fBdladm\fR(1M) and
\fBflowadm\fR(1M), respectively. Basic network accounting relates only to
links, while extended network accounting includes both link and flow
accounting.
.RE

.sp
.LP
The optional final parameter to \fBacctadm\fR represents whether the command
should act on the process, system task, IPQoS, or network accounting components
of the extended accounting facility.
.SH EXAMPLES
.LP
\fBExample 1 \fRDisplaying the Current Status
.sp
.LP
The following command displays the current status. In this example, system task
accounting is active and tracking only \fBCPU\fR resources. Process and flow
accounting are not active.

.sp
.in +2
.nf
$ \fBacctadm\fR
            Task accounting: active
       Task accounting file: /var/adm/exacct/task
     Tracked task resources: extended
   Untracked task resources: host
         Process accounting: inactive
    Process accounting file: none
  Tracked process resources: none
Untracked process resources: extended,host
            Flow accounting: inactive
       Flow accounting file: none
     Tracked flow resources: none
   Untracked flow resources: extended
             Net accounting: inactive
        Net accounting file: none
      Tracked Net resources: none
    Untracked Net resources: extended
.fi
.in -2
.sp

.LP
\fBExample 2 \fRActivating Basic Process Accounting
.sp
.LP
The following command activates basic process accounting:

.sp
.in +2
.nf
$ \fBacctadm -e basic -f /var/adm/exacct/proc process\fR
.fi
.in -2
.sp

.LP
\fBExample 3 \fRDisplaying Available Resource Groups
.sp
.LP
The following command displays available resource groups:

.sp
.in +2
.nf
$ \fBacctadm -r\fR
  process:
  extended pid,uid,gid,cpu,time,command,tty,projid, \e
  taskid,ancpid,wait-status,zone,flag,memory,mstate
  basic    pid,uid,gid,cpu,time,command,tty,flag
  task:
  extended taskid,projid,cpu,time,host,mstate,anctaskid,zone
  basic    taskid,projid,cpu,time
  flow:
  extended saddr,daddr,sport,dport,proto,dsfield,nbytes,npkts, \e
  action,ctime,lseen,projid,uid
  basic    saddr,daddr,sport,dport,proto,nbytes,npkts,action
  net:
  extended name,devname,edest,vlan_tpid,vlan_tci,sap,cpuid, \e
  priority,bwlimit,curtime,ibytes,obytes,ipkts,opks,ierrpkts \e
  oerrpkts,saddr,daddr,sport,dport,protocol,dsfield
  basic    name,devname,edest,vlan_tpid,vlan_tci,sap,cpuid, \e
  priority,bwlimit,curtime,ibytes,obytes,ipkts,opks,ierrpkts \e
  oerrpkts
.fi
.in -2
.sp

.sp
.LP
In the output above, the lines beginning with \fBextended\fR are shown with a
backslash character. In actual \fBacctadm\fR output, these lines are displayed
as unbroken, long lines.

.LP
\fBExample 4 \fRDisplaying Resource Groups for Task Accounting
.sp
.LP
The following command displays resource groups for task accounting:

.sp
.in +2
.nf
$ \fBacctadm -r task\fR
  extended taskid,projid,cpu,time,host,mstate,anctaskid,zone
  basic    taskid,projid,cpu,time
.fi
.in -2
.sp

.SH EXIT STATUS
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.sp .6
.RS 4n
Successful completion.
.sp
The modifications to the current configuration were valid and made
successfully.
.RE

.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.sp .6
.RS 4n
An error occurred.
.sp
A fatal error occurred either in obtaining or modifying the accounting
configuration.
.RE

.sp
.ne 2
.na
\fB\fB2\fR\fR
.ad
.sp .6
.RS 4n
Invalid command line options were specified.
.RE

.sp
.ne 2
.na
\fB\fB95\fR\fR
.ad
.sp .6
.RS 4n
A fatal, non-configuration error occurred during the start of the \fBsmf\fR(5)
service instance.
.RE

.sp
.ne 2
.na
\fB\fB96\fR\fR
.ad
.sp .6
.RS 4n
A fatal configuration error occurred during the start of the \fBsmf\fR(5)
service instance.
.RE

.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Committed
.TE

.SH SEE ALSO
.LP
\fBdladm\fR(1M), \fBflowadm\fR(1M), \fBacct\fR(2), \fBattributes\fR(5),
\fBsmf\fR(5), \fBipqos\fR(7IPP)
.SH NOTES
.LP
Both extended accounting and regular accounting can be active.
.sp
.LP
Available resources can vary from system to system, and from platform to
platform.
.sp
.LP
Extended accounting configuration is stored in the service management facility
(\fBsmf\fR(5)) repository. The configuration is restored at boot by a transient
service instance, one per accounting type:
.sp
.in +2
.nf
svc:/system/extended-accounting:flow        Flow accounting
svc:/system/extended-accounting:process     Process accounting
svc:/system/extended-accounting:task        Task accounting
svc:/system/extended-accounting:net         Network accounting
.fi
.in -2
.sp

.sp
.LP
The instances are enabled or disabled by \fBacctadm\fR as needed. Configuration
changes are made using \fBacctadm\fR; service properties should not be modified
directly using \fBsvccfg\fR(1M).
.sp
.LP
Users can manage extended accounting (start accounting, stop accounting, change
accounting configuration parameters) if they have the appropriate RBAC Rights
profile for the accounting type to be managed:
.RS +4
.TP
.ie t \(bu
.el o
Extended Accounting Flow Management
.RE
.RS +4
.TP
.ie t \(bu
.el o
Extended Accounting Process Management
.RE
.RS +4
.TP
.ie t \(bu
.el o
Extended Accounting Task Management
.RE
.RS +4
.TP
.ie t \(bu
.el o
Extended Accounting Network Management
.RE
.sp
.LP
The preceding profiles are for, respectively, flow accounting, process
accounting, task accounting, and network accounting.