Difference between revisions of "Sar"

From ICO wiki
m
m
Line 7: Line 7:
  
 
Sar(system activity monitor) ehk süsteemi aktiivsuse monitor on algselt Solarisega seotud käsk, mida kasutatakse nüüd üldisemalt UNIX-i laadsete süsteemide peal.
 
Sar(system activity monitor) ehk süsteemi aktiivsuse monitor on algselt Solarisega seotud käsk, mida kasutatakse nüüd üldisemalt UNIX-i laadsete süsteemide peal.
Linuxi peal saab sar-i kasutada läbi sysstati paketi(package).
+
Linuxi peal saab sar-i kasutada läbi sysstat'i või atsar'i paketi(package).
 
Läbi selle saab kergesti infot erinevate süsteemijõudluse kohta : näiteks CPU(protsessori) aktiivsus, mälu/pagefile'i suurus, device load, võrk.
 
Läbi selle saab kergesti infot erinevate süsteemijõudluse kohta : näiteks CPU(protsessori) aktiivsus, mälu/pagefile'i suurus, device load, võrk.
  
 +
 +
{|style="background:lightyellow;width:500px;margin:3px;border:1px solid lightgrey" align=centre|
 +
sar [-flags] [ -e time ] [ -f filename ] [-i sec ] [ -s time ] |}
 +
-f filename Uses filename as the data source for sar. The default is the current daily data file /var/adm/sa/sadd.
 +
-e time Selects data up to time. The default is 18:00.
 +
-i sec Selects data at intervals as close as possible to sec seconds.
  
 
Näide:  
 
Näide:  
Line 19: Line 25:
 
Syntax
 
Syntax
  
{|style="background:lightyellow;width:500px;margin:3px;border:1px solid lightgrey" align=centre
+
{|style="background:lightyellow;width:500px;margin:3px;border:1px solid lightgrey" align=centre|  
| style="padding:0px 0px 0px 80px;font-family:courier;font-size:8pt;"
 
 
sag [-e time] [-f file] [-i sec] [-s time] [-T term] [-x spec] [-y spec]
 
sag [-e time] [-f file] [-i sec] [-s time] [-T term] [-x spec] [-y spec]
 
|}
 
|}
 +
-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 $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. 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"

Revision as of 20:44, 2 December 2012

Autor: Matis Palm A21


Sar(system activity monitor) ehk süsteemi aktiivsuse monitor on algselt Solarisega seotud käsk, mida kasutatakse nüüd üldisemalt UNIX-i laadsete süsteemide peal. Linuxi peal saab sar-i kasutada läbi sysstat'i või atsar'i paketi(package). Läbi selle saab kergesti infot erinevate süsteemijõudluse kohta : näiteks CPU(protsessori) aktiivsus, mälu/pagefile'i suurus, device load, võrk.


sar [-flags] [ -e time ] [ -f filename ] [-i sec ] [ -s time ] |} -f filename Uses filename as the data source for sar. The default is the current daily data file /var/adm/sa/sadd. -e time Selects data up to time. The default is 18:00. -i sec Selects data at intervals as close as possible to sec seconds. Näide: Lisaks on olemas command sag, mis näitab graafiliselt seda infot binaarfailist, mis tekitati eelmise sar-i commandi jooksutamisega. Syntax
sag [-e time] [-f file] [-i sec] [-s time] [-T term] [-x spec] [-y spec]

-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 $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. 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"