http://www.ginux.ufla.br/files/mono-RicardoRodrigues

Page 1

! ∀ # ∃ %

∀ # &

∋ & & !

∀(#∀! )∗∀! +#∀)! , −#∀!) .//0



! ∀ # ∃ %

∀ # & ∀ 10 ∀∃ .//0 2222222222222222222222222222222 & & # 2222222222222222222222222222222 & & 3 ∀4 5 2222222222222222222222222222222 & & ! 6 7 ∀(#∀! )∗∀! +#∀)! , −#∀!) .//0





∀ 8

9 &



! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !

1

1&1 ∋∃: & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &

1

1&. & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &

.

1&; + ∀ & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &

.

1&< ∋ 9 5 % & & & & & & & & & & & & & & & & & & & & &

;

∀! # ∃ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !

%

.&1 5 =

& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &

>

.&. ? & & & & & & & & & & & & & & & & & & & & & &

≅

.&.&1 ?

& & & & & & & & & & & & & & & &

≅

.&.&. ? & & & & & & & & & & & & & & & & & & & & &

1/

.&.&; ? & & & & & & & & & & & & & & & & & & & & & & & &

1.

.&.&< ?

∃ & & & & & & & & &

1;

&! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !

%

;&1 9 & & & & & & & & & & & & & & & &

1>

;&. Α & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &

1Î’

;&.&1 ∋ top

1Î’

;&.&. ∋ uptime

.<

;&.&; ∋ vmstat

.Î’

;&.&< ∋ ps pstree

;1

;&.&> ∋ free

;.

i


;&.&Β ∋ iostat

;<

;&.&≅ ∋ sar

;Χ

∋! ( ! ! ! ! ! ! ! ! ! ! ! ! ! !

∋∀

<&1 ) & & & & & & & & & & & & & & & & & & & & & &

<.

<&. & & & & & & & & & & & & & & & & & & & & & & & & & & & &

<;

<&; & & & & & & & & & & & & & & & & & & & & & & & & &

<>

<&< & & & & & & & & & & & & & & & & & & & & & & & & & & &

<0

<&> & & & & & & & & & & & & & & & & & & & & & & & & & & & & &

>1

%! ) ∗ + ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !

%&

>&1 5 & & & & & & & & & & & & & & & & & & & & & & & & & & & &

>;

>&. 5 & & & & & & & & & & & & & & & & & & & & & & & & &

>Χ

>&; & & & & & & & & & & & & & & & & & & & & & & & & &

>0

>&< 5

& & & & & & & & & & & & & & & & & &

>0

, ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !

,&

Β&1 ∆ ∃ Α & & & & & & & & & & & & & & & & & & & & & & & & & & & & &

Î’;

− ( . + ( ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !

,%

ii


∗ top & & & & & & & & & & & & & & & & & & & & & & &

1≅

∀∗ + top & & & & & & & & & &

&∗ Ε 9 Φ top & & & & & & & & & & & & & & & & & & & & & & & & & & & &

10

∋∗ top 8 & & & & & & &

./

%∗ top & & & & & & & & &

.1

,∗

=

% top & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &

.1

−∗ )

∃

top & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &

.;

/∗ ! % uptime

.>

0∗ ! % vmstat & & & & & & & & & & & & & & & &

.≅

1∗ ! % ps aux

;1

∗ ! % free -m & & & & & & & & & & & & & &

;;

∀∗ ! % iostat

;>

&∗ ( Α ∃

& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &

;Î’

∋∗ ! % iostat -x

;Î’

sar 8

;Χ

+ ∃ Φ sar

;0

+ ∃ Φ sar

</

+ mpstat =8 1Î’

1Χ

0∗ ∆ Γ systcl

<Χ

iii


∀1∗ ( 9 Ε 8 /proc/ sys/vm/kswapd

<Χ

∀ Ε 8 /proc/sys/vm/kswapd

<Χ

∀∀∗ ! % ifconfig

>1

∀&∗ 8 Α sar

><

∀∋∗ 5 , ∆ Η

><

∀%∗ 5 Η

>>

∀,∗ 5 Η

>Î’

∀−∗

>Î’

∀/∗ 5 6!∀7

>Χ

∀0∗ = , !∀

>0

&1∗ top & & & & & & & & & & & &

Î’/

iv


# + # + ∗ ? 9 & & & & & & & & & & & &

Χ

# + ∀∗ ? & & & & & & & & & & & & & & & & & & & & &

11

# + &∗ ? & & & & & & & & & & & & &

1.

# + ∋∗ ?

∃ & & & & & & & & &

1<

# + %∗ =

& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &

1Î’

# + ,∗ ? vmstat & & & & & & & & & & & &

.≅

v


+ 2 5 ) ,

# 5 , − , ∃ % ) , ∃ 3−∀ , & ∀ ∋ )Ι∋ , )∆) , # % )#ϑ , ( ) Κ− ∗ % − , ! % ) , #∀ , (

∋ ! !∀∗ , ∋ + , − ) ,

vi


vii


+ ∃ = & ∗ ? 9 % # = & ! ∃? ? % ? Φ

% 8 ∃? ? ∃ 8

∃ Α &

viii


! ∀ # ∃

∃ % # & ∀ ∃

∋ % ∃ ∃ 1


( ) # ∀ ∗

! # % ∀ ) +,− ∀ ∀

− ) . ∃ % ∀∗ − # ∀ ∀

∃

+ ∀ % / 0 1/2− 34∋5025 67789 # ∃ . ∀

2


/ :

; 1 2</ 677= 9 6

∃ %

∀ ∃ # .

∀∗ / ∀ ∃ ∃ # ∃ & ) ∀ ∃ # ∃ 3 ∃

# ∃ 3 3 ∃

∀ ∀

2 ! 6 %

∃ 2 ! > % ∃ #

3


∃ 2 ! ? # ∀ ∀ 2 ≅

∃ ∀ ∀ 2 ! Α % # # ∀

4


! ∀ # ∃ % % & % % ∋ ( 2 # & ∀

% ∃ ∃

∃ −

∋ ∀

∃ ∃ ! 5


Β∃ # ∗∀ ! ∗∀ ) %

/ ! )

∗ ! Χ âˆƒ

∃

!

, ∃ % Χ # ∃ # ! % ∗ ∃ ∗ # % # # .

Χ âˆ€ %

6


# #

) % ∗ ∀ % / 1/ ∋, 2 677∆9

∗ ∀ ∃ ) %

4 # % ∃ # #

Ε

! # ) % % ∀ # % ∗

Ε

1(2&,+2, 677?9 Χ % #

)

7


! ∀

∀

Χ = # % Φ # + −%

) %

!

! ∃

!

Γ ∀

!

∀

4 ∀

∀ %

−% ∀

#

∀ ∀ 8


∃

∋ !

+ % Φ

87Η ∀ ! ∃ Ε ∀ ∀

1/ ∋, 2 677∆9Ι

! ) ∗ % & ∋( ) ϑ

! ! ∃ ∀ Ε ∀ ∀ 1/ ∋, 2 677∆9Ι

% %

∃ ∀

. ! Χ ! ! Ε ∀ ∀

! Ι

% % top uptime ) %

! = ≅ =≅ 1/ ∋, 2 677∆9Ι 9


∀ ∃

∀ ∀ ∀ ∀

∃ ∀ 1(2&,+2, 677?9Ι

% ∋ =7

! ∀ ! 1/ ∋, 2 677∆9Ι

∗ # ∀ ∀ ! 1/ ∋, 2 677∆9Ι

%

∃

) ∀ ∀ ∗ #

∗ # )

1/ ∋, 2 677≅9 Ι

) % ∀ ∀∃

∗ % % # ∀ ∗

Χ âˆ— ∃ ∗ !

% ∗ ! ∃ /

∀ ∗ 10


∀ ∗ ∃ Γ #

∗ ! ∃ Γ ∃ Γ Ε ∗ ! 1/ ∋, 2 677≅9 ∀ ∗ ∗ ! ! # Χ ∃ ∀ ∗ Χ ∃

∃ #

∃ # % ∃ ∗ ! 1/ ∋, 2 677≅9 Χ 6 # % ∗ Φ # + −% ∗

) %

!

− ∗

∃ Γ ∋

Κ ∗ %

11


∗ ∗ ! / ∀ ∗ ∃ ∗ ∃ ∃ ∀ ∀ ∗ , )

% ∀ ∀ ∗ Β 677 >77 ∃∀ ∀ ∀ !

! ∀ ∀ ∗ 1/ ∋, 2 677≅9 ) % ∋ % #

∀ ∀ ) Χ > # % Φ # + −%

) %

!

#

12


∃

#

/ % ∀

) % % Λ !

∀ ! Χ % ! / ! ∀ ∗

∀ !

∗ % ! 1(2&,+2, 677?9 Χ ? # % ∃ Φ

13


# + −%

) %

!

∀ !

+

−%

∀ !

−% ∀ #

% !

, ! ∀

#

Β

∀ =76? Μ % ,)− ≅=6 Μ ? ΝΟ % 6 Α

%∗

2

%∗& ∀

14


! ∀ ∀ ∗ ∀ ! Χ âˆ€ sar vmstat ∗ top 3 1/ ∋, 2 677≅9 Χ âˆƒ

/proc % % Ï‘

∃ #

! ∀ ∀ , % ∗ ∀ Χ â‰… ∃ Φ

15


# − + Λ ∃

! ∀

, % ∀) % .∗ %

top

Χ

vmstat

Χ âˆ€

uptime

.

ps pstree

Χ

free

3 ∗

iostat

Χ

sar

/ ∀

mpstat

Χ

/ 0 ∀ % ∀ top 2 ∃ top # # ∀ Î

2 top

∋ ∃

>

∀ ∀ # ∃

16


Χ âˆ€ # # ∗

) #

∀ ∃

# ∃ Χ âˆ€ = top ÎŚ top - 17:40:12 up 187 days, 15:34, 6 users, load average: 7.82, 11.95, 12.28 Tasks: 278 total, 10 running, 262 sleeping, 0 stopped, 6 zombie Cpu(s): 75.7% us, 8.8% sy, 0.0% ni, 0.7% id, 13.8% wa, 0.0% hi, 1.0% si Mem: 15585296k total, 15575984k used, 9312k free, 100032k buffers Swap: 20971488k total, 453872k used, 20517616k free, 14220000k cached PID 31513 29223 32546 10091 32412 11059 15674 11011 11007 11003 11005 11009 4197 11019 11021 11023

USER oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle root oracle oracle oracle

PR 25 25 18 15 18 16 16 15 15 15 15 15 34 16 16 16

NI 0 0 0 0 0 0 0 0 0 0 0 0 19 0 0 0

VIRT 1947m 1935m 1935m 1934m 1937m 1936m 1934m 1954m 1934m 1934m 1934m 1934m 0 1934m 1934m 1933m

RES 1.8g 1.7g 1.7g 1.7g 1.7g 1.7g 1.7g 1.7g 1.7g 1.7g 1.7g 1.7g 0 1.7g 1.7g 1.7g

SHR 1.7g 1.7g 1.7g 1.7g 1.7g 1.7g 1.7g 1.7g 1.7g 1.7g 1.7g 1.7g 0 1.7g 1.7g 1.7g

S %CPU %MEM TIME+ COMMAND R 99 11.8 0:52.82 oracle R 85 11.8 1:17.66 oracle R 59 11.7 0:03.96 oracle S 20 11.7 0:06.78 oracle R 15 11.7 0:01.59 oracle D 14 11.7 443:46.81 oracle R 12 11.7 0:22.59 oracle S 6 11.7 76:09.97 oracle S 6 11.6 59:42.30 oracle S 5 11.6 56:16.54 oracle S 3 11.6 52:14.53 oracle S 3 11.6 52:02.76 oracle R 3 0.0 3325:30 kipmi0 R 2 11.7 442:41.53 oracle R 2 11.7 441:44.35 oracle S 2 11.7 442:39.17 oracle

! + top

2 top )

Χ

%

! ∗ ! Χ

! !

15∋ &Χ4 677Θ9

17


2

renice

/

) ∃) kill / top

∀ ! # 142 67769Φ

)

/∋ ) , ∃ ∃

∋ )

0 ) ,!

2 !

=Θ )67 %

1/ ) Κ ∗

%∗ ∋ ) Κ ∗ ! %∗ 2.∋/ ) Κ ∗ #

%∗

. ) +

Φ +Ρ 5Ρ 4Ρ Ρ & ΣΡ

3 ) ∀ 34/4) ∀ ∗ ! 4/ ) 4

18


!44.0 ) /

top ∀ ∀

Χ âˆ€ top ∀ 1Χ, 5Χ âˆ‹ 677Θ9 top ∀ -s ∀ 6

$ top -s ! + ∋ top ∀

∋ top ∋ ∀ 1

2 top

1Χ, 5Χ âˆ‹ 677Θ9

$ top -n 5 ! + top

19


, ∀ > :-n; ∀ ≅ / ) > ∀ ∀ ∃ =≅ ∀

2 ∀ 3 / ∃ ∃ ∀ ! top

$ top -b -n 5 > /tmp/teste.txt ! + top

, ∀ ? top ∀ ∃ ! ) -b ∗ -n ∀ 1 5 4/&Χ5 677∆9 2

/tmp/teste.txt

− ∀

/

top ∃ Φ

20


$ top -d 10.5 ! −+ − top

, ∀ ≅ Π:-d; ∃ ∀

=7 ∀ %

/ Î top )

ΤdÎĽ ÎĽsÎĽ # ∃ ∀ 2 ∃ top ∀

4 % ∀ 0 ∀ &

2 top #

∃ ! 1Χ, 5Χ âˆ‹ 677Θ9

$ top -u rodrric ! 4+

∃ ! top

+ Π-u ∀ ∃ ∀ Α top ∃

∃ , ) ∀

∃ sudo& 21


∃

∃

∀

) Î -U /

∃ top )

ΤuÎĽ ΤUÎĽ # ∀ login ∃

5 6

2 top

ΤFÎĽ ΤOÎĽ . 1Χ, 5Χ âˆ‹ 677Θ9 ∋ ∀ !

3 ∃ % ∀ ÎŚ

M ) ∀ ∗ N ) ,

P ) ∀ T ) 4

22


7 3 % ( /

ΤnÎĽ Τ#ÎĽ ∃

0 . 1Χ, 5Χ âˆ‹ 677Θ9

8 % ∀ 0 %

! top Π:-p; ∀

∀ ∆

$ top -p 2350 -p 3900

$ top -p 2350, 3900 ! 5+

top

Χ # top #

,567 5877 %

% 67

#

∀

9 ∀ ∀ %

ΤkÎĽ top ∃ 23


∀

∗ top ∃ ∃

%

=≅ 9 /∋4 2 ΤkÎĽ ∃ top ∀ 1Χ, 5Χ âˆ‹ 677Θ9

∀ %

)

Τrμ #

nice ! 1Χ, 5Χ âˆ‹ 677Θ9 3 ∃

∋ % top ∀ Π# ) ∃∀ uptime 2 uptime = ≅ =≅ 2 ∀ % . 1(2&,+2, 677?9 24


Χ % % ∃ .

∃ / ! )

Ε 2 uptime % % ∃

[capacity@Crato ~]$ uptime 17:59:01 up 186 days, 15:53, [capacity@Crato ~]$

5 users,

load average: 5.94, 7.27, 8.32

! 7+ : uptime

Χ ! ∀ 8 %

% ≅ Θ?

≅ ∆ 6∆

=≅ 8 >6

∋ # ∀ ∀ Φ

% ≅ Θ≅

∃ Ι

∀ ∀ ∃ ∃ % Ι

25


! uptime ) ∃

∀ %

∆

2

8

#∃

! Ε ∀ ∀

Ι ∋

%

