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 "Dec 17, 2008"
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]
20 \fBacctadm\fR configures various attributes of the extended accounting
21 facility. Without arguments, \fBacctadm\fR displays the current status of the
22 extended accounting facility.
26 The following options are supported:
30 \fB\fB-d\fR \fIresource_list\fR\fR
34 Disable reporting of resource usage for resource. Specify \fIresource_list\fR
35 as a comma-separated list of resources or resource groups.
37 This option requires an operand. See \fBOPERANDS\fR.
47 Disable accounting of the given operand type without closing the accounting
48 file. This option can be used to temporarily stop writing accounting records to
49 the accounting file without closing it. To close the file use the \fB-x\fR
56 \fB\fB-e\fR \fIresource_list\fR\fR
60 Enable reporting of resource usage for resource. Specify \fIresource_list\fR as
61 a comma-separated list of resources or resource groups.
63 This option requires an operand. See \fBOPERANDS\fR.
73 Enable accounting of the given operand type without sending the accounting
74 output to a file. This option requires an operand. See \fBOPERANDS\fR.
80 \fB\fB-f\fR \fIfilename\fR\fR
84 Send the accounting output for the given operand type to \fIfilename\fR. If
85 \fIfilename\fR exists, its contents must be of the given accounting type.
87 This option requires an operand. See \fBOPERANDS\fR.
97 Display available resource groups.
99 When this option is used with an operand, it displays resource groups available
100 for a given accounting type. When no operand is specified, this option displays
101 resource groups for all available accounting types. See OPERANDS.
111 Start method for the \fBsmf\fR(5) instance. This option is used to restore the
112 extended accounting configuration at boot.
122 Deactivate accounting of the given operand type. This option also closes the
123 accounting file for the given accounting type if it is currently open.
125 This option requires an operand. See \fBOPERANDS\fR.
131 The \fB-d\fR, \fB-D\fR, \fB-e\fR, \fB-E\fR, \fB-f\fR, and \fB-x\fR options
135 The following operands are supported:
143 Run \fBacctadm\fR on the process accounting components of the extended
154 Run \fBacctadm\fR on the task accounting components of the extended accounting
165 Run \fBacctadm\fR on the IPQoS accounting components of the extended accounting
176 Run \fBacctadm\fR on links and flows administered by \fBdladm\fR(1M) and
177 \fBflowadm\fR(1M), respectively. Basic network accounting relates only to
178 links, while extended network accounting includes both link and flow
184 The optional final parameter to \fBacctadm\fR represents whether the command
185 should act on the process, system task, IPQoS, or network accounting components
186 of the extended accounting facility.
189 \fBExample 1 \fRDisplaying the Current Status
192 The following command displays the current status. In this example, system task
193 accounting is active and tracking only \fBCPU\fR resources. Process and flow
194 accounting are not active.
200 Task accounting: active
201 Task accounting file: /var/adm/exacct/task
202 Tracked task resources: extended
203 Untracked task resources: host
204 Process accounting: inactive
205 Process accounting file: none
206 Tracked process resources: none
207 Untracked process resources: extended,host
208 Flow accounting: inactive
209 Flow accounting file: none
210 Tracked flow resources: none
211 Untracked flow resources: extended
212 Net accounting: inactive
213 Net accounting file: none
214 Tracked Net resources: none
215 Untracked Net resources: extended
221 \fBExample 2 \fRActivating Basic Process Accounting
224 The following command activates basic process accounting:
229 $ \fBacctadm -e basic -f /var/adm/exacct/proc process\fR
235 \fBExample 3 \fRDisplaying Available Resource Groups
238 The following command displays available resource groups:
245 extended pid,uid,gid,cpu,time,command,tty,projid, \e
246 taskid,ancpid,wait-status,zone,flag,memory,mstate
247 basic pid,uid,gid,cpu,time,command,tty,flag
249 extended taskid,projid,cpu,time,host,mstate,anctaskid,zone
250 basic taskid,projid,cpu,time
252 extended saddr,daddr,sport,dport,proto,dsfield,nbytes,npkts, \e
253 action,ctime,lseen,projid,uid
254 basic saddr,daddr,sport,dport,proto,nbytes,npkts,action
256 extended name,devname,edest,vlan_tpid,vlan_tci,sap,cpuid, \e
257 priority,bwlimit,curtime,ibytes,obytes,ipkts,opks,ierrpkts \e
258 oerrpkts,saddr,daddr,sport,dport,protocol,dsfield
259 basic name,devname,edest,vlan_tpid,vlan_tci,sap,cpuid, \e
260 priority,bwlimit,curtime,ibytes,obytes,ipkts,opks,ierrpkts \e
268 In the output above, the lines beginning with \fBextended\fR are shown with a
269 backslash character. In actual \fBacctadm\fR output, these lines are displayed
270 as unbroken, long lines.
273 \fBExample 4 \fRDisplaying Resource Groups for Task Accounting
276 The following command displays resource groups for task accounting:
281 $ \fBacctadm -r task\fR
282 extended taskid,projid,cpu,time,host,mstate,anctaskid,zone
283 basic taskid,projid,cpu,time
291 The following exit values are returned:
299 Successful completion.
301 The modifications to the current configuration were valid and made
314 A fatal error occured either in obtaining or modifying the accounting
325 Invalid command line options were specified.
335 A fatal, non-configuration error occurred during the start of the \fBsmf\fR(5)
346 A fatal configuration error occurred during the start of the \fBsmf\fR(5)
353 See \fBattributes\fR(5) for descriptions of the following attributes:
361 ATTRIBUTE TYPE ATTRIBUTE VALUE
363 Interface Stability Committed
369 \fBdladm\fR(1M), \fBflowadm\fR(1M), \fBacct\fR(2), \fBattributes\fR(5),
370 \fBsmf\fR(5), \fBipqos\fR(7IPP)
374 Both extended accounting and regular accounting can be active.
377 Available resources can vary from system to system, and from platform to
381 Extended accounting configuration is stored in the service management facility
382 (\fBsmf\fR(5)) repository. The configuration is restored at boot by a transient
383 service instance, one per accounting type:
387 svc:/system/extended-accounting:flow Flow accounting
388 svc:/system/extended-accounting:process Process accounting
389 svc:/system/extended-accounting:task Task accounting
390 svc:/system/extended-accounting:net Network accounting
397 The instances are enabled or disabled by \fBacctadm\fR as needed. Configuration
398 changes are made using \fBacctadm\fR; service properties should not be modified
399 directly using \fBsvccfg\fR(1M).
402 Users can manage extended accounting (start accounting, stop accounting, change
403 accounting configuration parameters) if they have the appropriate RBAC Rights
404 profile for the accounting type to be managed:
409 Extended Accounting Flow Management
415 Extended Accounting Process Management
421 Extended Accounting Task Management
427 Extended Accounting Network Management
431 The preceding profiles are for, respectively, flow accounting, process
432 accounting, task accounting, and network accounting.