From: "Daniel P. Berrange" <berrange-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: jd <jdsw2002-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: Fwd: Re: KVM management and API
Date: Tue, 1 May 2007 03:18:15 +0100 [thread overview]
Message-ID: <20070501021814.GX22697@redhat.com> (raw)
In-Reply-To: <455463.58286.qm-aZgEyKITWI6vuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
On Mon, Apr 30, 2007 at 07:01:55PM -0700, jd wrote:
> Does libvirt use ps -ef | grep qemu to find out qemu processes ? Or it
> manages only ones that are started using libvirt. Using some naming scheme.
We only manage instances started by libvirt. We (briefly) considered 'ps ef'
but this is not at all scalable, since getting a list of active domains is
quite a frequently invoked operation. In latest CVS of QEMU there is a new
option '-daemonize' and '-name string' which will make it leave a UNIX domain
socket & pid file in a predictable location, but since that's not in any
release yet, we can't rely on it. There is also the issue of manage configs
of instances which aren't running & hence have no process.
> How do you know if a running process is using kvm kernel module or not ?
Since libvirt only manages instances it invokes, it knows whether we
launched the KVM version. Ideally a monitor command would be able to tell
us what accelerator is in use.
> libvirt seems to be connecting to qemu console through qemud ? right ?
> You have done quite a bit of work to send command and parse. !! Isnt
> this error prone ? (will code for parsing work in different char set ?
> or qemu console is always guarenteed to be in english ?)
The console is always in English & even if it were translated in the future,
we can control the environment the process is launched it to force it to
be in the C/POSIX locale. Anthony Liguori has done some work in recent
times to make some of the monitor commands easier / more predictable to
parse, so I'm not really worried about it currently.
The qemu monitor is really the recommended (and only) interface for
management apps which need to control aspects of QEMU's operation
on-the-fly. We use it for pause/resume, save/restore at this time. I
expect we'll make further use of it in the future, for example to set
the VNC password securely (passsing passwds on the command line or
via environment vars is not good).
> How do you find out what % of allocated memory is actually used by VM ?
Any app on the host can only ever tell how much memory was allocated
to a VM. To determine whether an OS is actually using all of this
allocation requires some form of agent in the guest OS to report back
on info.
> For cpu /proc seems to be used.. which seems fine, but will not work
> for QEMU on Windows.
Indeed not - it won't even work on non-Linux systems. There isn't any form
of standard API in POSIX world for getting process CPU usage, so we're expecting
to have to implement this for each OS ported to. The code is well isolated
so porting it won't be hard.
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
next prev parent reply other threads:[~2007-05-01 2:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-01 2:01 Fwd: Re: KVM management and API jd
[not found] ` <455463.58286.qm-aZgEyKITWI6vuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
2007-05-01 2:18 ` Daniel P. Berrange [this message]
[not found] ` <20070501021814.GX22697-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2007-05-02 12:47 ` Heidi Eckhart
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=20070501021814.GX22697@redhat.com \
--to=berrange-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=jdsw2002-/E1597aS9LQAvxtiuMwx3w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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