aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xcutils
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2013-02-15 13:32:13 +0000
committerOlaf Hering <olaf@aepfle.de>2013-02-15 13:32:13 +0000
commite6c9172170e03c7af5016aed8fd44033c8e54164 (patch)
tree1ebeda62190ed65e935fb9332a2e5adc05677e4f /tools/xcutils
parent99bbf645d9672f2268cd78bbecdfafacc98149a0 (diff)
downloadxen-e6c9172170e03c7af5016aed8fd44033c8e54164.tar.gz
xen-e6c9172170e03c7af5016aed8fd44033c8e54164.tar.bz2
xen-e6c9172170e03c7af5016aed8fd44033c8e54164.zip
tools/xc: log pid in xc_save/xc_restore output
If several migrations log their output to xend.log its not clear which line belongs to a which guest. Print entry/exit of xc_save and xc_restore and also request to print pid with each log call. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/xcutils')
-rw-r--r--tools/xcutils/xc_restore.c9
-rw-r--r--tools/xcutils/xc_save.c2
2 files changed, 8 insertions, 3 deletions
diff --git a/tools/xcutils/xc_restore.c b/tools/xcutils/xc_restore.c
index 0235579622..35d725c6cb 100644
--- a/tools/xcutils/xc_restore.c
+++ b/tools/xcutils/xc_restore.c
@@ -19,17 +19,22 @@ int
main(int argc, char **argv)
{
unsigned int domid, store_evtchn, console_evtchn;
- unsigned int hvm, pae, apic;
+ unsigned int hvm, pae, apic, lflags;
xc_interface *xch;
int io_fd, ret;
int superpages;
unsigned long store_mfn, console_mfn;
+ xentoollog_level lvl;
+ xentoollog_logger *l;
if ( (argc != 8) && (argc != 9) )
errx(1, "usage: %s iofd domid store_evtchn "
"console_evtchn hvm pae apic [superpages]", argv[0]);
- xch = xc_interface_open(0,0,0);
+ lvl = XTL_DETAIL;
+ lflags = XTL_STDIOSTREAM_SHOW_PID | XTL_STDIOSTREAM_HIDE_PROGRESS;
+ l = (xentoollog_logger *)xtl_createlogger_stdiostream(stderr, lvl, lflags);
+ xch = xc_interface_open(l, 0, 0);
if ( !xch )
errx(1, "failed to open control interface");
diff --git a/tools/xcutils/xc_save.c b/tools/xcutils/xc_save.c
index 0131f2a257..e34bd2c854 100644
--- a/tools/xcutils/xc_save.c
+++ b/tools/xcutils/xc_save.c
@@ -184,7 +184,7 @@ main(int argc, char **argv)
si.suspend_evtchn = -1;
lvl = si.flags & XCFLAGS_DEBUG ? XTL_DEBUG: XTL_DETAIL;
- lflags = XTL_STDIOSTREAM_HIDE_PROGRESS;
+ lflags = XTL_STDIOSTREAM_SHOW_PID | XTL_STDIOSTREAM_HIDE_PROGRESS;
l = (xentoollog_logger *)xtl_createlogger_stdiostream(stderr, lvl, lflags);
si.xch = xc_interface_open(l, 0, 0);
if (!si.xch)