qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC 0/3] qga: add guest-get-memory-info (for 2.5)
@ 2015-07-31 17:36 marcandre.lureau
  2015-07-31 17:36 ` [Qemu-devel] [RFC 1/3] qga: add guest-get-memory-info json marcandre.lureau
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: marcandre.lureau @ 2015-07-31 17:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, mdroth, jbelka

From: Marc-André Lureau <marcandre.lureau@redhat.com>

This series implement a new qemu guest agent command to get memory
information from the guest. This is based on ovirt-guest-agent
"memory-stats" message.

I couldn't find documentation for the ovirt message, but the list of
fields are summarized in this test
https://github.com/oVirt/ovirt-guest-agent/blob/master/tests/message_validator.py#L137
and according to how they are populated in the code, I adapted it to
the following GuestMemoryInfo structure fields:

 - mem-total: Total usable RAM.
 - mem-free:  Total of RAM that can be used without having to swap contents to disk.
 - mem-cached: In-RAM cache.
 - swap-total: Total amount of swap space available.
 - swap-free: Amount of swap space that is currently unused.
 - swap-in: Number of pages swapped-in per second.
 - swap-out: Number of pages swapped-out per second.
 - pf-major: Number of major page fault per second.
 - pf-minor: Number of minor page fault per second.

Implemented on Linux and Win32 based on ovirt implementations.

Note: the "per second" value differ between Linux and Win32. On Linux,
the value is computed based on the average since the last query,
however on win32 this seems to be an instantaneous value (they have
spikes, but often at 0). I have asked for help on SF:

http://serverfault.com/questions/709943/windows-equivalent-of-linux-vmstat-pswpin-and-pgfault

Related to RFE:
https://bugzilla.redhat.com/show_bug.cgi?id=1101915

Marc-André Lureau (3):
  qga: add guest-get-memory-info json
  qga: implement get-memory-info for Linux
  qga: implement get-memory-info on win32

 configure            |   1 +
 qga/commands-posix.c | 102 +++++++++++++++++++++++++++++++
 qga/commands-win32.c | 166 +++++++++++++++++++++++++++++++++++++++++++++++++++
 qga/main.c           |  28 +++++++++
 qga/qapi-schema.json |  48 +++++++++++++++
 5 files changed, 345 insertions(+)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-07-31 18:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-31 17:36 [Qemu-devel] [RFC 0/3] qga: add guest-get-memory-info (for 2.5) marcandre.lureau
2015-07-31 17:36 ` [Qemu-devel] [RFC 1/3] qga: add guest-get-memory-info json marcandre.lureau
2015-07-31 17:36 ` [Qemu-devel] [RFC 2/3] qga: implement get-memory-info for Linux marcandre.lureau
2015-07-31 17:45   ` Daniel P. Berrange
2015-07-31 18:02     ` Marc-André Lureau
2015-07-31 17:36 ` [Qemu-devel] [RFC 3/3] qga: implement get-memory-info on win32 marcandre.lureau
2015-07-31 17:54 ` [Qemu-devel] [RFC 0/3] qga: add guest-get-memory-info (for 2.5) Daniel P. Berrange
2015-07-31 18:05   ` Marc-André Lureau

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).