6253 F_GETLK doesn't always return lock owner
[illumos-gate.git] / usr / src / man / man1m / sar.1m
blob86411824750a0bf3ca2955f4410b955ba3dcebd3
1 '\" te
2 .\"  Copyright 1989 AT&T Copyright (c) 2004, 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 SAR 1M "Aug 20, 2004"
7 .SH NAME
8 sar, sa1, sa2, sadc \- system activity report package
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/lib/sa/sadc\fR [\fIt\fR \fIn\fR] [\fIofile\fR]
13 .fi
15 .LP
16 .nf
17 \fB/usr/lib/sa/sa1\fR [\fIt\fR \fIn\fR]
18 .fi
20 .LP
21 .nf
22 \fB/usr/lib/sa/sa2\fR [\fB-aAbcdgkmpqruvwy\fR] [\fB-e\fR \fItime\fR] [\fB-f\fR \fIfilename\fR]
23      [\fB-i\fR \fIsec\fR] [\fB-s\fR \fItime\fR]
24 .fi
26 .SH DESCRIPTION
27 .sp
28 .LP
29 System activity data can be accessed at the special request of a user (see
30 \fBsar\fR(1)) and automatically, on a routine basis, as described here. The
31 operating system contains several counters that are incremented as various
32 system actions occur. These include counters for \fBCPU\fR utilization, buffer
33 usage, disk and tape \fBI/O\fR activity, \fBTTY\fR device activity, switching
34 and system-call activity, file-access, queue activity, inter-process
35 communications, and paging. For more general system statistics, use
36 \fBiostat\fR(1M), \fBsar\fR(1), or \fBvmstat\fR(1M).
37 .sp
38 .LP
39 \fBsadc\fR and two shell procedures, \fBsa1\fR and \fBsa2\fR, are used to
40 sample, save, and process this data.
41 .sp
42 .LP
43 \fBsadc\fR, the data collector, samples system data \fIn\fR times, with an
44 interval of \fIt\fR seconds between samples, and writes in binary format to
45 \fIofile\fR or to standard output. The sampling interval \fIt\fR should be
46 greater than 5 seconds; otherwise, the activity of \fBsadc\fR itself may affect
47 the sample. If \fIt\fR and \fIn\fR are omitted, a special record is written.
48 This facility can be used at system boot time, when booting to a multi-user
49 state, to mark the time at which the counters restart from zero. For example,
50 when accounting is enabled, the \fBsvc:/system/sar:default\fR service writes
51 the restart mark to the daily data file using the command entry:
52 .sp
53 .in +2
54 .nf
55 su sys -c "/usr/lib/sa/sadc /var/adm/sa/sa\&'date +%d\&'"
56 .fi
57 .in -2
58 .sp
60 .sp
61 .LP
62 The shell script \fBsa1\fR, a variant of \fBsadc\fR, is used to collect and
63 store data in the binary file \fB/var/adm/sa/sa\fR\fIdd,\fR where \fBdd\fR is
64 the current day. The arguments \fIt\fR and \fIn\fR cause records to be written
65 \fIn\fR times at an interval of \fIt\fR seconds, or once if omitted. The
66 following entries in \fB/var/spool/cron/crontabs/sys\fR will produce records
67 every 20 minutes during working hours and hourly otherwise:
68 .sp
69 .in +2
70 .nf
71 0 * * * 0-6 /usr/lib/sa/sa1
72 20,40 8\(mi17 * * 1\(mi5 /usr/lib/sa/sa1
73 .fi
74 .in -2
75 .sp
77 .sp
78 .LP
79 See \fBcrontab\fR(1) for details.
80 .sp
81 .LP
82 The shell script \fBsa2\fR, a variant of \fBsar\fR, writes a daily report in
83 the file \fB/var/adm/sa/sar\fR\fIdd.\fR See the \fBOPTIONS\fR section in
84 \fBsar\fR(1) for an explanation of the various options. The following entry in
85 \fB/var/spool/cron/crontabs/sys\fR will report important activities hourly
86 during the working day:
87 .sp
88 .in +2
89 .nf
90 5 18 * * 1\(mi5 /usr/lib/sa/sa2 \fB-s\fR 8:00 \fB-e\fR 18:01 \fB-i\fR 1200 \fB-A\fR
91 .fi
92 .in -2
93 .sp
95 .SH FILES
96 .sp
97 .ne 2
98 .na
99 \fB\fB/tmp/sa.adrfl\fR\fR
101 .sp .6
102 .RS 4n
103 address file
107 .ne 2
109 \fB\fB/var/adm/sa/sa\fR\fBdd\fR\fR
111 .sp .6
112 .RS 4n
113 Daily data file
117 .ne 2
119 \fB\fB/var/adm/sa/sar\fR\fBdd\fR\fR
121 .sp .6
122 .RS 4n
123 Daily report file
127 .ne 2
129 \fB\fB/var/spool/cron/crontabs/sys\fR\fR
131 .sp .6
132 .RS 4n
136 .SH SEE ALSO
139 \fBcrontab\fR(1), \fBsag\fR(1), \fBsar\fR(1), \fBsvcs\fR(1), \fBtimex\fR(1),
140 \fBiostat\fR(1M), \fBsvcadm\fR(1M), \fBvmstat\fR(1M), \fBattributes\fR(5),
141 \fBsmf\fR(5)
144 \fI\fR
145 .SH NOTES
148 The \fBsar\fR service is managed by the service management facility,
149 \fBsmf\fR(5), under the service identifier:
151 .in +2
153 svc:/system/sar
155 .in -2
160 Administrative actions on this service, such as enabling, disabling, or
161 requesting restart, can be performed using \fBsvcadm\fR(1M). The service's
162 status can be queried using the \fBsvcs\fR(1) command.