Patchwork [RFC,3/5] query-trace-file

login
register
mail settings
Submitter Prerna Saxena
Date Oct. 21, 2010, 9:39 a.m.
Message ID <20101021150911.6ffa0788@zephyr>
Download mbox | patch
Permalink /patch/68561/
State New
Headers show

Comments

Prerna Saxena - Oct. 21, 2010, 9:39 a.m.
'query-trace-file' : QMP interface to find currently set trace file and 
its status.
(Analogous to hmp command : trace-file)

Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
---
 qmp-commands.hx |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

Patch

diff --git a/qmp-commands.hx b/qmp-commands.hx
index e079eef..7e95f4e 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -1622,3 +1622,27 @@  Example:
    }
 
 EQMP
+
+SQMP
+query-trace-file
+----------------
+
+Display the trace file name to which trace data is currently logged, and its
+status.
+
+Returns a json-object containing the following data:
+
+- "trace-file": Name + path of Trace-file (json-string)
+- "enabled": State of trace-event (json-bool)
+
+Example:
+
+-> { "execute": "query-trace-file" }
+<- {
+      "return":{
+         "trace-file": "/tmp/trace-26609",
+         "enabled": true
+      }
+   }
+
+EQMP