∀ ! 1(2&,+2, 677?9 Î # ) ∃∀ % ∀ vmstat 2 vmstat # ∋ # % % ! ∃ 1(2&,+2, 677?9 Χ Ï‚Î• % % Î % 26


[capacity@Crato ~]$ vmstat 2 5 procs -----------memory---------- ---swap-r b swpd free buff cache si so 13 1 453872 14048 72624 14214384 0 8 1 453872 17792 72704 14222560 0 9 0 453872 26432 72752 14220448 0 8 1 453872 9728 72832 14214176 0 11 1 453872 8256 72608 14210272 0 [capacity@Crato ~]$

-----io---- --system-- ----cpu---bi bo in cs us sy id wa 0 1459 5293 0 0 59 14 22 0 434 13468 4553 983 92 8 0 0 1518 11288 5335 1854 87 12 0 0 3588 50254 6009 4387 82 17 1 0 12734 49836 5719 2754 94 5 1

5 0 0 0 1

! 8+ : vmstat

2 vmstat ∀ # Π, ∀ Θ vmstat ! 6

∀ ≅ # ∀ % 1(2&,+2, 677?9 % % % uptime − ! ∃ Χ Î‘ # % ! [VMSTAT, 1994]ÎŚ

Tabela 6: MĂŠtricas medidas pelo vmstat :

: ∗ %

procs r

,

∀

. / 3

27


memory

b

,

swpd

4 ∗ Î?Î&#x;

free

4 ∗ %∗

buff

− ∗ %∗

cache − ∗ # %∗ si

∗ Î?Î&#x;

so

∗ Î?Î&#x;

bi

%∗

bo

%∗

swap

io

system in

cpu

cs

, ∃ ∀

us

∀ ! ∃

sy

∀ !

id wa

, ∀

∀ ∀

/

cpu Α vmstat

∃

! 2

! # ∀ 28


% vmstat 1/ ∋, 2 677∆9 , % #

% ∀ 1(2&,+2, 677?9 2 vmstat # ∃

! ∀ # / ) ∀ ∃ ∃ % ∀ # 1(2&,+2, 677?9 Χ % uptime ) ∀ % ∃ % vmstat ) % ∃ % , )

∀ ∃ Χ âˆ€ ) % ∃ ∀ 1(2&,+2, 677?9 ∀ #∀ ∀ ∃ 29


∀ !

∃ 1(2&,+2, 677?9 3 ∀ ∀ ∋ ∃ 1(2&,+2, 677?9 ) %

# ∀ =77Η ∀ ! , ∃

∃ #

2 ps top ps ∃

top ∃ % / vmstat ∀

! ∀ ∀

# / vmstat ∀

∀ ! ∃ 30


sar iostat # ∀ ! # ∀ . ∀ Π# ) ∃∀ % ∀ ps pstree 2 ps % #

%

∃ ∃ 1/ ∋, 2 677∆9 ∋

# ∃

∗

# ∀

Î

∃ Π:aux; ∀ =7 [capacity@martins sa]$ ps aux USER PID %CPU %MEM VSZ RSS TTY 4051 30568 0.0 0.0 55040 2816 ? 4051 30569 0.1 0.0 319136 52448 ? oracle 30591 21.4 12.2 8338912 8179296 ? oracle 30773 0.0 12.2 8338976 8186352 ? oracle 30809 45.9 12.2 8343184 8188560 ? (... a saida continua ...)

STAT S Sl Ss Ss Ss

START 17:30 17:30 18:08 Mar11 18:08

! 9+ : ps aux

31

TIME 0:00 0:03 0:00 0:00 0:00

COMMAND /bin/sh /opt/ngin/interfaces/ /usr/java/j2sdk1.4.2_13/bin/java oraclemartins (LOCAL=NO) oraclemartins (LOCAL=NO) oraclemartins (LOCAL=NO)


, ! ) 1 + 677?9Φ

/∋) 3 ∃ ∃

)

3 ) ∀

34/4 ) ∀ ∗ !

: 1 ) − ∗

%∗ ∋ ) − ∗ !

%∗ ; ) 4

∃ . ) +

∃ &

.∋ ) &

4/ ) 4

!44.0 ) / ∀

2 pstree

∃ # ∃

! ∀

1/ ∋, 2 677∆9 Π# ) ∃∀

32


− % ∀ free 2 free ∗

Λ % % 1/ ∋, 2 677≅9 , ∀ == ) #

∀ ! free -m

!

+ # ! free -m 1/ ∋, 2 677∆9

+ Î 1Λ5∋∋ =ΘΘ>9 Φ

-b -k -m -g

∋

33

#


-l # ∗ -c <contador> ∋ ! uptime

<contador> ∋ % ∃ ∃ ∗ ∃ Χ % -s free ∗ !

∗ 15∋ &Χ4 677Θ9 4 % ∀ iostat 2 iostat !

% Ε 1(2&,+2, 677?9 Χ

∃ ! !

∋ ∀ )

∃

!

34


[capacity@santaluz ~]$ iostat Linux 2.6.9-42.ELsmp (santaluz) avg-cpu:

%user 23.82

Device: cciss/c0d0 cciss/c0d0p1 cciss/c0d0p2 cciss/c0d0p3 dm-0 dm-1 dm-2 dm-3 dm-4 dm-5 dm-6

%nice 0.00 tps 23.14 0.00 3.14 55.44 1.04 0.10 2.52 1.01 49.40 0.85 0.51

03/12/2009

%sys %iowait 3.74 1.03 Blk_read/s 938.64 0.03 13.99 924.58 1.32 4.15 12.50 0.57 889.14 12.94 3.96

%idle 71.41

