Mailing List Archive

xeninfo utility
Hi,

I've been trying to extract per-Xen statistics out of the hypervisor for some
monitoring and I've found there's "almost" enough stuff to do it but it
doesn't seem to be exported via any command line interface.

So a little hacking of xentop has produced a local tool I've called "xeninfo",
which does something like this:

[root@hosting-2 xeninfo]# ./xeninfo katie
vbd-5-2050 is VBD.
vbd-5-2049 is VBD.
vbd-4-2050 is VBD.
vbd-4-2049 is VBD.
vbd-3-2050 is VBD.
vbd-3-2049 is VBD.
domain.id = 4
domain.name = katie
vcpu.0.status = online
vcpu.0.time = 804.469943
vbd.2050.dev = 8.2
vbd.2050.read = 65
vbd.2050.write = 0
vbd.2050.oo = 0
vbd.2049.dev = 8.1
vbd.2049.read = 7943
vbd.2049.write = 136105
vbd.2049.oo = 0
net.0.rx.bytes = 67232129
net.0.rx.packets = 834738
net.0.rx.errors = 0
net.0.rx.drops = 0
net.0.tx.bytes = 23693854
net.0.tx.packets = 168056
net.0.tx.errors = 0
net.0.tx.drops = 0
[root@hosting-2 xeninfo]#

I'm planning on extending it to include the rest of the libxenstat data -
current domain state, max/current memory reservation.

The plan is to call this from munin to graph various per-Xen VM statistics over
the current plugins' method of running xentop and extracting the info from it.
This uses libxenstat and some of the xentop code. Its also much faster at
extracting data for a VM for other scripts then trying to use xentop.

Do people view this as a potentially useful command to have in the Xen command
line repotoire? (Minus the "xxxxx is VBD" bits from the library itself..)



Adrian


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: xeninfo utility [ In reply to ]
On Thu, May 03, 2007, Adrian Chadd wrote:
> Hi,
>
> I've been trying to extract per-Xen statistics out of the hypervisor for some
> monitoring and I've found there's "almost" enough stuff to do it but it
> doesn't seem to be exported via any command line interface.
>
> So a little hacking of xentop has produced a local tool I've called "xeninfo",
> which does something like this:

The tool can be found here:

http://www.creative.net.au/diffs/xeninfo.c

I've added the rest of the libxenstat statistics as well as the "node" statistics.

Please consider it for inclusion under the xenstat directory. I can provide
a Makefile and manpage if required.

[root@hosting-1 adrian]# ./xeninfo
node.version = 3.0-unstable
node.total_memory = 2130243584
node.free_memory = 15093760
node.num_domains = 14
node.num_cpus = 1
node.cpu_hz = 1908992000

[root@hosting-1 adrian]# ./xeninfo skywalker
mem.current = 134033408
mem.max = 134217728
domain.ssid = 0
domain.id = 93
domain.name = skywalker
status.dying = 0
status.crashed = 0
status.shutdown = 0
status.paused = 0
status.blocked = 1
status.running = 0
vcpu.0.status = online
vcpu.0.time = 12892.770551
vbd.2050.dev = 8.2
vbd.2050.read = 194123
vbd.2050.write = 443082
vbd.2050.oo = 13077
vbd.2049.dev = 8.1
vbd.2049.read = 1889251
vbd.2049.write = 2444320
vbd.2049.oo = 67150
net.0.rx.bytes = 281708267
net.0.rx.packets = 2894917
net.0.rx.errors = 0
net.0.rx.drops = 4762
net.0.tx.bytes = 1868341991
net.0.tx.packets = 2097722
net.0.tx.errors = 0
net.0.tx.drops = 0
[root@hosting-1 adrian]#



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel