3557 dumpvp_size is not updated correctly when a dump zvol's size is changed
[unleashed.git] / usr / src / man / man1m / acctadm.1m
blobce6a1e19efe82bb46ba1a9795c021cb85acd3e1e
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 1M "Dec 17, 2008"
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 .sp
19 .LP
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.
23 .SH OPTIONS
24 .sp
25 .LP
26 The following options are supported:
27 .sp
28 .ne 2
29 .na
30 \fB\fB-d\fR \fIresource_list\fR\fR
31 .ad
32 .sp .6
33 .RS 4n
34 Disable reporting of resource usage for resource. Specify \fIresource_list\fR
35 as a comma-separated list of resources or resource groups.
36 .sp
37 This option requires an operand. See \fBOPERANDS\fR.
38 .RE
40 .sp
41 .ne 2
42 .na
43 \fB\fB-D\fR\fR
44 .ad
45 .sp .6
46 .RS 4n
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
50 option. See \fB-x\fR.
51 .RE
53 .sp
54 .ne 2
55 .na
56 \fB\fB-e\fR \fIresource_list\fR\fR
57 .ad
58 .sp .6
59 .RS 4n
60 Enable reporting of resource usage for resource. Specify \fIresource_list\fR as
61 a comma-separated list of resources or resource groups.
62 .sp
63 This option requires an operand. See \fBOPERANDS\fR.
64 .RE
66 .sp
67 .ne 2
68 .na
69 \fB\fB-E\fR\fR
70 .ad
71 .sp .6
72 .RS 4n
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.
75 .RE
77 .sp
78 .ne 2
79 .na
80 \fB\fB-f\fR \fIfilename\fR\fR
81 .ad
82 .sp .6
83 .RS 4n
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.
86 .sp
87 This option requires an operand. See \fBOPERANDS\fR.
88 .RE
90 .sp
91 .ne 2
92 .na
93 \fB\fB-r\fR\fR
94 .ad
95 .sp .6
96 .RS 4n
97 Display available resource groups.
98 .sp
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.
105 .ne 2
107 \fB\fB-s\fR\fR
109 .sp .6
110 .RS 4n
111 Start method for the \fBsmf\fR(5) instance. This option is used to restore the
112 extended accounting configuration at boot.
116 .ne 2
118 \fB\fB-x\fR\fR
120 .sp .6
121 .RS 4n
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.
128 .SH OPERANDS
131 The \fB-d\fR, \fB-D\fR, \fB-e\fR, \fB-E\fR, \fB-f\fR, and \fB-x\fR options
132 require an operand.
135 The following operands are supported:
137 .ne 2
139 \fB\fBprocess\fR\fR
141 .sp .6
142 .RS 4n
143 Run \fBacctadm\fR on the process accounting components of the extended
144 accounting facility.
148 .ne 2
150 \fB\fBtask\fR\fR
152 .sp .6
153 .RS 4n
154 Run \fBacctadm\fR on the task accounting components of the extended accounting
155 facility.
159 .ne 2
161 \fB\fBflow\fR\fR
163 .sp .6
164 .RS 4n
165 Run \fBacctadm\fR on the IPQoS accounting components of the extended accounting
166 facility.
170 .ne 2
172 \fB\fBnet\fR\fR
174 .sp .6
175 .RS 4n
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
179 accounting.
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.
187 .SH EXAMPLES
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.
197 .in +2
199 $ \fBacctadm\fR
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
217 .in -2
221 \fBExample 2 \fRActivating Basic Process Accounting
224 The following command activates basic process accounting:
227 .in +2
229 $ \fBacctadm -e basic -f /var/adm/exacct/proc process\fR
231 .in -2
235 \fBExample 3 \fRDisplaying Available Resource Groups
238 The following command displays available resource groups:
241 .in +2
243 $ \fBacctadm -r\fR
244   process:
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
248   task:
249   extended taskid,projid,cpu,time,host,mstate,anctaskid,zone
250   basic    taskid,projid,cpu,time
251   flow:
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
255   net:
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
261   oerrpkts
263 .in -2
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:
279 .in +2
281 $ \fBacctadm -r task\fR
282   extended taskid,projid,cpu,time,host,mstate,anctaskid,zone
283   basic    taskid,projid,cpu,time
285 .in -2
288 .SH EXIT STATUS
291 The following exit values are returned:
293 .ne 2
295 \fB\fB0\fR\fR
297 .sp .6
298 .RS 4n
299 Successful completion.
301 The modifications to the current configuration were valid and made
302 successfully.
306 .ne 2
308 \fB\fB1\fR\fR
310 .sp .6
311 .RS 4n
312 An error occurred.
314 A fatal error occured either in obtaining or modifying the accounting
315 configuration.
319 .ne 2
321 \fB\fB2\fR\fR
323 .sp .6
324 .RS 4n
325 Invalid command line options were specified.
329 .ne 2
331 \fB\fB95\fR\fR
333 .sp .6
334 .RS 4n
335 A fatal, non-configuration error occurred during the start of the \fBsmf\fR(5)
336 service instance.
340 .ne 2
342 \fB\fB96\fR\fR
344 .sp .6
345 .RS 4n
346 A fatal configuration error occurred during the start of the \fBsmf\fR(5)
347 service instance.
350 .SH ATTRIBUTES
353 See \fBattributes\fR(5) for descriptions of the following attributes:
358 box;
359 c | c
360 l | l .
361 ATTRIBUTE TYPE  ATTRIBUTE VALUE
363 Interface Stability     Committed
366 .SH SEE ALSO
369 \fBdladm\fR(1M), \fBflowadm\fR(1M), \fBacct\fR(2), \fBattributes\fR(5),
370 \fBsmf\fR(5), \fBipqos\fR(7IPP)
371 .SH NOTES
374 Both extended accounting and regular accounting can be active.
377 Available resources can vary from system to system, and from platform to
378 platform.
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:
385 .in +2
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
392 .in -2
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:
405 .RS +4
407 .ie t \(bu
408 .el o
409 Extended Accounting Flow Management
411 .RS +4
413 .ie t \(bu
414 .el o
415 Extended Accounting Process Management
417 .RS +4
419 .ie t \(bu
420 .el o
421 Extended Accounting Task Management
423 .RS +4
425 .ie t \(bu
426 .el o
427 Extended Accounting Network Management
431 The preceding profiles are for, respectively, flow accounting, process
432 accounting, task accounting, and network accounting.