Blk_wrtn/s Blk_read 332.99 2351158464 0.00 83940 11.16 35030944 321.83 2315936044 7.85 3313458 0.44 10382706 18.55 31301146 7.68 1422666 280.70 2227179690 3.03 32420058 3.58 9921634

Blk_wrtn 834091910 790 27942680 806147280 19663824 1110344 46477504 19224992 703118096 7594888 8958792

! + + ! iostat

/ ∀ =6 iostat % top ∋ ∀ ∗ # ! # ∗∀ ∀ Χ âˆ€ 1 2+4Χ4 677∆9 ÎŚ

â„Ś ! ∀

∗ #< & ∗ #< â„Ś ∀ 2

# # =76? 67?8 ?7?8 35


# /dev/ sda1 % dumpe2fs ∀ =>

$ dumpe2fs -h /dev/sda1 | grep -F “Block size� ! + Β #

∗ #< & ∗ #< â„Ś 2 iostat Î

Î -x % ∃ 1 2+4Χ4 677∆9 Χ âˆ€ =? ! iostat -x [capacity@santaluz ~]$ iostat -x Linux 2.6.9-42.ELsmp (santaluz) avg-cpu:

%user 23.82

%nice 0.00

03/12/2009

%sys %iowait 3.74 1.03

Device: rrqm/s wrqm/s r/s w/s cciss/c0d0 2.12 33.32 14.85 8.30 dm-0 0.00 0.00 0.06 0.98 dm-1 0.00 0.00 0.05 0.06 dm-2 0.00 0.00 0.20 2.32 dm-3 0.00 0.00 0.05 0.96 dm-4 0.00 0.00 14.31 35.09 dm-5 0.00 0.00 0.47 0.38 dm-6 0.00 0.00 0.07 0.45

%idle 71.41

rsec/s 938.62 1.32 4.14 12.50 0.57 889.12 12.94 3.96

wsec/s 332.98 7.85 0.44 18.55 7.67 280.70 3.03 3.58

rkB/s 469.31 0.66 2.07 6.25 0.28 444.56 6.47 1.98

wkB/s avgrq-sz avgqu-sz 166.49 54.94 0.55 3.93 8.82 0.02 0.22 45.04 0.01 9.28 12.31 0.67 3.84 8.13 0.79 140.35 23.68 0.29 1.52 18.76 0.02 1.79 14.65 0.03

await 23.70 16.69 63.05 265.99 782.42 5.94 23.17 61.66

svctm 2.55 3.25 4.40 2.22 1.13 0.96 3.27 5.31

%util 5.90 0.34 0.04 0.56 0.11 4.73 0.28 0.27

! + + ! iostat -x

Χ âˆ— Π∃ 1 2+4Χ4 677∆9ÎŚ

+ & + â„Ś 36


∀

Ω

∀

Ω

∀

#∗ #∗ Ω %∗

∀

+∀ Ω % #

∋ % ∀

+ ∀ Ω % #

) %

∀

!

Ω %

∀

!

3

Ω ∀ !

+ ∀ 1(2&,+2, 677?9 =77Η ) Π# ) ∃∀

37


5 % ∀ sar 2 sar ∃ ! iostat mpstat sar 2 sar Ε ÎŚ ∗ sar sa1 sa2 1+Χ5 677∆9 Χ % sa1 sa2 ∀ ∀ ∃

2 ∀ ∃ ∀

/var/log/sa Ε ! 1(2&,+2, 677?9 ∗ =≅ Ε ∀ ∀ =≅ [capacity@martins sa]$ sar -r -f /var/log/sa/sa11 Linux 2.6.9-67.EL (martins) 03/11/2009 12:00:02 AM kbmemfree kbmemused 12:10:01 AM 112992 66580032 12:20:01 AM 111552 66581472 12:30:01 AM 216416 66476608 12:40:01 AM 193504 66499520 12:50:01 AM 93024 66600000 01:00:01 AM 103312 66589712 01:10:01 AM 104064 66588960 01:20:01 AM 111744 66581280 01:30:01 AM 97120 66595904 (... a saida continua ...)

%memused kbbuffers 99.83 1321408 99.83 1218944 99.68 1210096 99.71 1132576 99.86 1080480 99.85 1010288 99.84 1075552 99.83 1076784 99.85 1135264

kbcached 54660240 54779216 54519968 54975200 54979824 55128448 54495584 54395280 54072608

kbswpfree kbswpused 143527776 38368 143527776 38368 143527776 38368 143527776 38368 143527776 38368 143527776 38368 143527776 38368 143527776 38368 143527776 38368

%swpused 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.03

kbswpcad 224 224 0 0 0 0 0 0 0

! −+ 3 sar

2 sar ∀ ∗ !

38


∀ ∗ ! ∗ # 1(2&,+2, 677?9 Î&#x; ∀ Î sar ∀ % Î 1(2&,+2, 677?9 sar -u 5 10 ∃ ! ≅ ∀ ∀ % Χ ! 2 sar ! # iostat Χ âˆ€ =Α ! sar -b ! ∃

[capacity@martins ~]$ sar -b Linux 2.6.9-67.EL (martins) 12:00:01 AM tps 12:10:01 AM 81.28 12:20:01 AM 56.00 12:30:01 AM 59.91 12:40:01 AM 62.79 12:50:01 AM 56.97 01:00:01 AM 66.92 (... a saida continua ...)

03/12/2009

rtps 8.57 0.01 0.00 0.03 0.15 0.00

wtps 72.71 55.99 59.91 62.75 56.82 66.92

bread/s 69.35 0.08 0.00 1.89 22.08 0.00

bwrtn/s 1046.95 800.53 864.59 935.62 897.32 1062.02

! 4+ ∋ ! sar

, % ! 1+Χ5 677∆9 Χ 39


# 1+Χ5 677∆9 2 sar %

!

∋

Χ âˆ€ =∆ ) ! ≅ ∀ 6 ∀

