qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Aarian P. Aleahmad" <arian.spidey@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Tracking the VM making an IO request
Date: Wed, 10 Feb 2016 10:23:37 +0000	[thread overview]
Message-ID: <20160210102337.GE7317@stefanha-x1.localdomain> (raw)
In-Reply-To: <CAEbcHeoXbagG0wrb2K26Dams-TCqMTwOqfon_p8JYS5cPk8tEA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 962 bytes --]

On Wed, Feb 10, 2016 at 12:35:54PM +0330, Aarian P. Aleahmad wrote:
> I'm a student, engaged in a project in which QEMU is a candidate to be used
> to make some studies about IO usage etc.
> I need to track the IO requests made to the block devices (e.g. HDD, SSD,
> etc.). I check the source code but I was confused. What I want to know is
> that when an IO request is made, find out that which on of the VMs has made
> that request. I'll thank you if you help me on this issue.

There are trace events that you can use.  See docs/tracing.txt and
trace-events.

virtio_blk_handle_write and virtio_blk_handle_read can be used if your
guest has virtio-blk.

The QEMU block layer also has trace events named bdrv_aio_*.

Or you could use blktrace(8) in the guest or on the host, depending on
how you've set up storage.

Finally, if you prefer you could set up an iSCSI or NBD target and
simply use Wireshark to record and analyze the I/O request patterns.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2016-02-10 10:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10  9:05 [Qemu-devel] Tracking the VM making an IO request Aarian P. Aleahmad
2016-02-10 10:23 ` Stefan Hajnoczi [this message]
2016-02-10 12:40   ` Paolo Bonzini
2016-03-12 12:47     ` Aarian P. Aleahmad
2016-03-14  2:13       ` Fam Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160210102337.GE7317@stefanha-x1.localdomain \
    --to=stefanha@gmail.com \
    --cc=arian.spidey@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).