Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man8 / acctadm.8
blobfcbb2a64c05fae021044746f5724df93383ab6c0
1 '\" te
2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH ACCTADM 8 "April 9, 2016"
7 .SH NAME
8 acctadm \- configure extended accounting facility
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sbin/acctadm\fR [\fB-DEsrux\fR] [\fB-d\fR \fIresource_list\fR]
13      [\fB-e\fR \fIresource_list\fR] [\fB-f\fR \fIfilename\fR]
14      [task | process | flow | net]
15 .fi
17 .SH DESCRIPTION
18 .LP
19 \fBacctadm\fR configures various attributes of the extended accounting
20 facility. Without arguments, \fBacctadm\fR displays the current status of the
21 extended accounting facility.
22 .SH OPTIONS
23 .LP
24 The following options are supported:
25 .sp
26 .ne 2
27 .na
28 \fB\fB-d\fR \fIresource_list\fR\fR
29 .ad
30 .sp .6
31 .RS 4n
32 Disable reporting of resource usage for resource. Specify \fIresource_list\fR
33 as a comma-separated list of resources or resource groups.
34 .sp
35 This option requires an operand. See \fBOPERANDS\fR.
36 .RE
38 .sp
39 .ne 2
40 .na
41 \fB\fB-D\fR\fR
42 .ad
43 .sp .6
44 .RS 4n
45 Disable accounting of the given operand type without closing the accounting
46 file. This option can be used to temporarily stop writing accounting records to
47 the accounting file without closing it. To close the file use the \fB-x\fR
48 option. See \fB-x\fR.
49 .RE
51 .sp
52 .ne 2
53 .na
54 \fB\fB-e\fR \fIresource_list\fR\fR
55 .ad
56 .sp .6
57 .RS 4n
58 Enable reporting of resource usage for resource. Specify \fIresource_list\fR as
59 a comma-separated list of resources or resource groups.
60 .sp
61 This option requires an operand. See \fBOPERANDS\fR.
62 .RE
64 .sp
65 .ne 2
66 .na
67 \fB\fB-E\fR\fR
68 .ad
69 .sp .6
70 .RS 4n
71 Enable accounting of the given operand type without sending the accounting
72 output to a file. This option requires an operand. See \fBOPERANDS\fR.
73 .RE
75 .sp
76 .ne 2
77 .na
78 \fB\fB-f\fR \fIfilename\fR\fR
79 .ad
80 .sp .6
81 .RS 4n
82 Send the accounting output for the given operand type to \fIfilename\fR. If
83 \fIfilename\fR exists, its contents must be of the given accounting type.
84 .sp
85 This option requires an operand. See \fBOPERANDS\fR.
86 .RE
88 .sp
89 .ne 2
90 .na
91 \fB\fB-r\fR\fR
92 .ad
93 .sp .6
94 .RS 4n
95 Display available resource groups.
96 .sp
97 When this option is used with an operand, it displays resource groups available
98 for a given accounting type. When no operand is specified, this option displays
99 resource groups for all available accounting types. See OPERANDS.
103 .ne 2
105 \fB\fB-s\fR\fR
107 .sp .6
108 .RS 4n
109 Start method for the \fBsmf\fR(5) instance. This option is used to restore the
110 extended accounting configuration at boot.
114 .ne 2
116 \fB\fB-x\fR\fR
118 .sp .6
119 .RS 4n
120 Deactivate accounting of the given operand type. This option also closes the
121 accounting file for the given accounting type if it is currently open.
123 This option requires an operand. See \fBOPERANDS\fR.
126 .SH OPERANDS
128 The \fB-d\fR, \fB-D\fR, \fB-e\fR, \fB-E\fR, \fB-f\fR, and \fB-x\fR options
129 require an operand.
132 The following operands are supported:
134 .ne 2
136 \fB\fBprocess\fR\fR
138 .sp .6
139 .RS 4n
140 Run \fBacctadm\fR on the process accounting components of the extended
141 accounting facility.
145 .ne 2
147 \fB\fBtask\fR\fR
149 .sp .6
150 .RS 4n
151 Run \fBacctadm\fR on the task accounting components of the extended accounting
152 facility.
156 .ne 2
158 \fB\fBflow\fR\fR
160 .sp .6
161 .RS 4n
162 Run \fBacctadm\fR on the IPQoS accounting components of the extended accounting
163 facility.
167 .ne 2
169 \fB\fBnet\fR\fR
171 .sp .6
172 .RS 4n
173 Run \fBacctadm\fR on links and flows administered by \fBdladm\fR(8) and
174 \fBflowadm\fR(8), respectively. Basic network accounting relates only to
175 links, while extended network accounting includes both link and flow
176 accounting.
181 The optional final parameter to \fBacctadm\fR represents whether the command
182 should act on the process, system task, IPQoS, or network accounting components
183 of the extended accounting facility.
184 .SH EXAMPLES
186 \fBExample 1 \fRDisplaying the Current Status
189 The following command displays the current status. In this example, system task
190 accounting is active and tracking only \fBCPU\fR resources. Process and flow
191 accounting are not active.
194 .in +2
196 $ \fBacctadm\fR
197             Task accounting: active
198        Task accounting file: /var/log/exacct/task
199      Tracked task resources: extended
200    Untracked task resources: host
201          Process accounting: inactive
202     Process accounting file: none
203   Tracked process resources: none
204 Untracked process resources: extended,host
205             Flow accounting: inactive
206        Flow accounting file: none
207      Tracked flow resources: none
208    Untracked flow resources: extended
209              Net accounting: inactive
210         Net accounting file: none
211       Tracked Net resources: none
212     Untracked Net resources: extended
214 .in -2
218 \fBExample 2 \fRActivating Basic Process Accounting
221 The following command activates basic process accounting:
224 .in +2
226 $ \fBacctadm -e basic -f /var/log/exacct/proc process\fR
228 .in -2
232 \fBExample 3 \fRDisplaying Available Resource Groups
235 The following command displays available resource groups:
238 .in +2
240 $ \fBacctadm -r\fR
241   process:
242   extended pid,uid,gid,cpu,time,command,tty,projid, \e
243   taskid,ancpid,wait-status,zone,flag,memory,mstate
244   basic    pid,uid,gid,cpu,time,command,tty,flag
245   task:
246   extended taskid,projid,cpu,time,host,mstate,anctaskid,zone
247   basic    taskid,projid,cpu,time
248   flow:
249   extended saddr,daddr,sport,dport,proto,dsfield,nbytes,npkts, \e
250   action,ctime,lseen,projid,uid
251   basic    saddr,daddr,sport,dport,proto,nbytes,npkts,action
252   net:
253   extended name,devname,edest,vlan_tpid,vlan_tci,sap,cpuid, \e
254   priority,bwlimit,curtime,ibytes,obytes,ipkts,opks,ierrpkts \e
255   oerrpkts,saddr,daddr,sport,dport,protocol,dsfield
256   basic    name,devname,edest,vlan_tpid,vlan_tci,sap,cpuid, \e
257   priority,bwlimit,curtime,ibytes,obytes,ipkts,opks,ierrpkts \e
258   oerrpkts
260 .in -2
265 In the output above, the lines beginning with \fBextended\fR are shown with a
266 backslash character. In actual \fBacctadm\fR output, these lines are displayed
267 as unbroken, long lines.
270 \fBExample 4 \fRDisplaying Resource Groups for Task Accounting
273 The following command displays resource groups for task accounting:
276 .in +2
278 $ \fBacctadm -r task\fR
279   extended taskid,projid,cpu,time,host,mstate,anctaskid,zone
280   basic    taskid,projid,cpu,time
282 .in -2
285 .SH EXIT STATUS
287 The following exit values are returned:
289 .ne 2
291 \fB\fB0\fR\fR
293 .sp .6
294 .RS 4n
295 Successful completion.
297 The modifications to the current configuration were valid and made
298 successfully.
302 .ne 2
304 \fB\fB1\fR\fR
306 .sp .6
307 .RS 4n
308 An error occurred.
310 A fatal error occurred either in obtaining or modifying the accounting
311 configuration.
315 .ne 2
317 \fB\fB2\fR\fR
319 .sp .6
320 .RS 4n
321 Invalid command line options were specified.
325 .ne 2
327 \fB\fB95\fR\fR
329 .sp .6
330 .RS 4n
331 A fatal, non-configuration error occurred during the start of the \fBsmf\fR(5)
332 service instance.
336 .ne 2
338 \fB\fB96\fR\fR
340 .sp .6
341 .RS 4n
342 A fatal configuration error occurred during the start of the \fBsmf\fR(5)
343 service instance.
346 .SH ATTRIBUTES
348 See \fBattributes\fR(5) for descriptions of the following attributes:
353 box;
354 c | c
355 l | l .
356 ATTRIBUTE TYPE  ATTRIBUTE VALUE
358 Interface Stability     Committed
361 .SH SEE ALSO
363 \fBdladm\fR(8), \fBflowadm\fR(8), \fBacct\fR(2), \fBattributes\fR(5),
364 \fBsmf\fR(5), \fBipqos\fR(7IPP)
365 .SH NOTES
367 Both extended accounting and regular accounting can be active.
370 Available resources can vary from system to system, and from platform to
371 platform.
374 Extended accounting configuration is stored in the service management facility
375 (\fBsmf\fR(5)) repository. The configuration is restored at boot by a transient
376 service instance, one per accounting type:
378 .in +2
380 svc:/system/extended-accounting:flow        Flow accounting
381 svc:/system/extended-accounting:process     Process accounting
382 svc:/system/extended-accounting:task        Task accounting
383 svc:/system/extended-accounting:net         Network accounting
385 .in -2
390 The instances are enabled or disabled by \fBacctadm\fR as needed. Configuration
391 changes are made using \fBacctadm\fR; service properties should not be modified
392 directly using \fBsvccfg\fR(8).
395 Users can manage extended accounting (start accounting, stop accounting, change
396 accounting configuration parameters) if they have the appropriate RBAC Rights
397 profile for the accounting type to be managed:
398 .RS +4
400 .ie t \(bu
401 .el o
402 Extended Accounting Flow Management
404 .RS +4
406 .ie t \(bu
407 .el o
408 Extended Accounting Process Management
410 .RS +4
412 .ie t \(bu
413 .el o
414 Extended Accounting Task Management
416 .RS +4
418 .ie t \(bu
419 .el o
420 Extended Accounting Network Management
424 The preceding profiles are for, respectively, flow accounting, process
425 accounting, task accounting, and network accounting.