[capacity@Crato ~]$ sar -u 2 5 Linux 2.6.9-42.0.8.EL (Crato) 06:02:39 06:02:41 06:02:43 06:02:45 06:02:47 06:02:49 Average:

PM PM PM PM PM PM

CPU all all all all all all

03/12/2009

%user 29.97 27.33 46.37 63.04 81.97 49.78

%nice 0.00 0.00 0.00 0.00 0.00 0.00

%system 18.76 15.31 25.03 36.96 18.03 22.81

%iowait 36.20 40.86 24.44 0.00 0.00 20.27

%idle 15.07 16.50 4.16 0.00 0.00 7.14

! 5+ ∋ sar

Π# ) ∃∀ 7 % ∀ mpstat 2 mpstat % ∋ % !

1− +4Χ4 677∆9 ,

40


∀ =8 !

# # [capacity@Crato ~]$ mpstat -P ALL Linux 2.6.9-42.0.8.EL (Crato) 03/12/2009 06:01:53 06:01:53 06:01:53 06:01:53 06:01:53 06:01:53

PM PM PM PM PM PM

CPU all 0 1 2 3

%user 59.04 58.27 59.00 59.45 59.42

%nice %system %iowait 0.00 12.96 4.96 0.00 13.43 2.82 0.00 13.68 7.35 0.00 13.66 7.58 0.00 11.08 2.07

%irq 0.06 0.10 0.07 0.00 0.07

%soft 0.94 0.80 1.40 1.12 0.43

%idle 22.05 24.59 18.50 18.18 26.93

intr/s 1612.36 290.95 547.42 333.52 440.47

! 7+ ∋ mpstat ∃ ?

2 mpstat&

sar vmstat& ∀ ∀ # Π# ) ∃∀

41


& ∗ ∀ % ∗ % + ∀ 1/ ∋, 2 677∆9 ∀

∀ %∀ Φ = / # 6 ∋ ∗ ∀ > − ? 5 ∀ ∀ ≅ / ∀ ∀ ∀ Α Î’

> %

Ï‘

∀ Χ âˆ€ ∗ ∃ %

42


2 ∀ ϑ

! ∀ ∀ # #

! #

Ε 1/ ∋, 2 677∆9 ∋ )

∀ 1/ ∋, 2 677∆9 − %

Ï‚

% ∗ % 1/ ∋, 2 677∆9 Χ âˆ€ ∀

Ï‘ Î

∃ / =/∗

> = >∗ ∗ ! %

43


% ∀ Χ âˆ€ ∀ ∃ / ! > ∀ ∀ # # # Χ % uptime top

:mpstat -P ALL; :sar -u;

∋ # # Ι % mpstat sar % ∃ # ∗ sar) ϑ # % ∃ ∋ ∃

∃ ∀ 1/ ∋, 2 677∆9 2

% ∀

/

) ∀ Ε 1/ ∋, 2 677∆9Φ

44


) #∃

∃

# ) ps top /

∃ ∀

!

∃ ,

) renice

/ )

∀ ∃ # ∀

∀ ) .

>6

Α?

∃

∃

2

∀ # 2 ∀ ∀ ∀∃ ∋ ∃ ∀ ∀

Χ âˆ€

∗ 45


∀ ∀ 1/ ∋, 2 677∆9 ∋

# % ∗ !

∃ .

1/ ∋, 2 677≅9 2 ∀ ! ∀ ∃ ∗ ! ∃ ∃ ∀ Χ âˆƒ

∀ % ! ∀ ∀ %

Ε ∗ ! 1/ ∋, 2 677≅9 Χ

3

∀ 1/ ∋, 2 677≅9 ,

∀ ∃∀ ∃ Ι ∃

)

% ∃ Γ 1/ ∋, 2 677≅9 2

1/ ∋, 2 677≅9 Φ

3

∀

46


∀ . !

∀ ∀ ∃∀ ∗ ! % # ∃∀ ∋

! ∀ ∀

∋ ∀ ∀ ∀ #

∀ 1/ ∋, 2 677≅9 Φ

∃ %

Χ # ∃∀ 5 ∀ ∃

∃ ∋ ∗ / 1&25−Χ, 677Θ9 %

Π∀ ∗ 2 % % ∃ Î

47


∋ ∃ Π∀ ∗ %

# ∀ =Θ

$ systcl -w vm.max map count=65535 ! 8+ 4 ∀ Πsystcl

2 systcl % ∀ % ∀ /etc/sysctl.conf % ∀ ∗

2 ∀ % % %

2 ∗ /proc/sys/vm/ % / ∃ cat /proc/sys/vm/kswapd # 1&25−Χ, 677Θ9 2 ∀ 67

512 32 8 ! 9+ Î’ /proc/sys/vm/kswapd

) % ∀ 6=

48


$ echo 511 31 7 > /proc/sys/vm/kswapd ! + Χ /proc/sys/vm/kswapd

Χ

