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) ->
try
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 true run