qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paulo Ricardo Paz Vital <paulo.vital@profitbricks.com>
To: Erik Rull <erik.rull@rdsoftware.de>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Getting VM state from outside QEMU?
Date: Tue, 07 Apr 2015 15:42:19 +0200	[thread overview]
Message-ID: <1428414139.25243.1.camel@profitbricks.com> (raw)
In-Reply-To: <1746798507.1094444.1428413473548.JavaMail.open-xchange@oxbaltgw09.schlund.de>

On Tue, 2015-04-07 at 15:31 +0200, Erik Rull wrote:
> Hi all,
> 
> I need a pretty simple way to get the current state of the VM running in QEMU -
> I only need the VM state (e.g. running, paused,...). Since my environment does
> not have any perl, python or other high level scripting capabilities, a simple
> way e.g. via a shell script would be nice. QEMU is running daemonized, so
> interacting with the qemu console is not possible.
> Are there any usable entries in /proc, /dev or /sys that could be used?
> 

Hello Erik,

My suggestion is to create a script that sends the QMP command
"query-status" an then parse the result. The syntax and output is:

-> { "execute": "query-status" }
<- { "return": { "running": true, "singlestep": false, "status":
"running" } }


> Thanks.
> 
> Best regards,
> 
> Erik
> 

-- 
Paulo Ricardo Paz Vital <paulo.vital@profitbricks.com>
ProfitBricks GmbH

  reply	other threads:[~2015-04-07 13:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-07 13:31 [Qemu-devel] Getting VM state from outside QEMU? Erik Rull
2015-04-07 13:42 ` Paulo Ricardo Paz Vital [this message]
2015-04-08 16:10   ` Erik Rull
2015-04-08 16:16     ` Eric Blake
2015-04-08 16:21       ` Erik Rull
2015-04-08 16:34         ` Eric Blake
2015-04-09  7:33       ` Paulo Ricardo Paz Vital
2015-04-07 18:16 ` John Snow

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=1428414139.25243.1.camel@profitbricks.com \
    --to=paulo.vital@profitbricks.com \
    --cc=erik.rull@rdsoftware.de \
    --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).