% ∗ ∃ # 1&25−Χ, 677Θ9 2 ∀ % 2 % ∀ ∀ ,

∀ ! 1/ ∋, 2 677≅9 Χ âˆ€ ∀ ∃ % % 1/ ∋, 2 677≅9 , % ∃ . ! Κ ! % ∀ 2

∃ Ξ Ď‚ Ψ Îš

49


! Ψ − Ψ Χ !

∀ ∃ Ψ 5 ∃ # 1(2&,+2, 677?9 2 % ∀ ∀ ) ∃ ∗∀ ∋ ∃ % 1/ ∋, 2 677≅9 Χ ∗∀ % % 3

) Ε

∀ 1/ ∋, 2 677≅9 Χ ∗ ) ∀ ∀ ∀ Ε 1/ ∋, 2 677≅9 Φ

+ ∀ # ς

%

! ∀

/ ∀ Ξ %

! ∀ ∀ ∀

Χ ∋. Χ

∀ # 50


% ! ∀

3 ∗∀ %

! ∗∀

2 ∗ ! % ∃

# # − 2 Χ % sar netstat ∃ ) % ∃ ∀ ∀ 1/ ∋, 2 677≅9 Χ âˆ€ 66 !

[capacity@santaluz ~]$ ifconfig eth2 Link encap:Ethernet HWaddr 00:13:21:FB:AF:4E inet addr:10.128.242.213 Bcast:10.128.242.255 Mask:255.255.255.0 inet6 addr: fe80::213:21ff:fefb:af4e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:293383834 errors:0 dropped:0 overruns:0 frame:0 TX packets:574022771 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:20758049675 (19.3 GiB) TX bytes:866195950305 (806.7 GiB) Interrupt:217 lo

Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:27355578 errors:0 dropped:0 overruns:0 frame:0 TX packets:27355578 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:6209073800 (5.7 GiB) TX bytes:6209073800 (5.7 GiB)

! + :

51


ϑ 5Ζ

4Ζ / 7

) ∀ ∀ 1/ ∋, 2 677≅9 ,

! ∀ # Γ # 2

∀ ∀ ∀ 1/ ∋, 2 677≅9 Φ

/# ∀

Χ âˆ€ 3 ∃ +

! # Χ

52


% + & % % ∀ ∀ % Β % # Χ ∃ # ∃ ∃ / ∀ Φ

+ 2 Φ 5 & ∋ Χ+ > Ο Φ 2 =7∀

Φ 6 )/ 6 Θ777 + = Α<# − ∗ Φ >6<Ο ∗ 56)≅>> , ∃ %

∗ .0

− ∀ % # ∗ ∆ sar ∃ # ∗

53


) /var/log/sa) Χ âˆ€ 6> ∀ ÎŚ ! + + ∀ # ∗ sar

Χ sar_historico.txt ∀ ∀ ∃ % # / ∀ ∃ ∀ ∀ sar %

! + / â„Ś 4 Η [3 ∴ +Îœ ∴ 0 ∀]

54


2 ) % ∀ 6? =77Η − % ∆7Η ∀ ∀

! −+ / ) Η

Χ âˆ€ 6≅ ! ∃ % ! % ∃ 1(2&,+2, 677?9 ∋ ) ) 2 % ∃ %

ps pstree top

55


! 4+ / ) Η

Χ % ∀ 6Α ! ) ∗ 1(2&,+2, 677?9 Χ ?7Η % ) ∃ ∀ ∀

! 5+ 0 ! Η

56


, ∀ 6∆ % % =7Η = ! ∀ =7Η ∃

∀ ∀ ! 1/ ∋, 2 677∆9 ∋ ! ! =/∗ ) % ∗

! , ) ∃ Ε = ! % =7Η =≅Η 1(2&,+2, 677?9 Β ! 2 ! = !

∃ ∃ ∃ % iostat -x ϑ ∃ vmstat mpstat ! > / # #

57


− ∀ ∀ ∀∃

! 7+ / ∗ 4∗)

∗ sar Π-r ∀ ∗ # ∗ 2 vmstat % ∃ %

# ∗ sar % / ∀ 68 =≅9∗ ∗ ! ! 69∗ =>9∗ ∗ ! % ∀ ∀ / ∀ ∃ # ∀ ) ∗ ! ) ∗

58


∗ − % ! ∃ ∃ ∀

! 8+ −% Ω 4∗

Χ % ∀ 6Θ ) ? # 2∗. ∃ ∀ ∃ 674∗ / 2∗. % 69∗ ) ∃ ∀ + ∀ ∃ ∀ ∀ − ∀ ∀ , % Χ % ∃ top& ) 59


! top - 17:40:12 up 187 days, 15:34, 6 users, load average: 7.82, 11.95, 12.28 Tasks: 278 total, 10 running, 262 sleeping, 0 stopped, 6 zombie Cpu(s): 75.7% us, 8.8% sy, 0.0% ni, 0.7% id, 13.8% wa, 0.0% hi, 1.0% si Mem: 15585296k total, 15575984k used, 9312k free, 100032k buffers Swap: 20971488k total, 453872k used, 20517616k free, 14220000k cached PID 31513 29223 32546 10091 32412 11059 15447 11011 11007 11003 11005 11009 4197 11019 11021 11023

USER oracle oracle oracle oracle oracle oracle root oracle oracle oracle oracle oracle root oracle oracle oracle

PR 25 25 18 15 18 16 15 15 15 15 15 15 34 16 16 16

