1sar(1M)                 System Administration Commands                 sar(1M)
2
3
4

NAME

6       sar, sa1, sa2, sadc - system activity report package
7

SYNOPSIS

9       /usr/lib/sa/sadc [t n] [ofile]
10
11
12       /usr/lib/sa/sa1 [t n]
13
14
15       /usr/lib/sa/sa2 [-aAbcdgkmpqruvwy] [-e time] [-f filename]
16            [-i sec] [-s time]
17
18

DESCRIPTION

20       System  activity  data can be accessed at the special request of a user
21       (see sar(1)) and automatically, on a routine basis, as described  here.
22       The  operating system contains several counters that are incremented as
23       various system actions occur. These include counters for  CPU  utiliza‐
24       tion,  buffer  usage,  disk and tape I/O activity, TTY device activity,
25       switching and system-call activity, file-access, queue activity, inter-
26       process communications, and paging. For more general system statistics,
27       use iostat(1M), sar(1), or vmstat(1M).
28
29
30       sadc and two shell procedures, sa1 and sa2, are used to  sample,  save,
31       and process this data.
32
33
34       sadc, the data collector, samples system data n times, with an interval
35       of t seconds between samples, and writes in binary format to  ofile  or
36       to  standard  output.  The sampling interval t should be greater than 5
37       seconds; otherwise, the activity of sadc itself may affect the  sample.
38       If  t and n are omitted, a special record is written. This facility can
39       be used at system boot time, when booting to  a  multi-user  state,  to
40       mark  the  time  at  which the counters restart from zero. For example,
41       when accounting is enabled, the svc:/system/sar:default service  writes
42       the restart mark to the daily data file using the command entry:
43
44         su sys -c "/usr/lib/sa/sadc /var/adm/sa/sa'date +%d'"
45
46
47
48
49       The  shell  script sa1, a variant of sadc, is used to collect and store
50       data in the binary file /var/adm/sa/sadd, where dd is the current  day.
51       The  arguments t and n cause records to be written n times at an inter‐
52       val of t  seconds,  or  once  if  omitted.  The  following  entries  in
53       /var/spool/cron/crontabs/sys will produce records every 20 minutes dur‐
54       ing working hours and hourly otherwise:
55
56         0 * * * 0-6 /usr/lib/sa/sa1
57         20,40 8−17 * * 1−5 /usr/lib/sa/sa1
58
59
60
61
62       See crontab(1) for details.
63
64
65       The shell script sa2, a variant of sar, writes a daily  report  in  the
66       file /var/adm/sa/sardd. See the OPTIONS section in sar(1) for an expla‐
67       nation   of   the   various   options.   The   following    entry    in
68       /var/spool/cron/crontabs/sys  will  report  important activities hourly
69       during the working day:
70
71         5 18 * * 1−5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A
72
73
74

FILES

76       /tmp/sa.adrfl
77
78           address file
79
80
81       /var/adm/sa/sadd
82
83           Daily data file
84
85
86       /var/adm/sa/sardd
87
88           Daily report file
89
90
91       /var/spool/cron/crontabs/sys
92
93
94
95

ATTRIBUTES

97       See attributes(5) for descriptions of the following attributes:
98
99
100
101
102       ┌─────────────────────────────┬─────────────────────────────┐
103       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
104       ├─────────────────────────────┼─────────────────────────────┤
105       │Availability                 │SUNWaccu                     │
106       └─────────────────────────────┴─────────────────────────────┘
107

SEE ALSO

109       crontab(1), sag(1), sar(1), svcs(1), timex(1), iostat(1M),  svcadm(1M),
110       vmstat(1M), attributes(5), smf(5)
111
112
113
114

NOTES

116       The  sar service is managed by the service management facility, smf(5),
117       under the service identifier:
118
119         svc:/system/sar
120
121
122
123
124       Administrative actions on this service, such as enabling, disabling, or
125       requesting  restart,  can  be performed using svcadm(1M). The service's
126       status can be queried using the svcs(1) command.
127
128
129
130SunOS 5.11                        20 Aug 2004                          sar(1M)
Impressum