open Virt_mem_utils
open Virt_mem_mmap
-let usage = s_"NAME
- virt-dmesg - dmesg command for virtual machines
-
-SUMMARY
- virt-dmesg [-options] [domains]
-
-DESCRIPTION
- virt-dmesg prints the kernel messages for virtual machines running
- under libvirt. The output is similar to the ordinary dmesg command
- run inside the virtual machine."
-
-let verbose, images = Virt_mem.start usage
-
-let () =
+let run debug images =
List.iter (
- fun (name, arch, mem, lookup_ksym) ->
+ fun (_, name, arch, mem, lookup_ksym) ->
try
(* I don't know why but this symbol doesn't exist in 2.6.9
* even in kallsyms. Hence this won't work with that kernel.
eprintf (f_"%s: could not find kernel log buffer in kernel image\n")
name
) images
+
+let summary = s_"display kernel messages"
+let description = s_"\
+virt-dmesg prints the kernel messages for virtual machines running
+under libvirt. The output is similar to the ordinary dmesg command
+run inside the virtual machine."
+
+let () = Virt_mem.register "dmesg" summary description ~run