NI 0 0 0 0 0 0 0 0 0 0 0 0 19 0 0 0

VIRT 1947m 1935m 1935m 1934m 1937m 1936m 8928 1954m 1934m 1934m 1934m 1934m 0 1934m 1934m 1933m

RES 1.8g 1.7g 1.7g 1.7g 1.7g 1.7g 892 1.7g 1.7g 1.7g 1.7g 1.7g 0 1.7g 1.7g 1.7g

SHR 1.7g 1.7g 1.7g 1.7g 1.7g 1.7g 440 1.7g 1.7g 1.7g 1.7g 1.7g 0 1.7g 1.7g 1.7g

S %CPU %MEM TIME+ COMMAND R 99 11.8 0:52.82 oracle R 85 11.8 1:17.66 oracle R 59 11.7 0:03.96 oracle S 20 11.7 0:06.78 oracle R 15 11.7 0:01.59 oracle D 14 11.7 443:46.81 oracle S 12 0.0 0:22.59 bpbkar S 6 11.7 76:09.97 oracle S 6 11.6 59:42.30 oracle S 5 11.6 56:16.54 oracle S 3 11.6 52:14.53 oracle S 3 11.6 52:02.76 oracle R 3 0.0 3325:30 kipmi0 R 2 11.7 442:41.53 oracle R 2 11.7 441:44.35 oracle S 2 11.7 442:39.17 oracle

! 9+ Λ ∀ top

Β ) ∀ >7 ∃

7 ∆Η ∆≅ ∆Η

8 8>Η

=> 8Η

∀ ! , # )

∃ %

# ) , ⊼ / 3 ∗ Ď‘

60


% ∃

# # ∃

# ∃ _2 ∀ 1(2&,+2, 677?9 , ∃ ! sar top

/ ! > sar %

! ∀ ∀ ∗ ! & # ∃

∃ , ! # % ∗ ∀ ∀ / ∃ Ε #∃ !

ςΕ #

2 ) # + ∃ % ! ∀ #

61


∀ 5 # # ∃ )

#

+ # ∃ # ∃ ∀ ! ∀ ) ! #

! ∀ ∀ ∀ # ! # ∃

62


4

% 2 # %

∃ Χ % ! ! 6 # #

∀ ∀ ∀ ! ? ∃ # ! > , ∃ ! ≅ # # ∀

∀

∀ 4 # 0 ! ∋ ∀ ∃

# 3 ∀ Π%

63


% # ∀ ! ∃ ∗ , % sysctl 2 # ∀ ∃ ∃ !

/ ≅ ≅

∃

64


7 6 ! 6;< : = =∋ 26>! : 1(2&,+2, 677?9 (2&,+2, + Ν Ι &3 Σ∋,<Χ < Ι 3 ΧΒΧ54 Ο Ι 4 ∀ + Ι Ο−

Ι 677? 1/ ∋, 2 677≅9 / ∋, 2 ∋ Ι 4 ∀ 5 & ∋ Ο− ) + + Ι _ ⊥ Ι ( 677≅ 1/ ∋, 2 677∆9 / ∋, 2 ∋ Ι Ν3, −Χ+Χ 4 ⊥ # ⊥ Ι 4 ∀ < Ι _ ⊥ Ι ( 677∆ 1/2− 34∋5025 67789 5 / Γ Ι / # ∃ 4 ∀ 4 Ι ( / Γ Ι ( 6778Ι Χ Ζ Ι ,α ?88 1 2</ 677= 9 2 < / Ι + Μ Ο ⊥Ι =6 #

Ι Χ 677= 142 67769 0 ( / Ι − ∀ 42 [=]Ι + 6776 1Β−+4Χ4 =ΘΘ?9 0 & ΜΙ Λ % ⊥ Λ Ι − ∀ Β−+4Χ4[8]Ι 4# Γ < ⊥∀ Ι ( =ΘΘ?

65


1 + 677?9 ⊥ Ο ⊥ Ι ( # − # Ν Ι − ∀ +[=]Ι ( 677? 1Λ5∋∋ =ΘΘ>9 ∋ Ο Ι − ∀ Λ5∋∋[=]Ι / # +Μ Ι − =ΘΘ> 1 2+4Χ4 677∆9 < + Ι − ∀ 2+4Χ4[=]Ι ( 677∆ 1+Χ5 677∆9 < + Ι − ∀ +Χ5[=]Ι 2 677∆ 1− +4Χ4 677∆9 < + Ι − ∀ − +4Χ4[=]Ι ( 677∆ 1Χ, 5Χ ∋ 677Θ9 / 5 ∀ Χ Ο ∀ 4 ∀ ∋ ! ΓΓΓ Φ # Φ__ ∀ _ ∀ _ =≅ 677Θ 1&25−Χ, 677Θ9 & , Ι − Μ , Ι 3 ∀ Β − Μ 5 & − ∀ ! ΓΓΓ Φ # Φ__ΓΓΓ # _ ∀ _77= 7?_ _ _ 66 677Θ 1 5 4/&Χ5 677∆9 # + Ι

# Ο < Ι ∀ , Ι + ∀ ( Ι ( Ι / 5∃ ∃ Ι 2β5

Μ 677∆

66


15∋ &Χ4 677Θ9 5 & −

Ι 5 & +Μ Χ Ι ! ΓΓΓ 3 Φ # Φ__ΓΓΓ # _ _

_ _5& )Θ)− _ ) _ =) ) Μ #

6≅ 677Θ

67


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.