Book Image

Embedded Linux Projects Using Yocto Project Cookbook

By : Alex Gonzalez
Book Image

Embedded Linux Projects Using Yocto Project Cookbook

By: Alex Gonzalez

Overview of this book

Table of Contents (13 chapters)
Embedded Linux Projects Using Yocto Project Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using blktrace


There are a few tools available to perform block devices I/O monitoring and profiling.

Starting with iotop which we mentioned in the Exploring Yocto's tracing and profiling tools recipe, which gives a general idea of the throughput on a system and a particular process. Or iostat, which provides many more statistics regarding CPU usage and device utilization, but does not provide per process details. And finally blktrace that is a GPLv2 licensed tool which monitors specific block devices I/O at a low level, and can also compute I/O operations per second (IOPS).

This recipe will explain how to use blktrace to trace block devices and blkparse, to convert the traces into human readable format.

Getting ready

To use blktrace and blkparse, you can add them to the target image by adding it specifically, as in:

IMAGE_INSTALL_append = " blktrace"

Alternately, you can also use the tools-profile image feature, or an -sdk image.

You will also need to configure the Linux kernel with CONFIG_FTRACE...