1 (* Memory info for virtual domains.
2 (C) Copyright 2008 Richard W.M. Jones, Red Hat Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 open Virt_mem_gettext.Gettext
27 virt-dmesg - dmesg command for virtual machines
30 virt-dmesg [-options] [domains]
33 virt-dmesg prints the kernel messages for virtual machines running
34 under libvirt. The output is similar to the ordinary dmesg command
35 run inside the virtual machine."
37 let verbose, images = Virt_mem.start usage
41 fun (name, arch, mem, lookup_ksym) ->
43 (* I don't know why but this symbol doesn't exist in 2.6.9
44 * even in kallsyms. Hence this won't work with that kernel.
45 * It's possible we can fall back to memory scanning. XXX
47 let log_buf = lookup_ksym "log_buf" in
48 let log_buf_len = lookup_ksym "log_buf_len" in
49 let log_start = lookup_ksym "log_start" in
50 let log_end = lookup_ksym "log_end" in
51 let con_start = lookup_ksym "con_start" in
57 eprintf (f_"%s: could not find kernel log buffer in kernel image\n")