|Skip Navigation Links|
|Exit Print View|
|man pages section 1: User Commands Oracle Solaris 10 8/11 Information Library|
- system activity graph
sag [-e time] [-f file] [-i sec] [-s time] [-T term] [-x spec] [-y spec]
The sag utility graphically displays the system activity data stored in a binary data file by a previous sar(1) run. Any of the sar data items may be plotted singly or in combination, as cross plots or versus time. Simple arithmetic combinations of data may be specified. sag invokes sar and finds the desired data by string-matching the data column header (run sar to see what is available). The sag utility requires a graphic terminal to draw the graph, and uses tplot(1) to produce its output. When running Solaris 2.x and OpenWindows, perform the following steps:
Run an xterm as a Tektronics terminal: prompt# xterm -t
In the xterm window, run sag specifying a tek terminal: prompt# sag-T tek options
The following options are supported and passed through to sar (see sar(1)):
Select data up to time. Default is 18:00.
Use file as the data source for sar. Default is the current daily data file /usr/adm/sa/sadd.
Select data at intervals as close as possible to sec seconds.
Select data later than time in the form hh [:mm]. Default is 08:00.
Produce output suitable for terminal term. See tplot(1) for known terminals. Default for term is $TERM.
x axis specification with spec in the form:
name [op name] . . . [lo hi]
name is either a string that will match a column header in the sar report, with an optional device name in square brackets, for example, r+w/s[dsk-1], or an integer value. op is + - * or / surrounded by blank spaces. Up to five names may be specified. Parentheses are not recognized. Contrary to custom, + and - have precedence over * and /. Evaluation is left to right. Thus, A/A+B*100 is evaluated as (A/(A+B))*100, and A+B/C+D is (A+B)/(C+D). lo and hi are optional numeric scale limits. If unspecified, they are deduced from the data.
Enclose spec in double-quotes (" ") if it includes white space.
A single spec is permitted for the x axis. If unspecified, time is used.
y axis specification with spec in the same form as for -x. Up to 5 spec arguments separated by a semi-colon (;) may be given for -y. The -y default is:
Example 1 Using the sag Command
To see today's CPU utilization:
To see activity over 15 minutes of all disk drives:
example$ TS=`date +%H:%M` example$ sar -o /tmp/tempfile 60 15 example$ TE=`date +%H:%M` example$ sag -f /tmp/tempfile -s $TS -e $TE -y "r+w/s[dsk]"
Daily data file for day dd
See attributes(5) for descriptions of the following attributes: