sag
瑞兹 发表于 2020-11-27 09:05浏览次数:
在Solaris操作系统上,sag 实用程序以图形方式显示前一次sar运行时存储在二进制数据文件中的系统活动数据。
On the Solaris operating system, the sag utility graphically displays the system activity data stored in a binary data file by a previous sar run.
目录:
1 sag 运行系统环境
2 sag 语法
3 sag 例子
sag 运行系统环境
sag 语法
sag [-e time] [-f file] [-i sec] [-s time] [-T term] [-x spec] [-y spec]
选件
-e time
|
最多选择数据的时间。默认值为18:00。
|
-f file
|
将文件用作sar的数据源。默认为当前的每日数据文件/ usr / adm / sa / sadd。
|
-i sec
|
选择间隔尽可能接近秒秒的数据。
|
-s time
|
请以hh [ :mm ]的形式选择晚于时间的数据。默认值为08:00。
|
-T term
|
产生适合期末输出的输出。有关已知端子,请参见tplot。term的默认值为环境变量 $ TERM的值。
|
-x spec
|
x轴规格,规格形式为:
name[ op name ] ... [ lo hi ]
name是将与sar报告中的列标题匹配的字符串,并在方括号中带有可选的设备名称,例如r + w / s [dsk-1]或整数值。该运算是+,- ,*,或/,由空格包围。最多可以指定五个名称。不识别括号。与自定义相反,+和-优先于*和/。评估从左到右。因此,将A / A + B * 100评估为(A /(A + B))* 100,而A + B / C + D为(A + B)/(C + D)。lo和hi是可选的数字刻度限制。如果未指定,则从数据中推导出。
如果spec包含空格,则将其括在双引号(“”)中。x轴允许使用单一规格。如果未指定,则使用时间。
|
-y spec
|
y轴规格,其规格与-x相同。最多可以为-y给出5个用分号(;)分隔的规范参数。该-y默认为:
-y“%usr0100;%usr +%sys0100;%usr +%sys +%wio0100”
|
sag [-e time] [-f file] [-i sec] [-s time] [-T term] [-x spec] [-y spec]
Options
-e time
|
Select data up to time. Default is 18:00.
|
-f file
|
Use file as the data source for sar. Default is the current daily data file /usr/adm/sa/sadd.
|
-i sec
|
Select data at intervals as close as possible to sec seconds.
|
-s time
|
Select data later than time in the form hh[:mm]. Default is 08:00.
|
-T term
|
Produce output suitable for terminal term. See tplot for known terminals. Default for term is the value of the environment variable $TERM.
|
-x spec
|
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. The 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 spec
|
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:
-y"%usr0100;%usr+%sys0100;%usr+%sys+%wio0100"
|
sag 例子
sag
查看今天的CPU使用率。
TS=`date +%H:%M`
sar -o /tmp/tempfile 60 15
TE=`date +%H:%M`
sag -f /tmp/tempfile -s $TS -e $TE -y "r+w/s[dsk]"
依次执行以上四个命令后,将显示所有磁盘驱动器在15分钟内的所有活动。
sag
See today's CPU utilization.
TS=`date +%H:%M`
sar -o /tmp/tempfile 60 15
TE=`date +%H:%M`
sag -f /tmp/tempfile -s $TS -e $TE -y "r+w/s[dsk]"
The above four commands, when executed in sequence, displays all activity over 15 minutes of all disk drives.