25 Ağustos 2016 Perşembe

vmstat komutu

Giriş
Virtual memory ve tüm CPU'lar hakkında bilgi verir. Eğer işlemci başına bilgi görmek istersek mpstat komutu kullanılır

-s seçeneği
Şöyle yaparız
vmstat -s
16305800  total memory
16217112  used memory
9117400  active memory
6689116  inactive memory
88688  free memory
151280  buffer memory
vmstat -w 1
Her bir saniyede bir CPU kullanımı hakkında bilgi verir

Örnek
Çıktı şuna benzer
$ vmstat -w 1
--procs-- ... ---swap-- -----io---- -system-- --------cpu--------
   r    b ... si   so      bi    bo   in   cs  us  sy  id  wa  st
   8    0 ...  0    0     159   116 1049  520  31  10  58   0   0
Sütun başlıklarındaki harflerin açıklaması şöyle
r : Processes running or waiting for runtime. If this number is consistently higher than the number of CPUs, then you have saturized the CPU. Take a look at the cpu column for details.

us : Percentage of time spent executing user space instructions. High number here means an application is over-utilizing the CPU.

sy : Percentage of time spent executing system / kernel space instructions. Typically this number should be lower than 20%. A high number here could indicate issues in the kernel or more likely in a driver.

wa : Time spent waiting for I/O. A consistently high number here indicate an issue with an I/O device. Take a look a the disk I/O analysis later in the follow up article.

st : Percentage of time stolen from the CPU. This happens in environments with virtual machines where one machine is stealing CPU cycles from the other. If that happens, you may have a noisy neighbor issue and — depending on your infrastructure — you could move the VM to another physical host.






Hiç yorum yok:

Yorum Gönder