Vmstat: Difference between revisions

From Yocto Project
Jump to navigationJump to search
No edit summary
No edit summary
Line 3: Line 3:
=== Monitoring the system ===
=== Monitoring the system ===
In order to reproduce the shown output, one should:
In order to reproduce the shown output, one should:
* Build <tt>core-image-minimal</tt>
 
* Fetch upstream code from the <tt>core-image-minimal</tt> recipes
 
  $ git clone git://git.yoctoproject.org/poky
  $ git clone git://git.yoctoproject.org/poky
  $ cd poky/
  $ cd poky/
  $ source oe-init-build-env
  $ source oe-init-build-env
  $ bitbake core-image-minimal
$ echo -e 'DL_DIR = "/home/user/poky/downloads"' > conf/auto.conf
  $ bitbake core-image-minimal -c fetchall


* Move the <tt>download</tt> directory to a different location than <tt>build</tt>
$ pwd
/home/user/poky/build/
$ mv downloads/ ../


* Remove <tt>build/</tt> and re-build <tt>core-image-minimal</tt> from scratch, but this time, monitoring the system with <tt>vmstat</tt>
* Start vmstat in another terminal
  $ cd ../
  $ vmstat 2 > vmstat-output.raw
$ pwd
 
/home/user/poky/
* In the initial terminal, launch bitbake, making sure no network activity will be done
$ rm -rf build/
echo -e 'BB_NO_NETWORK = "1"' > conf/auto.conf
$ source oe-init-build-env
$ echo -e "DL_DIR = "/home/user/poky/downloads" \nBB_NO_NETWORK = "1"" > conf/auto.conf
  $ bitbake core-image-minimal
  $ 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
* Once <tt>bitbake</tt> finishes, <tt>Ctrl+D</tt> the <tt>vmstat</tt> command


=== Procs ===
=== Procs ===

Revision as of 14:52, 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:

  • Fetch upstream code from the core-image-minimal recipes
$ git clone git://git.yoctoproject.org/poky
$ cd poky/
$ source oe-init-build-env
$ echo -e 'DL_DIR = "/home/user/poky/downloads"' > conf/auto.conf
$ bitbake core-image-minimal -c fetchall


  • Start vmstat in another terminal
$ vmstat 2 > vmstat-output.raw
  • In the initial terminal, launch bitbake, making sure no network activity will be done

echo -e 'BB_NO_NETWORK = "1"' > conf/auto.conf

$ bitbake core-image-minimal
  • Once bitbake finishes, Ctrl+D the vmstat command

Procs

Vmstat-procs-minimal.png

Memory

Vmstat-memory-minimal.png

IO

Vmstat-io-minimal.png

System

Vmstat-system-minimal.png

CPU

Vmstat-cpu-minimal.png