Skip to contentSkip to conversation

Add very verbose output to xcsdump

PATCH New Anthony Liguori 1 participant 1 message Feb 22, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add very verbose output to xcsdump

I've had this code lying around in various forms for VM-Tools. This patch will cause xcsdump to display more verbose information about the xcs traffic.

This includes human-readable names of the message type and subtype and all of the parameters and their values. It's against today's xen-unstable and has been tested against a number of xen-unstable snapshots going back a few weeks (one line has to be removed to support older versions of xen-unstable).

The message types displayed are configurable via a bitmask passed as a '-v' option in xcsdump.

The code is very useful for figuring out what management tools (Xend, VM-Tools) are actually doing. I would not have been able to write vm-tools without it.

Regards,
Anthony Liguori

tools/xcs/Makefile +3 -3
diff -urN xen-unstable-orig/tools/xcs/Makefile xen-unstable/tools/xcs/Makefile
@@ -31,11 +31,11 @@
 all: $(BIN) xcsdump
 
 clean:
-	$(RM) *.a *.so *.o *.rpm $(BIN) ctrl_dump
+	$(RM) *.a *.so *.o *.rpm $(BIN) xcsdump
 
-xcsdump: xcsdump.c
+xcsdump: xcsdump.c dump.c
 	$(CC) $(CFLAGS) -o xcsdump xcsdump.c -L$(XEN_LIBXC) -L$(XEN_LIBXUTIL) \
-              ctrl_interface.c evtchn.c  -lxc -lxutil
+              ctrl_interface.c evtchn.c dump.c -lxc -lxutil
 
 $(BIN): $(OBJS)
 	$(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_LIBXUTIL) -lxc -lxutil 
tools/xcs/dump.c +526 -0

526 lines not on this page · raw message

tools/xcs/dump.h +28 -0
diff -urN xen-unstable-orig/tools/xcs/dump.h xen-unstable/tools/xcs/dump.h
@@ -0,0 +1,28 @@
+/*\
+ *  Copyright (C) International Business Machines  Corp., 2005
+ *  Author(s): Anthony Liguori <[email protected]>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; under version 2 of the License.
+ * 
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ * 
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+\*/
+
+#ifndef XENCTLD_ERROR_H
+#define XENCTLD_ERROR_H
+
+#include <stdint.h>
+#include <xc.h>
+#include <xen/io/domain_controller.h>
+
+void dump_msg(const control_msg_t *msg, uint64_t flags);
+
+#endif
tools/xcs/xcsdump.c +53 -28

115 lines not on this page · raw message