* [Qemu-devel] [question] How to get the guest physical memory usage from host? @ 2014-12-22 3:59 Zhang Haoyu 2014-12-22 8:41 ` Andrey Korolyov 0 siblings, 1 reply; 8+ messages in thread From: Zhang Haoyu @ 2014-12-22 3:59 UTC (permalink / raw) To: qemu-devel Hi, How to get the guest physical memory usage from host? I don't want to introduce a guest-agent to get the info. Thanks, Zhang Haoyu ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [question] How to get the guest physical memory usage from host? 2014-12-22 3:59 [Qemu-devel] [question] How to get the guest physical memory usage from host? Zhang Haoyu @ 2014-12-22 8:41 ` Andrey Korolyov 2014-12-22 8:57 ` Zhang Haoyu 2015-01-03 0:41 ` Richard W.M. Jones 0 siblings, 2 replies; 8+ messages in thread From: Andrey Korolyov @ 2014-12-22 8:41 UTC (permalink / raw) To: Zhang Haoyu; +Cc: qemu-devel On Mon, Dec 22, 2014 at 6:59 AM, Zhang Haoyu <zhhy.zhanghaoyu@gmail.com> wrote: > Hi, > > How to get the guest physical memory usage from host? > I don't want to introduce a guest-agent to get the info. > > Thanks, > Zhang Haoyu > There`s probably one approach, simular to (currently abandoned) virt-dmesg, via peeking to the guest memory directly. What are reasons for not leaving this task to agent, as it looks much simpler? ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [question] How to get the guest physical memory usage from host? 2014-12-22 8:41 ` Andrey Korolyov @ 2014-12-22 8:57 ` Zhang Haoyu 2014-12-22 9:16 ` Andrey Korolyov 2015-01-03 0:41 ` Richard W.M. Jones 1 sibling, 1 reply; 8+ messages in thread From: Zhang Haoyu @ 2014-12-22 8:57 UTC (permalink / raw) To: Andrey Korolyov; +Cc: qemu-devel On 2014/12/22 16:41, Andrey Korolyov wrote: > On Mon, Dec 22, 2014 at 6:59 AM, Zhang Haoyu <zhhy.zhanghaoyu@gmail.com> wrote: >> Hi, >> >> How to get the guest physical memory usage from host? >> I don't want to introduce a guest-agent to get the info. >> >> Thanks, >> Zhang Haoyu >> > > There`s probably one approach, simular to (currently abandoned) > virt-dmesg, via peeking to the guest memory directly. What are reasons > for not leaving this task to agent, as it looks much simpler? > In some cases, we are not permitted to install anything in customer's guest environment. Thanks, Zhang Haoyu ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [question] How to get the guest physical memory usage from host? 2014-12-22 8:57 ` Zhang Haoyu @ 2014-12-22 9:16 ` Andrey Korolyov 2014-12-22 9:22 ` Zhang Haoyu 0 siblings, 1 reply; 8+ messages in thread From: Andrey Korolyov @ 2014-12-22 9:16 UTC (permalink / raw) To: Zhang Haoyu; +Cc: qemu-devel On Mon, Dec 22, 2014 at 11:57 AM, Zhang Haoyu <zhhy.zhanghaoyu@gmail.com> wrote: > > On 2014/12/22 16:41, Andrey Korolyov wrote: >> On Mon, Dec 22, 2014 at 6:59 AM, Zhang Haoyu <zhhy.zhanghaoyu@gmail.com> wrote: >>> Hi, >>> >>> How to get the guest physical memory usage from host? >>> I don't want to introduce a guest-agent to get the info. >>> >>> Thanks, >>> Zhang Haoyu >>> >> >> There`s probably one approach, simular to (currently abandoned) >> virt-dmesg, via peeking to the guest memory directly. What are reasons >> for not leaving this task to agent, as it looks much simpler? >> > In some cases, we are not permitted to install anything in customer's guest environment. > > Thanks, > Zhang Haoyu Ok, looks like memory peeking techniques are only a choice then. And, of course, this approach tends to be less flexible, because it depends on a relatively strict requirements for running kernel in a guest. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [question] How to get the guest physical memory usage from host? 2014-12-22 9:16 ` Andrey Korolyov @ 2014-12-22 9:22 ` Zhang Haoyu 2014-12-22 9:33 ` Andrey Korolyov 0 siblings, 1 reply; 8+ messages in thread From: Zhang Haoyu @ 2014-12-22 9:22 UTC (permalink / raw) To: Andrey Korolyov; +Cc: qemu-devel On 2014/12/22 17:16, Andrey Korolyov wrote: > On Mon, Dec 22, 2014 at 11:57 AM, Zhang Haoyu <zhhy.zhanghaoyu@gmail.com> wrote: >> >> On 2014/12/22 16:41, Andrey Korolyov wrote: >>> On Mon, Dec 22, 2014 at 6:59 AM, Zhang Haoyu <zhhy.zhanghaoyu@gmail.com> wrote: >>>> Hi, >>>> >>>> How to get the guest physical memory usage from host? >>>> I don't want to introduce a guest-agent to get the info. >>>> >>>> Thanks, >>>> Zhang Haoyu >>>> >>> >>> There`s probably one approach, simular to (currently abandoned) >>> virt-dmesg, via peeking to the guest memory directly. What are reasons >>> for not leaving this task to agent, as it looks much simpler? >>> >> In some cases, we are not permitted to install anything in customer's guest environment. >> >> Thanks, >> Zhang Haoyu > > Ok, looks like memory peeking techniques are only a choice then. And, > of course, this approach tends to be less flexible, because it depends > on a relatively strict requirements for running kernel in a guest. > Yes, it should depends on guest os implementation, because physical memory is managed by OS, which have the full knowledge of memory usage, so I'm afraid that windows dose not friendly support it. Could you detail the peeking techniques mentioned above? Thanks, Zhang Haoyu ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [question] How to get the guest physical memory usage from host? 2014-12-22 9:22 ` Zhang Haoyu @ 2014-12-22 9:33 ` Andrey Korolyov 2014-12-23 2:06 ` Zhang Haoyu 0 siblings, 1 reply; 8+ messages in thread From: Andrey Korolyov @ 2014-12-22 9:33 UTC (permalink / raw) To: Zhang Haoyu; +Cc: qemu-devel > Yes, it should depends on guest os implementation, > because physical memory is managed by OS, which have the full knowledge of memory usage, > so I'm afraid that windows dose not friendly support it. > Could you detail the peeking techniques mentioned above? > > Thanks, > Zhang Haoyu Generally I meant virDomainMemoryPeek, but nothing prevents you to write code with same functionality, if libvirt usage is not preferred, it is only about asking monitor for chunks of memory and parse them in a proper way. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [question] How to get the guest physical memory usage from host? 2014-12-22 9:33 ` Andrey Korolyov @ 2014-12-23 2:06 ` Zhang Haoyu 0 siblings, 0 replies; 8+ messages in thread From: Zhang Haoyu @ 2014-12-23 2:06 UTC (permalink / raw) To: Andrey Korolyov; +Cc: qemu-devel On 2014/12/22 17:33, Andrey Korolyov wrote: >> Yes, it should depends on guest os implementation, >> because physical memory is managed by OS, which have the full knowledge of memory usage, >> so I'm afraid that windows dose not friendly support it. >> Could you detail the peeking techniques mentioned above? >> >> Thanks, >> Zhang Haoyu > > Generally I meant virDomainMemoryPeek, but nothing prevents you to > write code with same functionality, if libvirt usage is not preferred, > it is only about asking monitor for chunks of memory and parse them in > a proper way. > Thanks, Andrey. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [question] How to get the guest physical memory usage from host? 2014-12-22 8:41 ` Andrey Korolyov 2014-12-22 8:57 ` Zhang Haoyu @ 2015-01-03 0:41 ` Richard W.M. Jones 1 sibling, 0 replies; 8+ messages in thread From: Richard W.M. Jones @ 2015-01-03 0:41 UTC (permalink / raw) To: Andrey Korolyov; +Cc: qemu-devel On Mon, Dec 22, 2014 at 12:41:45PM +0400, Andrey Korolyov wrote: > On Mon, Dec 22, 2014 at 6:59 AM, Zhang Haoyu <zhhy.zhanghaoyu@gmail.com> wrote: > > Hi, > > > > How to get the guest physical memory usage from host? > > I don't want to introduce a guest-agent to get the info. > > > > Thanks, > > Zhang Haoyu > > > > There`s probably one approach, simular to (currently abandoned) > virt-dmesg, via peeking to the guest memory directly. What are reasons > for not leaving this task to agent, as it looks much simpler? Fixing virt-dmesg might be better since it has the machinery already for talking to libvirt and accessing the guest kernel memory. Of course there is approx zero chance that this approach will work for Windows guests. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-01-03 0:41 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-12-22 3:59 [Qemu-devel] [question] How to get the guest physical memory usage from host? Zhang Haoyu 2014-12-22 8:41 ` Andrey Korolyov 2014-12-22 8:57 ` Zhang Haoyu 2014-12-22 9:16 ` Andrey Korolyov 2014-12-22 9:22 ` Zhang Haoyu 2014-12-22 9:33 ` Andrey Korolyov 2014-12-23 2:06 ` Zhang Haoyu 2015-01-03 0:41 ` Richard W.M. Jones
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).