Vmstat: Difference between revisions
From Yocto Project
Jump to navigationJump to search
Line 1: | Line 1: | ||
== System Monitoring with vmstat == | == System Monitoring with vmstat == | ||
The following results were obtained based on data collected using <tt>vmstat</tt>, a tool that reports a system's virtual memory statistics. | |||
=== Monitoring the system === | |||
In order to reproduce the shown output, one should: | |||
* Build <tt>core-image-minimal</tt> | |||
$ git clone git://git.yoctoproject.org/poky | |||
$ cd poky/ | |||
$ source oe-init-build-env | |||
$ bitbake core-image-minimal | |||
* Move the <tt>download</tt> directory to a different location than <tt>build</tt> | |||
$ pwd | |||
/home/user/poky/build/ | |||
$ mv downloads/ ../ | |||
=== Procs === | * Remove <tt>build/</tt> and re-build <tt>core-image-minimal</tt> from scratch, but this time, monitoring the system with <tt>vmstat</tt> | ||
$ cd ../ | |||
$ pwd | |||
/home/user/poky/ | |||
$ rm -rf build/ | |||
$ source oe-init-build-env | |||
$ echo -e "DL_DIR = "/home/user/poky/downloads" \nBB_NO_NETWORK = "1"" > conf/auto.conf | |||
$ bitbake core-image-minimal | |||
# In another terminal right at the same time bitbake starts running run the following: | |||
$ vmstat 2 > vmstat-output.raw | |||
* Once <tt>bitbake</tt> finisshes, <tt>Ctrl+D</tt> the <tt>vmstat</tt> command | |||
==== Procs ==== | |||
[[File:Vmstat-procs-minimal.png|thumb|center|500px]] | |||
=== Memory === | |||
[[File:Vmstat-memory-minimal.png|thumb|center|500px]] | |||
=== IO === | |||
[[File:Vmstat-io-minimal.png|thumb|center|500px]] | |||
=== System === | |||
[[File:Vmstat-system-minimal.png|thumb|center|500px]] | |||
=== CPU === | |||
[[File:Vmstat-cpu-minimal.png|thumb|center|500px]] | |||
<!--=== Procs === | |||
The <tt>procs</tt> section reports the number of processing jobs waiting to be run. | |||
<tt>r</tt>: runnable processes | |||
<tt>b</tt>: processes in uninterruptible sleep | |||
==== Bitbake core-image-minimal ==== | ==== Bitbake core-image-minimal ==== | ||
[[File:Vmstat-procs.png]] | [[File:Vmstat-procs.png|thumb|left|500px]] | ||
==== Bitbake world ==== | ==== Bitbake world ==== | ||
[[File:Vmstat-procs-world.png]] | [[File:Vmstat-procs-world.png]] | ||
Line 31: | Line 77: | ||
[[File:Vmstat-cpu.png]] | [[File:Vmstat-cpu.png]] | ||
==== Bitbake world ==== | ==== Bitbake world ==== | ||
[[File:Vmstat-cpu-world.png]] | [[File:Vmstat-cpu-world.png]]--> |
Revision as of 00:46, 7 March 2017
System Monitoring with vmstat
The following results were obtained based on data collected using vmstat, a tool that reports a system's virtual memory statistics.
Monitoring the system
In order to reproduce the shown output, one should:
- Build core-image-minimal
$ git clone git://git.yoctoproject.org/poky $ cd poky/ $ source oe-init-build-env $ bitbake core-image-minimal
- Move the download directory to a different location than build
$ pwd /home/user/poky/build/ $ mv downloads/ ../
- Remove build/ and re-build core-image-minimal from scratch, but this time, monitoring the system with vmstat
$ cd ../ $ pwd /home/user/poky/ $ rm -rf build/ $ source oe-init-build-env $ echo -e "DL_DIR = "/home/user/poky/downloads" \nBB_NO_NETWORK = "1"" > conf/auto.conf $ bitbake core-image-minimal # In another terminal right at the same time bitbake starts running run the following: $ vmstat 2 > vmstat-output.raw
- Once bitbake finisshes, Ctrl+D the vmstat command
Procs
Memory
IO
System
CPU