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 1M "April 9, 2016"
8 acctadm \- configure extended accounting facility
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]
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.
24 The following options are supported:
28 \fB\fB-d\fR \fIresource_list\fR\fR
32 Disable reporting of resource usage for resource. Specify \fIresource_list\fR
33 as a comma-separated list of resources or resource groups.
35 This option requires an operand. See \fBOPERANDS\fR.
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
54 \fB\fB-e\fR \fIresource_list\fR\fR
58 Enable reporting of resource usage for resource. Specify \fIresource_list\fR as
59 a comma-separated list of resources or resource groups.
61 This option requires an operand. See \fBOPERANDS\fR.
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.
78 \fB\fB-f\fR \fIfilename\fR\fR
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.
85 This option requires an operand. See \fBOPERANDS\fR.
95 Display available resource groups.
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.
109 Start method for the \fBsmf\fR(5) instance. This option is used to restore the
110 extended accounting configuration at boot.
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.
128 The \fB-d\fR, \fB-D\fR, \fB-e\fR, \fB-E\fR, \fB-f\fR, and \fB-x\fR options
132 The following operands are supported:
140 Run \fBacctadm\fR on the process accounting components of the extended
151 Run \fBacctadm\fR on the task accounting components of the extended accounting
162 Run \fBacctadm\fR on the IPQoS accounting components of the extended accounting
173 Run \fBacctadm\fR on links and flows administered by \fBdladm\fR(1M) and
174 \fBflowadm\fR(1M), respectively. Basic network accounting relates only to
175 links, while extended network accounting includes both link and flow
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.
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.
197 Task accounting: active
198 Task accounting file: /var/adm/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
218 \fBExample 2 \fRActivating Basic Process Accounting
221 The following command activates basic process accounting:
226 $ \fBacctadm -e basic -f /var/adm/exacct/proc process\fR
232 \fBExample 3 \fRDisplaying Available Resource Groups
235 The following command displays available resource groups:
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
246 extended taskid,projid,cpu,time,host,mstate,anctaskid,zone
247 basic taskid,projid,cpu,time
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
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
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:
278 $ \fBacctadm -r task\fR
279 extended taskid,projid,cpu,time,host,mstate,anctaskid,zone
280 basic taskid,projid,cpu,time
287 The following exit values are returned:
295 Successful completion.
297 The modifications to the current configuration were valid and made
310 A fatal error occurred either in obtaining or modifying the accounting
321 Invalid command line options were specified.
331 A fatal, non-configuration error occurred during the start of the \fBsmf\fR(5)
342 A fatal configuration error occurred during the start of the \fBsmf\fR(5)
348 See \fBattributes\fR(5) for descriptions of the following attributes:
356 ATTRIBUTE TYPE ATTRIBUTE VALUE
358 Interface Stability Committed
363 \fBdladm\fR(1M), \fBflowadm\fR(1M), \fBacct\fR(2), \fBattributes\fR(5),
364 \fBsmf\fR(5), \fBipqos\fR(7IPP)
367 Both extended accounting and regular accounting can be active.
370 Available resources can vary from system to system, and from platform to
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:
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
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(1M).
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:
402 Extended Accounting Flow Management
408 Extended Accounting Process Management
414 Extended Accounting Task Management
420 Extended Accounting Network Management
424 The preceding profiles are for, respectively, flow accounting, process
425 accounting, task accounting, and network accounting.