lib/virt_mem_mmap.ml
lib/virt_mem_mmap.mli
lib/virt_mem_mmap_c.c
+lib/virt_mem_tasks.ml
+lib/virt_mem_tasks.mli
lib/virt_mem_types.ml
lib/virt_mem_types.mli
lib/virt_mem_utils.ml
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(virt-mem,0.2.8)
+AC_INIT(virt-mem,0.2.9)
AC_PROG_INSTALL
AC_PROG_MKDIR_P
open Virt_mem_types
open Virt_mem_mmap
-let run debug ({ domname = domname; mem = mem }, ksymmap, _) =
+let run debug { domname = domname; mem = mem } { ksyms = ksyms } =
+ let ksyms = Option.get ksyms in
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.
* It's possible we can fall back to memory scanning. XXX
*)
- let log_buf = Ksymmap.find "log_buf" ksymmap in
+ let log_buf = Ksymmap.find "log_buf" ksyms in
let log_buf = follow_pointer mem log_buf in
- let log_buf_len = Ksymmap.find "log_buf_len" ksymmap in
+ let log_buf_len = Ksymmap.find "log_buf_len" ksyms in
let log_buf_len = Int64.of_int32 (get_C_int mem log_buf_len) in
- (* let log_start = Ksymmap.find "log_start" ksymmap in
+ (* let log_start = Ksymmap.find "log_start" ksyms in
let log_start = get_C_long mem log_start in *)
- let log_end = Ksymmap.find "log_end" ksymmap in
+ let log_end = Ksymmap.find "log_end" ksyms in
let log_end = get_C_long mem log_end in
- (* let con_start = Ksymmap.find "con_start" ksymmap in
+ (* let con_start = Ksymmap.find "con_start" ksyms in
let con_start = get_C_long mem con_start in *)
- let logged_chars = Ksymmap.find "logged_chars" ksymmap in
+ let logged_chars = Ksymmap.find "logged_chars" ksyms in
let logged_chars = get_C_long mem logged_chars in
(* This is basically the same algorithm from printk.c:do_syslog
under libvirt. The output is similar to the ordinary dmesg command
run inside the virtual machine."
-let () = Virt_mem.register "dmesg" summary description ~run
+let () = Virt_mem.register "dmesg" summary description ~needs_ksyms:true ~run
--- /dev/null
+Source: fedora-koji
+Distribution: Fedora
+RPM_id: 105457
+RPM_build_id: 9647
+Name: kernel-PAE-debuginfo
+Version: 2.6.21
+Release: 1.3238.fc8
+Architecture: i686
+RPM_size: 182562947
+
+Name : kernel-PAE-debuginfo Relocations: (not relocatable)
+Version : 2.6.21 Vendor: Fedora Project
+Release : 1.3238.fc8 Build Date: Mon 25 Jun 2007 10:17:36 AM BST
+Install Date: (not installed) Build Host: xenbuilder2.fedora.redhat.com
+Group : Development/Debug Source RPM: kernel-2.6.21-1.3238.fc8.src.rpm
+Size : 449098361 License: GPLv2
+Signature : (none)
+Packager : Fedora Project
+Summary : Debug information for package kernel-PAE
+Description :
+This package provides debug information for package kernel-PAE
+This is required to use SystemTap with kernel-PAE-2.6.21-1.3238.fc8.
--- /dev/null
+Source: fedora-koji
+Distribution: Fedora
+RPM_id: 105460
+RPM_build_id: 9647
+Name: kernel-debuginfo
+Version: 2.6.21
+Release: 1.3238.fc8
+Architecture: i686
+RPM_size: 182569999
+
+Name : kernel-debuginfo Relocations: (not relocatable)
+Version : 2.6.21 Vendor: Fedora Project
+Release : 1.3238.fc8 Build Date: Mon 25 Jun 2007 10:17:36 AM BST
+Install Date: (not installed) Build Host: xenbuilder2.fedora.redhat.com
+Group : Development/Debug Source RPM: kernel-2.6.21-1.3238.fc8.src.rpm
+Size : 449108985 License: GPLv2
+Signature : (none)
+Packager : Fedora Project
+Summary : Debug information for package kernel
+Description :
+This package provides debug information for package kernel
+This is required to use SystemTap with kernel-2.6.21-1.3238.fc8.
--- /dev/null
+Source: fedora-koji
+Distribution: Fedora
+RPM_id: 105452
+RPM_build_id: 9647
+Name: kernel-debuginfo
+Version: 2.6.21
+Release: 1.3238.fc8
+Architecture: ppc64
+RPM_size: 272780528
+
+Name : kernel-debuginfo Relocations: (not relocatable)
+Version : 2.6.21 Vendor: Fedora Project
+Release : 1.3238.fc8 Build Date: Mon 25 Jun 2007 11:05:41 AM BST
+Install Date: (not installed) Build Host: ppc3.fedora.redhat.com
+Group : Development/Debug Source RPM: kernel-2.6.21-1.3238.fc8.src.rpm
+Size : 757240459 License: GPLv2
+Signature : (none)
+Packager : Fedora Project
+Summary : Debug information for package kernel
+Description :
+This package provides debug information for package kernel
+This is required to use SystemTap with kernel-2.6.21-1.3238.fc8.
--- /dev/null
+Source: fedora-koji
+Distribution: Fedora
+RPM_id: 105445
+RPM_build_id: 9647
+Name: kernel-debuginfo
+Version: 2.6.21
+Release: 1.3238.fc8
+Architecture: x86_64
+RPM_size: 173533397
+
+Name : kernel-debuginfo Relocations: (not relocatable)
+Version : 2.6.21 Vendor: Fedora Project
+Release : 1.3238.fc8 Build Date: Mon 25 Jun 2007 10:08:30 AM BST
+Install Date: (not installed) Build Host: xenbuilder4.fedora.phx.redhat.com
+Group : Development/Debug Source RPM: kernel-2.6.21-1.3238.fc8.src.rpm
+Size : 581586149 License: GPLv2
+Signature : (none)
+Packager : Fedora Project
+Summary : Debug information for package kernel
+Description :
+This package provides debug information for package kernel
+This is required to use SystemTap with kernel-2.6.21-1.3238.fc8.
--- /dev/null
+Source: fedora-koji
+Distribution: Fedora
+RPM_id: 109595
+RPM_build_id: 10009
+Name: kernel-debuginfo
+Version: 2.6.21
+Release: 1.3242.fc8
+Architecture: i686
+RPM_size: 186517302
+
+Name : kernel-debuginfo Relocations: (not relocatable)
+Version : 2.6.21 Vendor: Fedora Project
+Release : 1.3242.fc8 Build Date: Fri 29 Jun 2007 09:00:49 AM BST
+Install Date: (not installed) Build Host: xenbuilder4.fedora.phx.redhat.com
+Group : Development/Debug Source RPM: kernel-2.6.21-1.3242.fc8.src.rpm
+Size : 456730743 License: GPLv2
+Signature : (none)
+Packager : Fedora Project
+Summary : Debug information for package kernel
+Description :
+This package provides debug information for package kernel
+This is required to use SystemTap with kernel-2.6.21-1.3242.fc8.
--- /dev/null
+Source: fedora-koji
+Distribution: Fedora
+RPM_id: 109574
+RPM_build_id: 10009
+Name: kernel-debuginfo
+Version: 2.6.21
+Release: 1.3242.fc8
+Architecture: ppc
+RPM_size: 237234683
+
+Name : kernel-debuginfo Relocations: (not relocatable)
+Version : 2.6.21 Vendor: Fedora Project
+Release : 1.3242.fc8 Build Date: Fri 29 Jun 2007 09:13:44 AM BST
+Install Date: (not installed) Build Host: ppc3.fedora.redhat.com
+Group : Development/Debug Source RPM: kernel-2.6.21-1.3242.fc8.src.rpm
+Size : 513594011 License: GPLv2
+Signature : (none)
+Packager : Fedora Project
+Summary : Debug information for package kernel
+Description :
+This package provides debug information for package kernel
+This is required to use SystemTap with kernel-2.6.21-1.3242.fc8.
--- /dev/null
+Source: fedora-koji
+Distribution: Fedora
+RPM_id: 109589
+RPM_build_id: 10009
+Name: kernel-debuginfo
+Version: 2.6.21
+Release: 1.3242.fc8
+Architecture: ppc64
+RPM_size: 279501916
+
+Name : kernel-debuginfo Relocations: (not relocatable)
+Version : 2.6.21 Vendor: Fedora Project
+Release : 1.3242.fc8 Build Date: Fri 29 Jun 2007 09:39:40 AM BST
+Install Date: (not installed) Build Host: ppc1.fedora.redhat.com
+Group : Development/Debug Source RPM: kernel-2.6.21-1.3242.fc8.src.rpm
+Size : 771726295 License: GPLv2
+Signature : (none)
+Packager : Fedora Project
+Summary : Debug information for package kernel
+Description :
+This package provides debug information for package kernel
+This is required to use SystemTap with kernel-2.6.21-1.3242.fc8.
--- /dev/null
+Source: fedora-koji
+Distribution: Fedora
+RPM_id: 109582
+RPM_build_id: 10009
+Name: kernel-debuginfo
+Version: 2.6.21
+Release: 1.3242.fc8
+Architecture: x86_64
+RPM_size: 177077055
+
+Name : kernel-debuginfo Relocations: (not relocatable)
+Version : 2.6.21 Vendor: Fedora Project
+Release : 1.3242.fc8 Build Date: Fri 29 Jun 2007 08:27:41 AM BST
+Install Date: (not installed) Build Host: xenbuilder2.fedora.redhat.com
+Group : Development/Debug Source RPM: kernel-2.6.21-1.3242.fc8.src.rpm
+Size : 593405944 License: GPLv2
+Signature : (none)
+Packager : Fedora Project
+Summary : Debug information for package kernel
+Description :
+This package provides debug information for package kernel
+This is required to use SystemTap with kernel-2.6.21-1.3242.fc8.
--- /dev/null
+Source: fedora-koji
+Distribution: Fedora
+RPM_id: 105451
+RPM_build_id: 9647
+Name: kernel-kdump-debuginfo
+Version: 2.6.21
+Release: 1.3238.fc8
+Architecture: ppc64
+RPM_size: 272892952
+
+Name : kernel-kdump-debuginfo Relocations: (not relocatable)
+Version : 2.6.21 Vendor: Fedora Project
+Release : 1.3238.fc8 Build Date: Mon 25 Jun 2007 11:05:41 AM BST
+Install Date: (not installed) Build Host: ppc3.fedora.redhat.com
+Group : Development/Debug Source RPM: kernel-2.6.21-1.3238.fc8.src.rpm
+Size : 757406610 License: GPLv2
+Signature : (none)
+Packager : Fedora Project
+Summary : Debug information for package kernel-kdump
+Description :
+This package provides debug information for package kernel-kdump
+This is required to use SystemTap with kernel-kdump-2.6.21-1.3238.fc8.
--- /dev/null
+Source: fedora-koji
+Distribution: Fedora
+RPM_id: 109590
+RPM_build_id: 10009
+Name: kernel-kdump-debuginfo
+Version: 2.6.21
+Release: 1.3242.fc8
+Architecture: ppc64
+RPM_size: 279633676
+
+Name : kernel-kdump-debuginfo Relocations: (not relocatable)
+Version : 2.6.21 Vendor: Fedora Project
+Release : 1.3242.fc8 Build Date: Fri 29 Jun 2007 09:39:40 AM BST
+Install Date: (not installed) Build Host: ppc1.fedora.redhat.com
+Group : Development/Debug Source RPM: kernel-2.6.21-1.3242.fc8.src.rpm
+Size : 771891558 License: GPLv2
+Signature : (none)
+Packager : Fedora Project
+Summary : Debug information for package kernel-kdump
+Description :
+This package provides debug information for package kernel-kdump
+This is required to use SystemTap with kernel-kdump-2.6.21-1.3242.fc8.
--- /dev/null
+Source: fedora-koji
+Distribution: Fedora
+RPM_id: 105440
+RPM_build_id: 9647
+Name: kernel-smp-debuginfo
+Version: 2.6.21
+Release: 1.3238.fc8
+Architecture: ppc
+RPM_size: 234365560
+
+Name : kernel-smp-debuginfo Relocations: (not relocatable)
+Version : 2.6.21 Vendor: Fedora Project
+Release : 1.3238.fc8 Build Date: Mon 25 Jun 2007 10:55:06 AM BST
+Install Date: (not installed) Build Host: ppc2.fedora.redhat.com
+Group : Development/Debug Source RPM: kernel-2.6.21-1.3238.fc8.src.rpm
+Size : 508528702 License: GPLv2
+Signature : (none)
+Packager : Fedora Project
+Summary : Debug information for package kernel-smp
+Description :
+This package provides debug information for package kernel-smp
+This is required to use SystemTap with kernel-smp-2.6.21-1.3238.fc8.
--- /dev/null
+Source: fedora-koji
+Distribution: Fedora
+RPM_id: 109572
+RPM_build_id: 10009
+Name: kernel-smp-debuginfo
+Version: 2.6.21
+Release: 1.3242.fc8
+Architecture: ppc
+RPM_size: 239118926
+
+Name : kernel-smp-debuginfo Relocations: (not relocatable)
+Version : 2.6.21 Vendor: Fedora Project
+Release : 1.3242.fc8 Build Date: Fri 29 Jun 2007 09:13:44 AM BST
+Install Date: (not installed) Build Host: ppc3.fedora.redhat.com
+Group : Development/Debug Source RPM: kernel-2.6.21-1.3242.fc8.src.rpm
+Size : 517762641 License: GPLv2
+Signature : (none)
+Packager : Fedora Project
+Summary : Debug information for package kernel-smp
+Description :
+This package provides debug information for package kernel-smp
+This is required to use SystemTap with kernel-smp-2.6.21-1.3242.fc8.
virt_mem_ksyms.cmi: virt_mem_types.cmi
virt_mem.cmi: virt_mem_types.cmi
virt_mem_mmap.cmi: virt_mem_utils.cmo
+virt_mem_tasks.cmi: virt_mem_types.cmi virt_mem_mmap.cmi
virt_mem_types.cmi: virt_mem_utils.cmo virt_mem_mmap.cmi
virt_mem_utsname.cmi: virt_mem_types.cmi
kernel_net_device.cmo: virt_mem_mmap.cmi kernel_net_device.cmi
virt_mem_ksyms.cmx: virt_mem_utils.cmx virt_mem_types.cmx virt_mem_mmap.cmx \
virt_mem_gettext.cmx virt_mem_ksyms.cmi
virt_mem.cmo: virt_mem_version.cmo virt_mem_utsname.cmi virt_mem_utils.cmo \
- virt_mem_types.cmi virt_mem_mmap.cmi virt_mem_ksyms.cmi \
- virt_mem_kallsyms.cmi virt_mem_gettext.cmo virt_mem.cmi
+ virt_mem_types.cmi virt_mem_tasks.cmi virt_mem_mmap.cmi \
+ virt_mem_ksyms.cmi virt_mem_kallsyms.cmi virt_mem_gettext.cmo \
+ virt_mem.cmi
virt_mem.cmx: virt_mem_version.cmx virt_mem_utsname.cmx virt_mem_utils.cmx \
- virt_mem_types.cmx virt_mem_mmap.cmx virt_mem_ksyms.cmx \
- virt_mem_kallsyms.cmx virt_mem_gettext.cmx virt_mem.cmi
+ virt_mem_types.cmx virt_mem_tasks.cmx virt_mem_mmap.cmx \
+ virt_mem_ksyms.cmx virt_mem_kallsyms.cmx virt_mem_gettext.cmx \
+ virt_mem.cmi
virt_mem_mmap.cmo: virt_mem_utils.cmo virt_mem_mmap.cmi
virt_mem_mmap.cmx: virt_mem_utils.cmx virt_mem_mmap.cmi
+virt_mem_tasks.cmo: virt_mem_utils.cmo virt_mem_types.cmi virt_mem_mmap.cmi \
+ virt_mem_gettext.cmo kernel_task_struct.cmi virt_mem_tasks.cmi
+virt_mem_tasks.cmx: virt_mem_utils.cmx virt_mem_types.cmx virt_mem_mmap.cmx \
+ virt_mem_gettext.cmx kernel_task_struct.cmx virt_mem_tasks.cmi
virt_mem_types.cmo: virt_mem_utils.cmo virt_mem_mmap.cmi virt_mem_types.cmi
virt_mem_types.cmx: virt_mem_utils.cmx virt_mem_mmap.cmx virt_mem_types.cmi
virt_mem_utsname.cmo: virt_mem_utils.cmo virt_mem_types.cmi virt_mem_mmap.cmi \
virt_mem_ksyms.cmo \
virt_mem_kallsyms.cmo \
virt_mem_utsname.cmo \
+ virt_mem_tasks.cmo \
virt_mem.cmo \
virt_mem_capture.cmo
XOBJS = $(OBJS:%.cmo=%.cmx)
let map = StringMap.add "2.6.21-1.3218.fc8.i586" v map;;
let v = (parser_4, 2316);;
let map = StringMap.add "2.6.22-0.23.rc7.git6.fc8.x86_64" v map;;
+let v = (parser_5, 2044);;
+let map = StringMap.add "2.6.21-1.3242.fc8.ppc64" v map;;
let v = (parser_6, 1924);;
let map = StringMap.add "2.6.21-1.3144.fc7.ppc64" v map;;
let v = (parser_2, 1092);;
let map = StringMap.add "2.6.21-1.3132.fc7.ppc64" v map;;
let v = (parser_8, 2288);;
let map = StringMap.add "2.6.24-7.fc9.x86_64" v map;;
+let v = (parser_5, 2044);;
+let map = StringMap.add "2.6.21-1.3238.fc8.ppc64" v map;;
let v = (parser_1, 912);;
let map = StringMap.add "2.6.18-1.2798.fc6.i586" v map;;
let v = (parser_9, 1020);;
let map = StringMap.add "2.6.25.11-97.fc9.x86_64" v map;;
let v = (parser_10, 672);;
let map = StringMap.add "2.6.18-1.2798.fc6.i686" v map;;
+let v = (parser_2, 1116);;
+let map = StringMap.add "2.6.21-1.3242.fc8.ppc" v map;;
let v = (parser_11, 1244);;
let map = StringMap.add "2.6.24-9.fc9.i686" v map;;
let v = (parser_12, 1984);;
let map = StringMap.add "2.6.21-1.3228.fc7.ppc64" v map;;
let v = (parser_6, 1924);;
let map = StringMap.add "2.6.21-1.3128.fc7.ppc64" v map;;
+let v = (parser_5, 2044);;
+let map = StringMap.add "2.6.21-1.3238.fc8.ppc64" v map;;
let v = (parser_7, 1408);;
let map = StringMap.add "2.6.21-1.3209.fc8.i686" v map;;
let v = (parser_13, 2196);;
let map = StringMap.add "2.6.21-1.3132.fc7.ppc" v map;;
let v = (parser_9, 936);;
let map = StringMap.add "2.6.21-1.3228.fc7.ppc" v map;;
+let v = (parser_4, 2316);;
+let map = StringMap.add "2.6.21-1.3242.fc8.x86_64" v map;;
let v = (parser_12, 1984);;
let map = StringMap.add "2.6.24-9.fc9.ppc64" v map;;
let v = (parser_5, 2044);;
let map = StringMap.add "2.6.21-1.3209.fc8.ppc" v map;;
let v = (parser_13, 1260);;
let map = StringMap.add "2.6.20-1.2933.fc6.x86_64" v map;;
+let v = (parser_2, 1092);;
+let map = StringMap.add "2.6.21-1.3242.fc8.ppc" v map;;
let v = (parser_1, 1284);;
let map = StringMap.add "2.6.21-1.3132.fc7.i586" v map;;
let v = (parser_1, 1284);;
let map = StringMap.add "2.6.21-1.3228.fc7.x86_64" v map;;
let v = (parser_6, 1260);;
let map = StringMap.add "2.6.18-1.2798.fc6.ppc64iseries" v map;;
+let v = (parser_7, 1408);;
+let map = StringMap.add "2.6.21-1.3238.fc8.i686" v map;;
let v = (parser_11, 1244);;
let map = StringMap.add "2.6.24-7.fc9.i586" v map;;
let v = (parser_15, 668);;
let map = StringMap.add "2.6.20-1.2933.fc6.ppc" v map;;
+let v = (parser_5, 2044);;
+let map = StringMap.add "2.6.21-1.3242.fc8.ppc64" v map;;
let v = (parser_7, 1408);;
let map = StringMap.add "2.6.21-1.3218.fc8.i686" v map;;
let v = (parser_1, 1284);;
let map = StringMap.add "2.6.20-1.2933.fc6.x86_64" v map;;
let v = (parser_2, 1116);;
let map = StringMap.add "2.6.21-1.3234.fc8.ppc" v map;;
+let v = (parser_4, 2316);;
+let map = StringMap.add "2.6.21-1.3238.fc8.x86_64" v map;;
let v = (parser_13, 1260);;
let map = StringMap.add "2.6.20-1.2933.fc6.x86_64" v map;;
let v = (parser_13, 1260);;
let map = StringMap.add "2.6.18-1.2798.fc6.x86_64" v map;;
let v = (parser_11, 1244);;
let map = StringMap.add "2.6.24-7.fc9.i686" v map;;
+let v = (parser_2, 1116);;
+let map = StringMap.add "2.6.21-1.3238.fc8.ppc" v map;;
let v = (parser_3, 2124);;
let map = StringMap.add "2.6.21-1.3144.fc7.x86_64" v map;;
let v = (parser_9, 688);;
let map = StringMap.add "2.6.18-1.2798.fc6.ppc64" v map;;
let v = (parser_1, 912);;
let map = StringMap.add "2.6.18-1.2798.fc6.i686" v map;;
+let v = (parser_7, 1408);;
+let map = StringMap.add "2.6.21-1.3238.fc8.i686" v map;;
let v = (parser_9, 836);;
let map = StringMap.add "2.6.21-1.3228.fc7.ppc" v map;;
let v = (parser_7, 1408);;
let map = StringMap.add "2.6.20-1.2933.fc6.ppc64" v map;;
let v = (parser_14, 1048);;
let map = StringMap.add "2.6.24-9.fc9.ppc" v map;;
+let v = (parser_7, 1408);;
+let map = StringMap.add "2.6.21-1.3242.fc8.i686" v map;;
let v = (parser_6, 1924);;
let map = StringMap.add "2.6.21-1.3128.fc7.ppc64" v map;;
let v = (parser_14, 1072);;
task_struct_comm = task_struct_comm }
| { _ } -> raise (ParseError ("task_struct", "parser_9", "failed to match kernel structure"));;
let parser_10 bits = bitmatch bits with
+ | { task_struct_state : zero+64 : offset(0), bigendian;
+ task_struct_prio : zero+32 : offset(224), bigendian;
+ task_struct_static_prio : zero+32 : offset(256), bigendian;
+ task_struct_normal_prio : zero+32 : offset(288), bigendian;
+ task_struct_tasks'next : zero+64 : offset(2816), bigendian;
+ task_struct_tasks'prev : zero+64 : offset(2880), bigendian;
+ task_struct_mm : zero+64 : offset(2944), bigendian;
+ task_struct_active_mm : zero+64 : offset(3008), bigendian;
+ task_struct_pid : zero+32 : offset(3328), bigendian;
+ task_struct_comm : 128 : offset(6528), string } -> { task_struct_state = task_struct_state;
+ task_struct_prio = task_struct_prio;
+ task_struct_static_prio = task_struct_static_prio;
+ task_struct_normal_prio = task_struct_normal_prio;
+ task_struct_tasks'next = Int64.sub task_struct_tasks'next 352L;
+ task_struct_tasks'prev = Int64.sub task_struct_tasks'prev 360L;
+ task_struct_mm = task_struct_mm;
+ task_struct_active_mm = task_struct_active_mm;
+ task_struct_pid = task_struct_pid;
+ task_struct_comm = task_struct_comm }
+ | { _ } -> raise (ParseError ("task_struct", "parser_10", "failed to match kernel structure"));;
+let parser_11 bits = bitmatch bits with
| { task_struct_state : zero+32 : offset(0), bigendian;
task_struct_prio : zero+32 : offset(192), bigendian;
task_struct_static_prio : zero+32 : offset(224), bigendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_10", "failed to match kernel structure"));;
-let parser_11 bits = bitmatch bits with
+ | { _ } -> raise (ParseError ("task_struct", "parser_11", "failed to match kernel structure"));;
+let parser_12 bits = bitmatch bits with
| { task_struct_state : zero+64 : offset(0), bigendian;
task_struct_prio : zero+32 : offset(224), bigendian;
task_struct_static_prio : zero+32 : offset(256), bigendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_11", "failed to match kernel structure"));;
-let parser_12 bits = bitmatch bits with
+ | { _ } -> raise (ParseError ("task_struct", "parser_12", "failed to match kernel structure"));;
+let parser_13 bits = bitmatch bits with
| { task_struct_state : zero+32 : offset(0), littleendian;
task_struct_prio : zero+32 : offset(192), littleendian;
task_struct_static_prio : zero+32 : offset(224), littleendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_12", "failed to match kernel structure"));;
-let parser_13 bits = bitmatch bits with
+ | { _ } -> raise (ParseError ("task_struct", "parser_13", "failed to match kernel structure"));;
+let parser_14 bits = bitmatch bits with
| { task_struct_state : zero+64 : offset(0), littleendian;
task_struct_prio : zero+32 : offset(224), littleendian;
task_struct_static_prio : zero+32 : offset(256), littleendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_13", "failed to match kernel structure"));;
-let parser_14 bits = bitmatch bits with
+ | { _ } -> raise (ParseError ("task_struct", "parser_14", "failed to match kernel structure"));;
+let parser_15 bits = bitmatch bits with
| { task_struct_state : zero+64 : offset(0), bigendian;
task_struct_prio : zero+32 : offset(256), bigendian;
task_struct_static_prio : zero+32 : offset(288), bigendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_14", "failed to match kernel structure"));;
-let parser_15 bits = bitmatch bits with
+ | { _ } -> raise (ParseError ("task_struct", "parser_15", "failed to match kernel structure"));;
+let parser_16 bits = bitmatch bits with
| { task_struct_state : zero+64 : offset(0), littleendian;
task_struct_prio : zero+32 : offset(224), littleendian;
task_struct_static_prio : zero+32 : offset(256), littleendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_15", "failed to match kernel structure"));;
-let parser_16 bits = bitmatch bits with
+ | { _ } -> raise (ParseError ("task_struct", "parser_16", "failed to match kernel structure"));;
+let parser_17 bits = bitmatch bits with
+ | { task_struct_state : zero+32 : offset(0), bigendian;
+ task_struct_prio : zero+32 : offset(160), bigendian;
+ task_struct_static_prio : zero+32 : offset(192), bigendian;
+ task_struct_normal_prio : zero+32 : offset(224), bigendian;
+ task_struct_tasks'next : zero+32 : offset(2240), bigendian;
+ task_struct_tasks'prev : zero+32 : offset(2272), bigendian;
+ task_struct_mm : zero+32 : offset(2304), bigendian;
+ task_struct_active_mm : zero+32 : offset(2336), bigendian;
+ task_struct_pid : zero+32 : offset(2592), bigendian;
+ task_struct_comm : 128 : offset(4480), string } -> { task_struct_state = task_struct_state;
+ task_struct_prio = task_struct_prio;
+ task_struct_static_prio = task_struct_static_prio;
+ task_struct_normal_prio = task_struct_normal_prio;
+ task_struct_tasks'next = Int64.sub task_struct_tasks'next 280L;
+ task_struct_tasks'prev = Int64.sub task_struct_tasks'prev 284L;
+ task_struct_mm = task_struct_mm;
+ task_struct_active_mm = task_struct_active_mm;
+ task_struct_pid = task_struct_pid;
+ task_struct_comm = task_struct_comm }
+ | { _ } -> raise (ParseError ("task_struct", "parser_17", "failed to match kernel structure"));;
+let parser_18 bits = bitmatch bits with
| { task_struct_state : zero+32 : offset(0), littleendian;
task_struct_prio : zero+32 : offset(160), littleendian;
task_struct_static_prio : zero+32 : offset(192), littleendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_16", "failed to match kernel structure"));;
-let parser_17 bits = bitmatch bits with
+ | { _ } -> raise (ParseError ("task_struct", "parser_18", "failed to match kernel structure"));;
+let parser_19 bits = bitmatch bits with
| { task_struct_state : zero+64 : offset(0), bigendian;
task_struct_prio : zero+32 : offset(224), bigendian;
task_struct_static_prio : zero+32 : offset(256), bigendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_17", "failed to match kernel structure"));;
-let parser_18 bits = bitmatch bits with
+ | { _ } -> raise (ParseError ("task_struct", "parser_19", "failed to match kernel structure"));;
+let parser_20 bits = bitmatch bits with
| { task_struct_state : zero+32 : offset(0), littleendian;
task_struct_prio : zero+32 : offset(160), littleendian;
task_struct_static_prio : zero+32 : offset(192), littleendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_18", "failed to match kernel structure"));;
-let parser_19 bits = bitmatch bits with
+ | { _ } -> raise (ParseError ("task_struct", "parser_20", "failed to match kernel structure"));;
+let parser_21 bits = bitmatch bits with
| { task_struct_state : zero+64 : offset(0), bigendian;
task_struct_prio : zero+32 : offset(256), bigendian;
task_struct_static_prio : zero+32 : offset(288), bigendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_19", "failed to match kernel structure"));;
-let parser_20 bits = bitmatch bits with
+ | { _ } -> raise (ParseError ("task_struct", "parser_21", "failed to match kernel structure"));;
+let parser_22 bits = bitmatch bits with
| { task_struct_state : zero+32 : offset(0), bigendian;
task_struct_prio : zero+32 : offset(160), bigendian;
task_struct_static_prio : zero+32 : offset(192), bigendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_20", "failed to match kernel structure"));;
-let parser_21 bits = bitmatch bits with
+ | { _ } -> raise (ParseError ("task_struct", "parser_22", "failed to match kernel structure"));;
+let parser_23 bits = bitmatch bits with
| { task_struct_state : zero+32 : offset(0), littleendian;
task_struct_prio : zero+32 : offset(192), littleendian;
task_struct_static_prio : zero+32 : offset(224), littleendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_21", "failed to match kernel structure"));;
-let parser_22 bits = bitmatch bits with
+ | { _ } -> raise (ParseError ("task_struct", "parser_23", "failed to match kernel structure"));;
+let parser_24 bits = bitmatch bits with
| { task_struct_state : zero+64 : offset(0), littleendian;
task_struct_prio : zero+32 : offset(320), littleendian;
task_struct_static_prio : zero+32 : offset(352), littleendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_22", "failed to match kernel structure"));;
-let parser_23 bits = bitmatch bits with
+ | { _ } -> raise (ParseError ("task_struct", "parser_24", "failed to match kernel structure"));;
+let parser_25 bits = bitmatch bits with
+ | { task_struct_state : zero+64 : offset(0), littleendian;
+ task_struct_prio : zero+32 : offset(224), littleendian;
+ task_struct_static_prio : zero+32 : offset(256), littleendian;
+ task_struct_normal_prio : zero+32 : offset(288), littleendian;
+ task_struct_tasks'next : zero+64 : offset(2752), littleendian;
+ task_struct_tasks'prev : zero+64 : offset(2816), littleendian;
+ task_struct_mm : zero+64 : offset(2880), littleendian;
+ task_struct_active_mm : zero+64 : offset(2944), littleendian;
+ task_struct_pid : zero+32 : offset(3264), littleendian;
+ task_struct_comm : 128 : offset(6528), string } -> { task_struct_state = task_struct_state;
+ task_struct_prio = task_struct_prio;
+ task_struct_static_prio = task_struct_static_prio;
+ task_struct_normal_prio = task_struct_normal_prio;
+ task_struct_tasks'next = Int64.sub task_struct_tasks'next 344L;
+ task_struct_tasks'prev = Int64.sub task_struct_tasks'prev 352L;
+ task_struct_mm = task_struct_mm;
+ task_struct_active_mm = task_struct_active_mm;
+ task_struct_pid = task_struct_pid;
+ task_struct_comm = task_struct_comm }
+ | { _ } -> raise (ParseError ("task_struct", "parser_25", "failed to match kernel structure"));;
+let parser_26 bits = bitmatch bits with
+ | { task_struct_state : zero+32 : offset(0), littleendian;
+ task_struct_prio : zero+32 : offset(160), littleendian;
+ task_struct_static_prio : zero+32 : offset(192), littleendian;
+ task_struct_normal_prio : zero+32 : offset(224), littleendian;
+ task_struct_tasks'next : zero+32 : offset(2176), littleendian;
+ task_struct_tasks'prev : zero+32 : offset(2208), littleendian;
+ task_struct_mm : zero+32 : offset(2240), littleendian;
+ task_struct_active_mm : zero+32 : offset(2272), littleendian;
+ task_struct_pid : zero+32 : offset(2528), littleendian;
+ task_struct_comm : 128 : offset(4416), string } -> { task_struct_state = task_struct_state;
+ task_struct_prio = task_struct_prio;
+ task_struct_static_prio = task_struct_static_prio;
+ task_struct_normal_prio = task_struct_normal_prio;
+ task_struct_tasks'next = Int64.sub task_struct_tasks'next 272L;
+ task_struct_tasks'prev = Int64.sub task_struct_tasks'prev 276L;
+ task_struct_mm = task_struct_mm;
+ task_struct_active_mm = task_struct_active_mm;
+ task_struct_pid = task_struct_pid;
+ task_struct_comm = task_struct_comm }
+ | { _ } -> raise (ParseError ("task_struct", "parser_26", "failed to match kernel structure"));;
+let parser_27 bits = bitmatch bits with
| { task_struct_state : zero+64 : offset(0), littleendian;
task_struct_prio : zero+32 : offset(256), littleendian;
task_struct_static_prio : zero+32 : offset(288), littleendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_23", "failed to match kernel structure"));;
-let parser_24 bits = bitmatch bits with
+ | { _ } -> raise (ParseError ("task_struct", "parser_27", "failed to match kernel structure"));;
+let parser_28 bits = bitmatch bits with
| { task_struct_state : zero+32 : offset(0), bigendian;
task_struct_prio : zero+32 : offset(192), bigendian;
task_struct_static_prio : zero+32 : offset(224), bigendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_24", "failed to match kernel structure"));;
-let parser_25 bits = bitmatch bits with
+ | { _ } -> raise (ParseError ("task_struct", "parser_28", "failed to match kernel structure"));;
+let parser_29 bits = bitmatch bits with
| { task_struct_state : zero+32 : offset(0), littleendian;
task_struct_prio : zero+32 : offset(160), littleendian;
task_struct_static_prio : zero+32 : offset(192), littleendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_25", "failed to match kernel structure"));;
-let parser_26 bits = bitmatch bits with
- | { task_struct_state : zero+32 : offset(0), bigendian;
- task_struct_prio : zero+32 : offset(160), bigendian;
- task_struct_static_prio : zero+32 : offset(192), bigendian;
- task_struct_normal_prio : zero+32 : offset(224), bigendian;
- task_struct_tasks'next : zero+32 : offset(2240), bigendian;
- task_struct_tasks'prev : zero+32 : offset(2272), bigendian;
- task_struct_mm : zero+32 : offset(2304), bigendian;
- task_struct_active_mm : zero+32 : offset(2336), bigendian;
- task_struct_pid : zero+32 : offset(2592), bigendian;
- task_struct_comm : 128 : offset(4480), string } -> { task_struct_state = task_struct_state;
- task_struct_prio = task_struct_prio;
- task_struct_static_prio = task_struct_static_prio;
- task_struct_normal_prio = task_struct_normal_prio;
- task_struct_tasks'next = Int64.sub task_struct_tasks'next 280L;
- task_struct_tasks'prev = Int64.sub task_struct_tasks'prev 284L;
- task_struct_mm = task_struct_mm;
- task_struct_active_mm = task_struct_active_mm;
- task_struct_pid = task_struct_pid;
- task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_26", "failed to match kernel structure"));;
-let parser_27 bits = bitmatch bits with
+ | { _ } -> raise (ParseError ("task_struct", "parser_29", "failed to match kernel structure"));;
+let parser_30 bits = bitmatch bits with
| { task_struct_state : zero+64 : offset(0), littleendian;
task_struct_prio : zero+32 : offset(256), littleendian;
task_struct_static_prio : zero+32 : offset(288), littleendian;
task_struct_active_mm = task_struct_active_mm;
task_struct_pid = task_struct_pid;
task_struct_comm = task_struct_comm }
- | { _ } -> raise (ParseError ("task_struct", "parser_27", "failed to match kernel structure"));;
+ | { _ } -> raise (ParseError ("task_struct", "parser_30", "failed to match kernel structure"));;
module StringMap = Map.Make(String);;
let map = StringMap.empty;;
let v = (parser_1, 2704);;
let map = StringMap.add "2.6.21-1.3218.fc8.i586" v map;;
let v = (parser_9, 3932);;
let map = StringMap.add "2.6.22-0.23.rc7.git6.fc8.x86_64" v map;;
+let v = (parser_10, 2276);;
+let map = StringMap.add "2.6.21-1.3242.fc8.ppc64" v map;;
let v = (parser_7, 2132);;
let map = StringMap.add "2.6.21-1.3144.fc7.ppc64" v map;;
-let v = (parser_10, 1612);;
+let v = (parser_11, 1612);;
let map = StringMap.add "2.6.21-1.3218.fc8.ppc" v map;;
-let v = (parser_11, 2292);;
+let v = (parser_12, 2292);;
let map = StringMap.add "2.6.22-0.23.rc7.git6.fc8.ppc64" v map;;
-let v = (parser_12, 2880);;
+let v = (parser_13, 2880);;
let map = StringMap.add "2.6.21-1.3236.fc8.i686" v map;;
let v = (parser_7, 2132);;
let map = StringMap.add "2.6.21-1.3132.fc7.ppc64" v map;;
let v = (parser_1, 1376);;
let map = StringMap.add "2.6.21-1.3228.fc7.i686" v map;;
-let v = (parser_13, 4684);;
+let v = (parser_14, 4684);;
let map = StringMap.add "2.6.24-9.fc9.x86_64" v map;;
-let v = (parser_11, 2292);;
+let v = (parser_12, 2292);;
let map = StringMap.add "2.6.22-0.23.rc7.git6.fc8.ppc64" v map;;
let v = (parser_7, 2132);;
let map = StringMap.add "2.6.21-1.3132.fc7.ppc64" v map;;
-let v = (parser_13, 4684);;
+let v = (parser_14, 4684);;
let map = StringMap.add "2.6.24-7.fc9.x86_64" v map;;
+let v = (parser_10, 2276);;
+let map = StringMap.add "2.6.21-1.3238.fc8.ppc64" v map;;
let v = (parser_1, 1384);;
let map = StringMap.add "2.6.18-1.2798.fc6.i586" v map;;
-let v = (parser_10, 1620);;
+let v = (parser_11, 1620);;
let map = StringMap.add "2.6.21-1.3132.fc7.ppc" v map;;
-let v = (parser_14, 2292);;
+let v = (parser_15, 2292);;
let map = StringMap.add "2.6.21-1.3234.fc8.ppc64" v map;;
let v = (parser_1, 1384);;
let map = StringMap.add "2.6.18-1.2798.fc6.i686" v map;;
-let v = (parser_15, 2496);;
+let v = (parser_16, 2496);;
let map = StringMap.add "2.6.25.11-97.fc9.x86_64" v map;;
let v = (parser_1, 1368);;
let map = StringMap.add "2.6.18-1.2798.fc6.i686" v map;;
-let v = (parser_16, 3540);;
+let v = (parser_17, 1772);;
+let map = StringMap.add "2.6.21-1.3242.fc8.ppc" v map;;
+let v = (parser_18, 3540);;
let map = StringMap.add "2.6.24-9.fc9.i686" v map;;
-let v = (parser_17, 2492);;
+let v = (parser_19, 2492);;
let map = StringMap.add "2.6.24-7.fc9.ppc64" v map;;
-let v = (parser_18, 2856);;
+let v = (parser_20, 2856);;
let map = StringMap.add "2.6.22-0.23.rc7.git6.fc8.i686" v map;;
-let v = (parser_19, 2308);;
+let v = (parser_21, 2308);;
let map = StringMap.add "2.6.21-1.3236.fc8.ppc64" v map;;
-let v = (parser_10, 1628);;
+let v = (parser_11, 1628);;
let map = StringMap.add "2.6.21-1.3209.fc8.ppc" v map;;
-let v = (parser_19, 2308);;
+let v = (parser_21, 2308);;
let map = StringMap.add "2.6.21-1.3236.fc8.ppc64" v map;;
let v = (parser_7, 2072);;
let map = StringMap.add "2.6.21-1.3228.fc7.ppc64" v map;;
let v = (parser_7, 2132);;
let map = StringMap.add "2.6.21-1.3128.fc7.ppc64" v map;;
+let v = (parser_10, 2276);;
+let map = StringMap.add "2.6.21-1.3238.fc8.ppc64" v map;;
let v = (parser_1, 2712);;
let map = StringMap.add "2.6.21-1.3209.fc8.i686" v map;;
let v = (parser_8, 3772);;
let map = StringMap.add "2.6.21-1.3132.fc7.x86_64" v map;;
-let v = (parser_17, 2492);;
+let v = (parser_19, 2492);;
let map = StringMap.add "2.6.24-7.fc9.ppc64" v map;;
let v = (parser_8, 3772);;
let map = StringMap.add "2.6.21-1.3228.fc7.x86_64" v map;;
-let v = (parser_20, 1948);;
+let v = (parser_22, 1948);;
let map = StringMap.add "2.6.24-9.fc9.ppc" v map;;
-let v = (parser_10, 1576);;
+let v = (parser_11, 1576);;
let map = StringMap.add "2.6.18-1.2798.fc6.ppc" v map;;
-let v = (parser_10, 1620);;
+let v = (parser_11, 1620);;
let map = StringMap.add "2.6.21-1.3128.fc7.ppc" v map;;
let v = (parser_1, 2712);;
let map = StringMap.add "2.6.21-1.3209.fc8.i686" v map;;
let v = (parser_8, 3772);;
let map = StringMap.add "2.6.20-1.2933.fc6.x86_64" v map;;
-let v = (parser_21, 2880);;
+let v = (parser_23, 2880);;
let map = StringMap.add "2.6.21-1.3234.fc8.i686" v map;;
-let v = (parser_10, 1620);;
+let v = (parser_11, 1620);;
let map = StringMap.add "2.6.21-1.3144.fc7.ppc" v map;;
let v = (parser_7, 2132);;
let map = StringMap.add "2.6.21-1.3144.fc7.ppc64" v map;;
-let v = (parser_17, 2492);;
+let v = (parser_19, 2492);;
let map = StringMap.add "2.6.24-9.fc9.ppc64" v map;;
-let v = (parser_10, 1628);;
+let v = (parser_11, 1628);;
let map = StringMap.add "2.6.21-1.3218.fc8.ppc" v map;;
-let v = (parser_10, 1604);;
+let v = (parser_11, 1604);;
let map = StringMap.add "2.6.21-1.3128.fc7.ppc" v map;;
-let v = (parser_22, 1928);;
+let v = (parser_24, 1928);;
let map = StringMap.add "2.6.18-1.2798.fc6.x86_64" v map;;
-let v = (parser_10, 1604);;
+let v = (parser_11, 1604);;
let map = StringMap.add "2.6.21-1.3132.fc7.ppc" v map;;
-let v = (parser_10, 1584);;
+let v = (parser_11, 1584);;
let map = StringMap.add "2.6.21-1.3228.fc7.ppc" v map;;
-let v = (parser_17, 2492);;
+let v = (parser_25, 3916);;
+let map = StringMap.add "2.6.21-1.3242.fc8.x86_64" v map;;
+let v = (parser_19, 2492);;
let map = StringMap.add "2.6.24-9.fc9.ppc64" v map;;
let v = (parser_6, 2116);;
let map = StringMap.add "2.6.21-1.3218.fc8.ppc64" v map;;
let map = StringMap.add "2.6.20-1.2933.fc6.ppc64" v map;;
let v = (parser_2, 1772);;
let map = StringMap.add "2.6.22-0.23.rc7.git6.fc8.ppc" v map;;
-let v = (parser_20, 1936);;
+let v = (parser_22, 1936);;
let map = StringMap.add "2.6.24-7.fc9.ppc" v map;;
-let v = (parser_10, 1612);;
+let v = (parser_11, 1612);;
let map = StringMap.add "2.6.21-1.3209.fc8.ppc" v map;;
let v = (parser_8, 1920);;
let map = StringMap.add "2.6.20-1.2933.fc6.x86_64" v map;;
+let v = (parser_17, 1756);;
+let map = StringMap.add "2.6.21-1.3242.fc8.ppc" v map;;
let v = (parser_1, 2704);;
let map = StringMap.add "2.6.21-1.3132.fc7.i586" v map;;
let v = (parser_1, 2704);;
let map = StringMap.add "2.6.21-1.3228.fc7.x86_64" v map;;
let v = (parser_7, 2088);;
let map = StringMap.add "2.6.18-1.2798.fc6.ppc64iseries" v map;;
-let v = (parser_16, 3540);;
+let v = (parser_26, 2872);;
+let map = StringMap.add "2.6.21-1.3238.fc8.i686" v map;;
+let v = (parser_18, 3540);;
let map = StringMap.add "2.6.24-7.fc9.i586" v map;;
-let v = (parser_10, 1592);;
+let v = (parser_11, 1592);;
let map = StringMap.add "2.6.20-1.2933.fc6.ppc" v map;;
+let v = (parser_10, 2276);;
+let map = StringMap.add "2.6.21-1.3242.fc8.ppc64" v map;;
let v = (parser_1, 2712);;
let map = StringMap.add "2.6.21-1.3218.fc8.i686" v map;;
let v = (parser_1, 2704);;
let map = StringMap.add "2.6.21-1.3228.fc7.i686" v map;;
let v = (parser_1, 2712);;
let map = StringMap.add "2.6.21-1.3209.fc8.i586" v map;;
-let v = (parser_23, 3756);;
+let v = (parser_27, 3756);;
let map = StringMap.add "2.6.21-1.3218.fc8.x86_64" v map;;
let v = (parser_7, 2088);;
let map = StringMap.add "2.6.18-1.2798.fc6.ppc64iseries" v map;;
let map = StringMap.add "2.6.21-1.3144.fc7.i686" v map;;
let v = (parser_8, 1880);;
let map = StringMap.add "2.6.20-1.2933.fc6.x86_64" v map;;
-let v = (parser_24, 1796);;
+let v = (parser_28, 1796);;
let map = StringMap.add "2.6.21-1.3234.fc8.ppc" v map;;
+let v = (parser_25, 3916);;
+let map = StringMap.add "2.6.21-1.3238.fc8.x86_64" v map;;
let v = (parser_8, 1920);;
let map = StringMap.add "2.6.20-1.2933.fc6.x86_64" v map;;
-let v = (parser_22, 1928);;
+let v = (parser_24, 1928);;
let map = StringMap.add "2.6.18-1.2798.fc6.x86_64" v map;;
-let v = (parser_16, 3540);;
+let v = (parser_18, 3540);;
let map = StringMap.add "2.6.24-7.fc9.i686" v map;;
+let v = (parser_17, 1772);;
+let map = StringMap.add "2.6.21-1.3238.fc8.ppc" v map;;
let v = (parser_8, 3780);;
let map = StringMap.add "2.6.21-1.3144.fc7.x86_64" v map;;
-let v = (parser_10, 1608);;
+let v = (parser_11, 1608);;
let map = StringMap.add "2.6.20-1.2933.fc6.ppc" v map;;
-let v = (parser_16, 3540);;
+let v = (parser_18, 3540);;
let map = StringMap.add "2.6.24-7.fc9.i686" v map;;
-let v = (parser_16, 3540);;
+let v = (parser_18, 3540);;
let map = StringMap.add "2.6.24-9.fc9.i686" v map;;
let v = (parser_1, 2704);;
let map = StringMap.add "2.6.20-1.2933.fc6.i686" v map;;
-let v = (parser_25, 1832);;
+let v = (parser_29, 1832);;
let map = StringMap.add "2.6.25.11-97.fc9.i686" v map;;
let v = (parser_1, 2704);;
let map = StringMap.add "2.6.21-1.3228.fc7.i686" v map;;
let map = StringMap.add "2.6.21-1.3228.fc7.i686" v map;;
let v = (parser_1, 2704);;
let map = StringMap.add "2.6.21-1.3128.fc7.i686" v map;;
-let v = (parser_10, 1604);;
+let v = (parser_11, 1604);;
let map = StringMap.add "2.6.21-1.3144.fc7.ppc" v map;;
let v = (parser_1, 1400);;
let map = StringMap.add "2.6.20-1.2933.fc6.i686" v map;;
-let v = (parser_23, 3756);;
+let v = (parser_27, 3756);;
let map = StringMap.add "2.6.21-1.3209.fc8.x86_64" v map;;
-let v = (parser_26, 1756);;
+let v = (parser_17, 1756);;
let map = StringMap.add "2.6.21-1.3238.fc8.ppc" v map;;
-let v = (parser_27, 3932);;
+let v = (parser_30, 3932);;
let map = StringMap.add "2.6.21-1.3234.fc8.x86_64" v map;;
-let v = (parser_24, 1780);;
+let v = (parser_28, 1780);;
let map = StringMap.add "2.6.21-1.3234.fc8.ppc" v map;;
-let v = (parser_14, 2292);;
+let v = (parser_15, 2292);;
let map = StringMap.add "2.6.21-1.3234.fc8.ppc64" v map;;
let v = (parser_1, 1400);;
let map = StringMap.add "2.6.20-1.2933.fc6.i586" v map;;
let map = StringMap.add "2.6.18-1.2798.fc6.ppc64" v map;;
let v = (parser_1, 1384);;
let map = StringMap.add "2.6.18-1.2798.fc6.i686" v map;;
-let v = (parser_10, 1560);;
+let v = (parser_26, 2872);;
+let map = StringMap.add "2.6.21-1.3238.fc8.i686" v map;;
+let v = (parser_11, 1560);;
let map = StringMap.add "2.6.21-1.3228.fc7.ppc" v map;;
-let v = (parser_12, 2880);;
+let v = (parser_13, 2880);;
let map = StringMap.add "2.6.21-1.3236.fc8.i686" v map;;
let v = (parser_3, 1796);;
let map = StringMap.add "2.6.21-1.3236.fc8.ppc" v map;;
let map = StringMap.add "2.6.20-1.2933.fc6.i686" v map;;
let v = (parser_1, 2712);;
let map = StringMap.add "2.6.21-1.3218.fc8.i686" v map;;
-let v = (parser_16, 3540);;
+let v = (parser_18, 3540);;
let map = StringMap.add "2.6.24-9.fc9.i586" v map;;
let v = (parser_8, 3772);;
let map = StringMap.add "2.6.21-1.3128.fc7.x86_64" v map;;
-let v = (parser_21, 2880);;
+let v = (parser_23, 2880);;
let map = StringMap.add "2.6.21-1.3234.fc8.i686" v map;;
let v = (parser_7, 2112);;
let map = StringMap.add "2.6.20-1.2933.fc6.ppc64" v map;;
-let v = (parser_20, 1936);;
+let v = (parser_22, 1936);;
let map = StringMap.add "2.6.24-9.fc9.ppc" v map;;
+let v = (parser_26, 2872);;
+let map = StringMap.add "2.6.21-1.3242.fc8.i686" v map;;
let v = (parser_7, 2132);;
let map = StringMap.add "2.6.21-1.3128.fc7.ppc64" v map;;
-let v = (parser_20, 1948);;
+let v = (parser_22, 1948);;
let map = StringMap.add "2.6.24-7.fc9.ppc" v map;;
let v = (parser_6, 2116);;
let map = StringMap.add "2.6.21-1.3209.fc8.ppc64" v map;;
-let v = (parser_10, 1592);;
+let v = (parser_11, 1592);;
let map = StringMap.add "2.6.18-1.2798.fc6.ppc" v map;;
-let v = (parser_18, 2856);;
+let v = (parser_20, 2856);;
let map = StringMap.add "2.6.22-0.23.rc7.git6.fc8.i686" v map;;
let v = (parser_1, 2704);;
let map = StringMap.add "2.6.20-1.2933.fc6.i686" v map;;
let tools = ref []
(* Registration function used by the tools. *)
-let register ?(external_cmd = true) ?(extra_args = [])
- ?argcheck ?beforeksyms ?beforeutsname ?run
+let register
+ ?(needs_ksyms = false) ?(needs_utsname = false)
+ ?(needs_tasks = false) ?(needs_everything = false)
+ ~run
+ ?(external_cmd = true)
+ ?(extra_args = [])
+ ?argcheck
name summary description =
tools :=
- (name, (name, summary, description, external_cmd, extra_args,
- argcheck, beforeksyms, beforeutsname, run))
+ (name, (name, summary, description,
+ needs_ksyms, needs_utsname, needs_tasks, needs_everything,
+ run, external_cmd, extra_args, argcheck))
:: !tools
(* Main program, called from mem/virt_mem_main.ml when all the
match tool with
| None -> (* Generic usage message. *)
let tools = List.map (
- fun (name, (_, summary, _, external_cmd, _, _, _, _, _)) ->
+ fun (name, (_, summary, _, _, _, _, _, _, external_cmd, _, _)) ->
if external_cmd then "virt-"^name, summary
else "virt-mem "^name, summary
) tools in
<tool> [-options] [domains...]
To display extra help for a single tool, do:
- virt-mem help <tool>
+ virt-mem --help <tool>
Options:") tools
(* Tool-specific usage message. *)
- | Some (name, summary, description, external_cmd, _, _, _, _, _) ->
+ | Some (name, summary, description, _, _, _, _, _, external_cmd, _, _) ->
let cmd =
if external_cmd then "virt-" ^ name else "virt-mem " ^ name in
let argspec =
let extra_args = match tool with
| None -> []
- | Some (_, _, _, _, extra_args, _, _, _, _) -> extra_args in
+ | Some (_, _, _, _, _, _, _, _, _, extra_args, _) -> extra_args in
let argspec = [
"-A", Arg.String set_architecture,
"arch " ^ s_"Set kernel architecture, endianness and word size";
* or the user didn't give us a valid tool (eg. "virt-mem foobar").
* Detect that final case now and give an error.
*)
- let name, _, _, _, _, argcheck, beforeksyms, beforeutsname, run =
+ let name, _, _,
+ needs_ksyms, needs_utsname, needs_tasks, needs_everything,
+ run, external_cmd, extra_args, argcheck =
match tool with
| Some t -> t
| None ->
) testimages
) in
- (* Optional callback into the tool before we start looking for
- * kernel symbols.
- *)
- (match beforeksyms with
- | None -> ()
- | Some beforeksyms -> beforeksyms debug images
- );
-
- (* If there are no more callback functions, then there is no point
- * continuing with the rest of the program (kernel symbol analysis) ...
- *)
- if beforeutsname = None && run = None then exit 0;
-
- (* Do the kernel symbol analysis. *)
+ (* Now build the kdata, depending on what the tool asked for. *)
let images =
List.map (
fun image ->
- (* Look for ordinary kernel symbols: *)
- let image = Virt_mem_ksyms.find_kernel_symbols debug image in
- (* Look for kallsyms: *)
- let image = Virt_mem_kallsyms.find_kallsyms debug image in
-
-(*
- (* Finally, just wrap the lookup_ksym call in something
- * which prints the query when debug is set.
- *)
- let image =
- if debug then
- let (domid, name, arch, mem, lookup_ksym) = image in
- let lookup_ksym sym =
- try
- let value = lookup_ksym sym in
- eprintf "lookup_ksym %S = %Lx\n%!" sym value;
- value
- with Not_found ->
- eprintf "lookup_ksym %S failed\n%!" sym;
- raise Not_found
- in
- (domid, name, arch, mem, lookup_ksym)
- else
- image in
-*)
-
- image
+ let kdata = { ksyms = None; utsname = None; tasks = None } in
+ image, kdata
) images in
+ (* Certain needs are dependent on others ... *)
+ let needs_ksyms =
+ if needs_utsname then true
+ else needs_ksyms in
+ let needs_ksyms, needs_utsname =
+ if needs_tasks then true, true
+ else needs_ksyms, needs_utsname in
+ let needs_ksyms, needs_utsname, needs_tasks =
+ if needs_everything then true, true, true
+ else needs_ksyms, needs_utsname, needs_tasks in
- (* Before utsname analysis. *)
- (match beforeutsname with
- | None -> ()
- | Some beforeutsname -> List.iter (beforeutsname debug) images
- );
-
- (* If there are no more callback functions, then there is no point
- * continuing with the rest of the program (kernel version analysis) ...
- *)
- if run = None then exit 0;
+ (* Do the kernel symbol analysis. *)
+ let images =
+ if not needs_ksyms then images
+ else
+ List.map (
+ fun (image, kdata) ->
+ (* Look for ordinary kernel symbols: *)
+ let image, ksyms =
+ Virt_mem_ksyms.find_kernel_symbols debug image in
+
+ match ksyms with
+ | None -> image, kdata
+ | Some ksyms ->
+ (* Look for kallsyms: *)
+ let image, kallsyms =
+ Virt_mem_kallsyms.find_kallsyms debug image ksyms in
+
+ let ksyms =
+ match kallsyms with
+ | None -> ksyms (* no kallsyms, just use module symbols *)
+ | Some kallsyms -> kallsyms (* ksyms + kallsyms *) in
+
+ image, { kdata with ksyms = Some ksyms }
+ ) images in
(* Get the kernel version (utsname analysis). *)
- let images = List.map (Virt_mem_utsname.find_utsname debug) images in
+ let images =
+ if not needs_utsname then images
+ else
+ List.map (
+ fun (image, ({ ksyms = ksyms } as kdata)) ->
+ match ksyms with
+ | None -> image, kdata
+ | Some ksyms ->
+ let image, utsname =
+ Virt_mem_utsname.find_utsname debug image ksyms in
+ let kdata = { kdata with utsname = utsname } in
+ image, kdata
+ ) images in
+
+ (* Get the tasks. *)
+ let images =
+ if not needs_tasks then images
+ else
+ List.map (
+ fun (image, ({ ksyms = ksyms; utsname = utsname } as kdata)) ->
+ match ksyms, utsname with
+ | Some ksyms, Some { kernel_release = kversion } ->
+ let image, tasks =
+ Virt_mem_tasks.find_tasks debug image ksyms kversion in
+ let kdata = { kdata with tasks = tasks } in
+ image, kdata
+ | _, _ -> image, kdata
+ ) images in
(* Run the tool's main function. *)
- (match run with
- | None -> ()
- | Some run -> List.iter (run debug) images
- )
+ let errors = ref 0 in
+ List.iter (
+ fun (image, kdata) ->
+ try
+ if not needs_everything then (
+ if needs_ksyms && kdata.ksyms = None then
+ failwith (s_"could not read kernel symbols")
+ else if needs_utsname && kdata.utsname = None then
+ failwith (s_"could not read kernel version")
+ else if needs_tasks && kdata.tasks = None then
+ failwith (s_"could not read process table")
+ );
+ run debug image kdata
+ with exn ->
+ eprintf "%s: %s\n" image.domname (Printexc.to_string exn);
+ incr errors
+ ) images;
+ exit (if !errors > 0 then 1 else 0)
*)
val register :
+ ?needs_ksyms:bool ->
+ ?needs_utsname:bool ->
+ ?needs_tasks:bool ->
+ ?needs_everything:bool ->
+ run:(bool -> Virt_mem_types.image -> Virt_mem_types.kdata -> unit) ->
?external_cmd:bool ->
?extra_args:(Arg.key * Arg.spec * Arg.doc) list ->
?argcheck:(bool -> unit) ->
- ?beforeksyms:(bool -> Virt_mem_types.image0 list -> unit) ->
- ?beforeutsname:(bool -> Virt_mem_types.image1 -> unit) ->
- ?run:(bool -> Virt_mem_types.image2 -> unit) ->
string -> string -> Arg.usage_msg ->
unit
(** Tools register themselves with this call.
- The anonymous parameters are:
+ The required parameters are:
- tool name (eg. "uname")
- short summary
- full usage message
- The optional callback functions are:
- - [?argcheck] called after arguments have been fully parsed
- so that the program can do any additional checks needed (eg.
- on [extra_args]),
- - [?beforeksyms] called after images are loaded and before
- kernel symbols are analyzed,
- - [?beforeutsname] called after kernel symbols are analyzed
- and before the kernel version is detected
- - [?run] called after everything
- (almost all tools supply this callback function).
+ The boolean parameters specify what kernel structures the
+ tool needs before it can run. The main program will read
+ these structures in before calling [~run].
+ - [~needs_ksyms:true] if kernel symbols are needed
+ - [~needs_utsname:true] if kernel version (utsname) is needed
+ - [~needs_task_struct:true] if all task_struct (processes) are needed
+ - [~needs_everything:true] if the tool requires as much as
+ possible (but will not fail if we cannot determine everything)
+
+ The [~run] function is the tool's run function. This function
+ is run once for each separate domain. It may throw any exception,
+ which is printed out, but does not abort the program. (If for
+ some reason you need to abort the whole program, call [exit].)
Pass [~external_cmd:false] if this tool doesn't have an
external 'virt-tool' link.
Pass [~extra_args:...] if this tool needs extra command
line options.
+
+ Pass [~argcheck:...] so that the tool can do any additional
+ parameter checks needed (eg. for [~extra_args]).
*)
val main : unit -> unit
exit 1
)
-(* Capture the images before kernel symbol analysis is attempted.
- * Just save them to the output file(s).
- *)
-let rec beforeksyms debug = function
+(* Capture the image. *)
+let rec run debug image kdata = ()
+(*
| [] ->
prerr_endline
(s_"virt-mem capture: warning: no kernel images were captured")
printf (f_"virt-mem capture: wrote kernel image from %s to filename %s\n")
domname filename
+*)
let summary = s_"capture memory image for post-mortem analysis"
let description = s_"Capture a memory image to a file for later post-mortem
let () =
Virt_mem.register
- ~external_cmd:false ~extra_args
- ~argcheck ~beforeksyms
+ ~needs_everything:true ~run
+ ~external_cmd:false ~extra_args ~argcheck
"capture" summary description
| Compressed of (string * Virt_mem_mmap.addr) list * Virt_mem_mmap.addr
| Uncompressed of (string * Virt_mem_mmap.addr) list
-let find_kallsyms debug (({ domname = domname; mem = mem } as image), ksymmap) =
+let find_kallsyms debug ({ domname = domname; mem = mem } as image) ksymmap =
let start_t = gettimeofday () in
(* Now try to find the /proc/kallsyms table. This is in an odd
let freqs = frequency kallsymtabs in
match freqs with
| [] ->
- (* Can't find any kallsymtabs, just return the ksymmap
- * map generated previously from the exported symbols.
- *)
- ksymmap
+ (* Can't find any kallsymtabs. *)
+ None
| (_, (_, _, _, Uncompressed names)) :: _ ->
let rec loop ksymmap = function
loop (Ksymmap.add name value ksymmap) names
| [] -> ksymmap
in
- loop ksymmap names
+ Some (loop ksymmap names)
| (_, (start_addr, num_entries, names_addr,
Compressed (compressed_names, markers_addr))) :: _ ->
loop (Ksymmap.add name value ksymmap) names
| [] -> ksymmap
in
- loop ksymmap names in
+ Some (loop ksymmap names) in
if debug then (
let end_t = gettimeofday () in
(end_t -. start_t)
);
- ((image, ksymmap) : image1)
+ (image, ksymmap)
Find kallsyms in a kernel image.
*)
-val find_kallsyms : bool -> Virt_mem_types.image1 -> Virt_mem_types.image1
+val find_kallsyms : bool -> Virt_mem_types.image -> Virt_mem_types.ksymmap
+ -> Virt_mem_types.image * Virt_mem_types.ksymmap option
(** Find kallsyms in a kernel image. *)
match freqs with
| [] ->
eprintf (f_"%s: cannot find start of kernel symbol table\n") domname;
- Ksymmap.empty
+ None
| (_, (ksymtab_addr, ksymtab_size)) :: _ ->
if debug then
in
loop Ksymmap.empty ksymtab in
- ksymmap
+ Some ksymmap
in
if debug then (
(end_t -. start_t)
);
- ((image, ksymmap) : image1)
+ (image, ksymmap)
(** The list of "common" kernel symbols which we expect to be present
in almost any Linux kernel. *)
-val find_kernel_symbols : bool -> Virt_mem_types.image0 -> Virt_mem_types.image1
+val find_kernel_symbols : bool -> Virt_mem_types.image ->
+ Virt_mem_types.image * Virt_mem_types.ksymmap option
(** Find ordinary kernel symbols in a kernel image. *)
--- /dev/null
+(* Memory info command for virtual domains.
+ (C) Copyright 2008 Richard W.M. Jones, Red Hat Inc.
+ http://libvirt.org/
+
+ 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; either version 2 of the License, or
+ (at your option) any later version.
+
+ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *)
+
+open Printf
+
+open Virt_mem_gettext.Gettext
+open Virt_mem_utils
+open Virt_mem_types
+
+open Kernel_task_struct
+
+let find_tasks debug image ksymmap kernel_version =
+ if not (task_struct_known kernel_version) then (
+ eprintf (f_"%s: %s: unknown kernel version
+Try a newer version of virt-mem, or if the guest is not from a
+supported Linux distribution, see this page about adding support:
+ http://et.redhat.com/~rjones/virt-mem/faq.html\n")
+ image.domname kernel_version;
+ image, None
+ ) else (
+ let task_struct_size = task_struct_size kernel_version in
+
+ let init_task_addr =
+ try Some (Ksymmap.find "init_task" ksymmap)
+ with Not_found ->
+ eprintf (f_"%s: could not find init_task in kernel image\n")
+ image.domname;
+ None in
+ match init_task_addr with
+ | None -> image, None
+ | Some init_task_addr ->
+ let init_task =
+ get_task_struct kernel_version image.mem init_task_addr in
+
+ (* Starting at init_task, navigate through the linked list of
+ * tasks (through tasks.next). Just make sure they are mapped
+ * into memory.
+ *)
+ let image =
+ let rec loop image task =
+ let next = task.task_struct_tasks'next in
+ if next <> init_task_addr then (
+ let mapped =
+ Virt_mem_mmap.is_mapped_range image.mem next task_struct_size in
+ let image =
+ if not mapped then
+ Virt_mem_types.load_memory image next task_struct_size
+ else
+ image in
+ let task = get_task_struct kernel_version image.mem next in
+ loop image task
+ ) else
+ image
+ in
+ loop image init_task in
+
+ image, Some init_task_addr
+ )
--- /dev/null
+(** Get process list from kernel. *)
+(* Memory info command for virtual domains.
+ (C) Copyright 2008 Richard W.M. Jones, Red Hat Inc.
+ http://libvirt.org/
+
+ 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; either version 2 of the License, or
+ (at your option) any later version.
+
+ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *)
+
+val find_tasks : bool ->
+ Virt_mem_types.image ->
+ Virt_mem_types.ksymmap ->
+ string ->
+ Virt_mem_types.image * Virt_mem_mmap.addr option
+(** Find and load the process table. *)
module Ksymmap = Map.Make (String)
-type image0 = {
+type ksymmap = addr Ksymmap.t
+
+type image = {
dom : Libvirt.ro D.t option;
domname : string;
- arch : Virt_mem_utils.architecture;
+ arch : architecture;
mem : ([`Wordsize], [`Endian], [`HasMapping]) Virt_mem_mmap.t;
kernel_min : addr;
kernel_max : addr;
}
-type image1 =
- image0
- * addr Ksymmap.t
-
-type image2 =
- image0
- * addr Ksymmap.t
- * utsname option
-
-and utsname = {
+type utsname = {
kernel_name : string;
nodename : string;
kernel_release : string;
domainname : string;
}
+type kdata = {
+ ksyms : ksymmap option;
+ utsname : utsname option;
+ tasks : Virt_mem_mmap.addr option;
+}
+
(* This is the maximum we can download in one go over the libvirt
* remote connection.
*
in
loop 0;
- add_string mem str start
+ Virt_mem_mmap.add_string mem str start
let load_static_memory ~dom ~domname ~arch ~wordsize ~endian
~kernel_min ~kernel_max start size =
else if start +^ Int64.of_int size > kernel_max then
raise (LoadMemoryError (AddressOutOfRange,
"load_memory: start+size > kernel_max"))
- else if is_mapped_range mem start size then image
+ else if Virt_mem_mmap.is_mapped_range mem start size then image
else (
match dom with
| None ->
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
end
- (** A map of kernel symbols to addresses. *)
+ (** Functions available in the map of kernel symbols to addresses. *)
+
+type ksymmap = Virt_mem_mmap.addr Ksymmap.t
+ (** Kernel symbol table (map of kernel symbols to addresses). *)
(** {2 Kernel images and associated data} *)
+type image = {
+ dom : Libvirt.ro Libvirt.Domain.t option; (** Domain, if known. *)
+ domname : string; (** Domain name. *)
+ arch : Virt_mem_utils.architecture; (** Architecture, eg. i386. *)
+ mem : ([`Wordsize], [`Endian], [`HasMapping]) Virt_mem_mmap.t;
+ (** Memory map. *)
+ kernel_min : Virt_mem_mmap.addr; (** Minimum addr of kernel pointers. *)
+ kernel_max : Virt_mem_mmap.addr; (** Maximum addr of kernel pointers. *)
+}
+ (** A basic kernel image. *)
+
type utsname = {
kernel_name : string;
nodename : string;
}
(** Kernel version, from utsname structure in the kernel. *)
-type image0 = {
- dom : Libvirt.ro Libvirt.Domain.t option; (** Domain, if known. *)
- domname : string; (** Domain name. *)
- arch : Virt_mem_utils.architecture; (** Architecture, eg. i386. *)
- mem : ([`Wordsize], [`Endian], [`HasMapping]) Virt_mem_mmap.t;
- (** Memory map. *)
- kernel_min : Virt_mem_mmap.addr; (** Minimum addr of kernel pointers. *)
- kernel_max : Virt_mem_mmap.addr; (** Maximum addr of kernel pointers. *)
+type kdata = {
+ ksyms : ksymmap option; (** Kernel symbol lookup function. *)
+ utsname : utsname option; (** Kernel version. *)
+ tasks : Virt_mem_mmap.addr option; (** Linked list of tasks (processes)
+ starting at the address of
+ init_task (swapper). *)
}
- (** A basic kernel image. *)
+ (** Optional data derived from the raw kernel image by the main
+ program and passed to the tools' [~run] functions.
-type image1 =
- image0
- * Virt_mem_mmap.addr Ksymmap.t (* Kernel symbol map. *)
- (** A kernel image, after finding kernel symbols. *)
+ What fields get filled in is controlled by the [~needs_*]
+ options passed when tools register themselves, and also of
+ course by what we are able to find out about the memory image.
-type image2 =
- image0
- * Virt_mem_mmap.addr Ksymmap.t (* Kernel symbol map. *)
- * utsname option (* Kernel version, etc., if found. *)
- (** A kernel image, after finding kernel version (like 'uname'). *)
+ Note there is significant cost to filling in some of these
+ fields.
+*)
(** {2 Load kernel memory} *)
type load_memory_error =
- | AddressOutOfRange (** Address not in [kernel_min..kernel_max] *)
- | DomIsNull (** image.dom = None *)
+ | AddressOutOfRange (** Address not in [kernel_min..kernel_max] *)
+ | DomIsNull (** image.dom = None *)
exception LoadMemoryError of load_memory_error * string
-val load_static_memory : dom:Libvirt.ro Libvirt.Domain.t ->
- domname:string ->
- arch:Virt_mem_utils.architecture ->
- wordsize:Virt_mem_utils.wordsize -> endian:Bitstring.endian ->
- kernel_min:Virt_mem_mmap.addr -> kernel_max:Virt_mem_mmap.addr ->
- Virt_mem_mmap.addr -> int -> image0
- (** [load_static_memory ~dom (*...*) start size] creates an [image0]
- object, and initializes it with static kernel memory loaded
- from the [start] address and [size] of [dom].
-
- See also {!load_memory} for exceptions this can raise. *)
-
-val load_memory : image0 -> Virt_mem_mmap.addr -> int -> image0
+val load_memory : image -> Virt_mem_mmap.addr -> int -> image
(** [load_memory img start size] tries to load [size] bytes from
the start address into the memory map. If the memory was loaded
previously, then it is not requested again.
This function can raise many different sorts of exceptions and
the caller is advised to catch any exceptions and deal with them
appropriately. *)
+
+val load_static_memory : dom:Libvirt.ro Libvirt.Domain.t ->
+ domname:string ->
+ arch:Virt_mem_utils.architecture ->
+ wordsize:Virt_mem_utils.wordsize -> endian:Bitstring.endian ->
+ kernel_min:Virt_mem_mmap.addr -> kernel_max:Virt_mem_mmap.addr ->
+ Virt_mem_mmap.addr -> int -> image
+ (** [load_static_memory ~dom (*...*) start size] creates an [image0]
+ object, and initializes it with static kernel memory loaded
+ from the [start] address and [size] of [dom].
+
+ See also {!load_memory} for exceptions this can raise. *)
| { _ } ->
None
-let find_utsname debug ({ domname = name; mem = mem } as image, ksymmap) =
+let find_utsname debug ({ domname = name; mem = mem } as image) ksymmap =
let utsname =
(* In Linux 2.6.25, the symbol is init_uts_ns.
* http://lxr.linux.no/linux/init/version.c
name;
None
in
- (image, ksymmap, utsname)
+ image, utsname
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
-val find_utsname : bool -> Virt_mem_types.image1 -> Virt_mem_types.image2
+val find_utsname : bool -> Virt_mem_types.image -> Virt_mem_types.ksymmap
+ -> Virt_mem_types.image * Virt_mem_types.utsname option
(** Find the system utsname structure. *)
+#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: virt-p2v--devel\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: ../ps/virt_ps.ml:40
-msgid "%s: %s: unknown kernel version\nTry a newer version of virt-mem, or if the guest is not from a\nsupported Linux distribution, see this page about adding support:\n http://et.redhat.com/~rjones/virt-mem/faq.html\\n"
-msgstr ""
-
-#: ../ps/virt_ps.ml:53
-msgid "%s: could not find init_task in kernel image\\n"
-msgstr ""
-
-#: ../dmesg/virt_dmesg.ml:72
+#: ../dmesg/virt_dmesg.ml:73
msgid "%s: could not find kernel log buffer in kernel image\\n"
msgstr ""
-#: ../ps/virt_ps.ml:35
-msgid "%s: could not guess kernel version\\n"
-msgstr ""
-
-#: ../lib/virt_mem.ml:352
+#: ../lib/virt_mem.ml:360
msgid "%s: domain is not running"
msgstr ""
msgid "%s: no system_utsname in kernel image\\n"
msgstr ""
-#: ../lib/virt_mem.ml:347
+#: ../lib/virt_mem.ml:355
msgid "%s: unknown domain (not a UUID, name or ID of any active domain)"
msgstr ""
-#: ../lib/virt_mem.ml:398 ../lib/virt_mem.ml:463
+#: ../lib/virt_mem.ml:471 ../lib/virt_mem.ml:406
msgid "%s: use -A to define architecture (i386/x86-64 only) for this image"
msgstr ""
-#: ../lib/virt_mem.ml:389 ../lib/virt_mem.ml:454
+#: ../lib/virt_mem.ml:462 ../lib/virt_mem.ml:397
msgid "%s: use -E to define endianness for this image"
msgstr ""
-#: ../lib/virt_mem.ml:404 ../lib/virt_mem.ml:467
+#: ../lib/virt_mem.ml:475 ../lib/virt_mem.ml:412
msgid "%s: use -T to define kernel load address for this image"
msgstr ""
-#: ../lib/virt_mem.ml:382 ../lib/virt_mem.ml:447
+#: ../lib/virt_mem.ml:455 ../lib/virt_mem.ml:390
msgid "%s: use -W to define word size for this image"
msgstr ""
-#: ../lib/virt_mem.ml:256 ../lib/virt_mem.ml:258
+#: ../lib/virt_mem.ml:264 ../lib/virt_mem.ml:262
msgid "Connect to URI"
msgstr ""
-#: ../lib/virt_mem.ml:260
+#: ../lib/virt_mem.ml:266
msgid "Debug mode (default: false)"
msgstr ""
-#: ../lib/virt_mem.ml:264
+#: ../lib/virt_mem.ml:270
msgid "Display version and exit"
msgstr ""
-#: ../lib/virt_mem.ml:323
+#: ../lib/virt_mem.ml:331
msgid "NB: If you want to monitor a local Xen hypervisor, you usually need to be root"
msgstr ""
-#: ../lib/virt_mem.ml:248
+#: ../lib/virt_mem.ml:254
msgid "Set kernel architecture, endianness and word size"
msgstr ""
-#: ../lib/virt_mem.ml:250
+#: ../lib/virt_mem.ml:256
msgid "Set kernel endianness"
msgstr ""
-#: ../lib/virt_mem.ml:252
+#: ../lib/virt_mem.ml:258
msgid "Set kernel text address"
msgstr ""
-#: ../lib/virt_mem.ml:254
+#: ../lib/virt_mem.ml:260
msgid "Set kernel word size"
msgstr ""
-#: ../lib/virt_mem.ml:262
+#: ../lib/virt_mem.ml:268
msgid "Use saved kernel memory image"
msgstr ""
-#: ../lib/virt_mem.ml:139
+#: ../lib/virt_mem.ml:145
msgid "\\\n\n%s: %s\n\nDescription:\n%s\n\nOptions:"
msgstr ""
-#: ../lib/virt_mem.ml:119
-msgid "\\\n\nvirt-mem: Tools for providing information about virtual machines\n\nCurrently available tools include:\n%s\n\nGeneral usage is:\n <tool> [-options] [domains...]\n\nTo display extra help for a single tool, do:\n virt-mem help <tool>\n\nOptions:"
+#: ../lib/virt_mem.ml:125
+msgid "\\\n\nvirt-mem: Tools for providing information about virtual machines\n\nCurrently available tools include:\n%s\n\nGeneral usage is:\n <tool> [-options] [domains...]\n\nTo display extra help for a single tool, do:\n virt-mem --help <tool>\n\nOptions:"
msgstr ""
-#: ../dmesg/virt_dmesg.ml:76
+#: ../dmesg/virt_dmesg.ml:77
msgid "\\\nvirt-dmesg prints the kernel messages for virtual machines running\nunder libvirt. The output is similar to the ordinary dmesg command\nrun inside the virtual machine."
msgstr ""
-#: ../lib/virt_mem.ml:300
+#: ../lib/virt_mem.ml:308
msgid "\\\nvirt-mem: I could not work out which tool you are trying to run.\nUse 'virt-mem --help' for more help or read the manual page virt-mem(1)"
msgstr ""
-#: ../ps/virt_ps.ml:97
+#: ../ps/virt_ps.ml:66
msgid "\\\nvirt-ps prints a process listing for virtual machines running under\nlibvirt."
msgstr ""
msgid "\\\nvirt-uname prints the uname information such as OS version,\narchitecture and node name for virtual machines running under\nlibvirt."
msgstr ""
-#: ../dmesg/virt_dmesg.ml:75
+#: ../lib/virt_mem.ml:571
+msgid "could not read kernel symbols"
+msgstr ""
+
+#: ../lib/virt_mem.ml:573
+msgid "could not read kernel version"
+msgstr ""
+
+#: ../lib/virt_mem.ml:575
+msgid "could not read process table"
+msgstr ""
+
+#: ../dmesg/virt_dmesg.ml:76
msgid "display kernel messages"
msgstr ""
-#: ../ps/virt_ps.ml:96
+#: ../ps/virt_ps.ml:65
msgid "list processes in virtual machine"
msgstr ""
-#: ../lib/virt_mem.ml:171
+#: ../lib/virt_mem.ml:177
msgid "set_endian: %s: unknown endianness"
msgstr ""
-#: ../lib/virt_mem.ml:214
+#: ../lib/virt_mem.ml:220
msgid "set_text_addr: %s: incorrect number of parameters to -T option"
msgstr ""
-#: ../lib/virt_mem.ml:160
+#: ../lib/virt_mem.ml:166
msgid "set_wordsize: %s: unknown wordsize"
msgstr ""
msgid "uname command for virtual machines"
msgstr ""
-#: ../lib/virt_mem.ml:417
+#: ../lib/virt_mem.ml:425
msgid "virt-mem: error loading kernel memory: address out of range\nPossibly the '-T' command line parameter was used inconsistently."
msgstr ""
-#: ../lib/virt_mem.ml:434
+#: ../lib/virt_mem.ml:442
msgid "virt-mem: if -t given on command line, then no domain arguments should be listed"
msgstr ""
+#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: pl\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../ps/virt_ps.ml:40
-msgid "%s: %s: unknown kernel version\nTry a newer version of virt-mem, or if the guest is not from a\nsupported Linux distribution, see this page about adding support:\n http://et.redhat.com/~rjones/virt-mem/faq.html\\n"
-msgstr ""
-
-#: ../ps/virt_ps.ml:53
-msgid "%s: could not find init_task in kernel image\\n"
-msgstr ""
-
-#: ../dmesg/virt_dmesg.ml:72
+#: ../dmesg/virt_dmesg.ml:73
msgid "%s: could not find kernel log buffer in kernel image\\n"
msgstr ""
-#: ../ps/virt_ps.ml:35
-msgid "%s: could not guess kernel version\\n"
-msgstr ""
-
-#: ../lib/virt_mem.ml:352
+#: ../lib/virt_mem.ml:360
msgid "%s: domain is not running"
msgstr ""
msgid "%s: no system_utsname in kernel image\\n"
msgstr ""
-#: ../lib/virt_mem.ml:347
+#: ../lib/virt_mem.ml:355
msgid "%s: unknown domain (not a UUID, name or ID of any active domain)"
msgstr ""
-#: ../lib/virt_mem.ml:398 ../lib/virt_mem.ml:463
+#: ../lib/virt_mem.ml:471 ../lib/virt_mem.ml:406
msgid "%s: use -A to define architecture (i386/x86-64 only) for this image"
msgstr ""
-#: ../lib/virt_mem.ml:389 ../lib/virt_mem.ml:454
+#: ../lib/virt_mem.ml:462 ../lib/virt_mem.ml:397
msgid "%s: use -E to define endianness for this image"
msgstr ""
-#: ../lib/virt_mem.ml:404 ../lib/virt_mem.ml:467
+#: ../lib/virt_mem.ml:475 ../lib/virt_mem.ml:412
msgid "%s: use -T to define kernel load address for this image"
msgstr ""
-#: ../lib/virt_mem.ml:382 ../lib/virt_mem.ml:447
+#: ../lib/virt_mem.ml:455 ../lib/virt_mem.ml:390
msgid "%s: use -W to define word size for this image"
msgstr ""
-#: ../lib/virt_mem.ml:256 ../lib/virt_mem.ml:258
+#: ../lib/virt_mem.ml:264 ../lib/virt_mem.ml:262
msgid "Connect to URI"
msgstr ""
-#: ../lib/virt_mem.ml:260
+#: ../lib/virt_mem.ml:266
msgid "Debug mode (default: false)"
msgstr ""
-#: ../lib/virt_mem.ml:264
+#: ../lib/virt_mem.ml:270
msgid "Display version and exit"
msgstr "Wyświetl wersję i zakończ"
-#: ../lib/virt_mem.ml:323
+#: ../lib/virt_mem.ml:331
msgid "NB: If you want to monitor a local Xen hypervisor, you usually need to be root"
msgstr "NB: jeśli chcesz monitorować lokalnego nadzorcę Xena, zwykle musisz być rootem"
-#: ../lib/virt_mem.ml:248
+#: ../lib/virt_mem.ml:254
msgid "Set kernel architecture, endianness and word size"
msgstr ""
-#: ../lib/virt_mem.ml:250
+#: ../lib/virt_mem.ml:256
msgid "Set kernel endianness"
msgstr ""
-#: ../lib/virt_mem.ml:252
+#: ../lib/virt_mem.ml:258
msgid "Set kernel text address"
msgstr ""
-#: ../lib/virt_mem.ml:254
+#: ../lib/virt_mem.ml:260
msgid "Set kernel word size"
msgstr ""
-#: ../lib/virt_mem.ml:262
+#: ../lib/virt_mem.ml:268
msgid "Use saved kernel memory image"
msgstr ""
-#: ../lib/virt_mem.ml:139
+#: ../lib/virt_mem.ml:145
msgid "\\\n\n%s: %s\n\nDescription:\n%s\n\nOptions:"
msgstr ""
-#: ../lib/virt_mem.ml:119
-msgid "\\\n\nvirt-mem: Tools for providing information about virtual machines\n\nCurrently available tools include:\n%s\n\nGeneral usage is:\n <tool> [-options] [domains...]\n\nTo display extra help for a single tool, do:\n virt-mem help <tool>\n\nOptions:"
+#: ../lib/virt_mem.ml:125
+msgid "\\\n\nvirt-mem: Tools for providing information about virtual machines\n\nCurrently available tools include:\n%s\n\nGeneral usage is:\n <tool> [-options] [domains...]\n\nTo display extra help for a single tool, do:\n virt-mem --help <tool>\n\nOptions:"
msgstr ""
-#: ../dmesg/virt_dmesg.ml:76
+#: ../dmesg/virt_dmesg.ml:77
msgid "\\\nvirt-dmesg prints the kernel messages for virtual machines running\nunder libvirt. The output is similar to the ordinary dmesg command\nrun inside the virtual machine."
msgstr ""
-#: ../lib/virt_mem.ml:300
+#: ../lib/virt_mem.ml:308
msgid "\\\nvirt-mem: I could not work out which tool you are trying to run.\nUse 'virt-mem --help' for more help or read the manual page virt-mem(1)"
msgstr ""
-#: ../ps/virt_ps.ml:97
+#: ../ps/virt_ps.ml:66
msgid "\\\nvirt-ps prints a process listing for virtual machines running under\nlibvirt."
msgstr ""
msgid "\\\nvirt-uname prints the uname information such as OS version,\narchitecture and node name for virtual machines running under\nlibvirt."
msgstr ""
-#: ../dmesg/virt_dmesg.ml:75
+#: ../lib/virt_mem.ml:571
+msgid "could not read kernel symbols"
+msgstr ""
+
+#: ../lib/virt_mem.ml:573
+msgid "could not read kernel version"
+msgstr ""
+
+#: ../lib/virt_mem.ml:575
+msgid "could not read process table"
+msgstr ""
+
+#: ../dmesg/virt_dmesg.ml:76
msgid "display kernel messages"
msgstr ""
-#: ../ps/virt_ps.ml:96
+#: ../ps/virt_ps.ml:65
msgid "list processes in virtual machine"
msgstr ""
-#: ../lib/virt_mem.ml:171
+#: ../lib/virt_mem.ml:177
msgid "set_endian: %s: unknown endianness"
msgstr ""
-#: ../lib/virt_mem.ml:214
+#: ../lib/virt_mem.ml:220
msgid "set_text_addr: %s: incorrect number of parameters to -T option"
msgstr ""
-#: ../lib/virt_mem.ml:160
+#: ../lib/virt_mem.ml:166
msgid "set_wordsize: %s: unknown wordsize"
msgstr ""
msgid "uname command for virtual machines"
msgstr ""
-#: ../lib/virt_mem.ml:417
+#: ../lib/virt_mem.ml:425
msgid "virt-mem: error loading kernel memory: address out of range\nPossibly the '-T' command line parameter was used inconsistently."
msgstr ""
-#: ../lib/virt_mem.ml:434
+#: ../lib/virt_mem.ml:442
msgid "virt-mem: if -t given on command line, then no domain arguments should be listed"
msgstr ""
+#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: pt_BR\n"
"X-Poedit-Language: Portuguese\n"
"X-Poedit-Country: BRAZIL\n"
-#: ../ps/virt_ps.ml:40
-msgid "%s: %s: unknown kernel version\nTry a newer version of virt-mem, or if the guest is not from a\nsupported Linux distribution, see this page about adding support:\n http://et.redhat.com/~rjones/virt-mem/faq.html\\n"
-msgstr ""
-
-#: ../ps/virt_ps.ml:53
-msgid "%s: could not find init_task in kernel image\\n"
-msgstr ""
-
-#: ../dmesg/virt_dmesg.ml:72
+#: ../dmesg/virt_dmesg.ml:73
msgid "%s: could not find kernel log buffer in kernel image\\n"
msgstr ""
-#: ../ps/virt_ps.ml:35
-msgid "%s: could not guess kernel version\\n"
-msgstr ""
-
-#: ../lib/virt_mem.ml:352
+#: ../lib/virt_mem.ml:360
msgid "%s: domain is not running"
msgstr ""
msgid "%s: no system_utsname in kernel image\\n"
msgstr ""
-#: ../lib/virt_mem.ml:347
+#: ../lib/virt_mem.ml:355
msgid "%s: unknown domain (not a UUID, name or ID of any active domain)"
msgstr ""
-#: ../lib/virt_mem.ml:398 ../lib/virt_mem.ml:463
+#: ../lib/virt_mem.ml:471 ../lib/virt_mem.ml:406
msgid "%s: use -A to define architecture (i386/x86-64 only) for this image"
msgstr ""
-#: ../lib/virt_mem.ml:389 ../lib/virt_mem.ml:454
+#: ../lib/virt_mem.ml:462 ../lib/virt_mem.ml:397
msgid "%s: use -E to define endianness for this image"
msgstr ""
-#: ../lib/virt_mem.ml:404 ../lib/virt_mem.ml:467
+#: ../lib/virt_mem.ml:475 ../lib/virt_mem.ml:412
msgid "%s: use -T to define kernel load address for this image"
msgstr ""
-#: ../lib/virt_mem.ml:382 ../lib/virt_mem.ml:447
+#: ../lib/virt_mem.ml:455 ../lib/virt_mem.ml:390
msgid "%s: use -W to define word size for this image"
msgstr ""
-#: ../lib/virt_mem.ml:256 ../lib/virt_mem.ml:258
+#: ../lib/virt_mem.ml:264 ../lib/virt_mem.ml:262
msgid "Connect to URI"
msgstr ""
-#: ../lib/virt_mem.ml:260
+#: ../lib/virt_mem.ml:266
msgid "Debug mode (default: false)"
msgstr ""
-#: ../lib/virt_mem.ml:264
+#: ../lib/virt_mem.ml:270
msgid "Display version and exit"
msgstr "Exibe a versão e sai."
-#: ../lib/virt_mem.ml:323
+#: ../lib/virt_mem.ml:331
msgid "NB: If you want to monitor a local Xen hypervisor, you usually need to be root"
msgstr "NB: Se você quiser monitorar um hipervisor local do Xen, você precisa ser root."
-#: ../lib/virt_mem.ml:248
+#: ../lib/virt_mem.ml:254
msgid "Set kernel architecture, endianness and word size"
msgstr ""
-#: ../lib/virt_mem.ml:250
+#: ../lib/virt_mem.ml:256
msgid "Set kernel endianness"
msgstr ""
-#: ../lib/virt_mem.ml:252
+#: ../lib/virt_mem.ml:258
msgid "Set kernel text address"
msgstr ""
-#: ../lib/virt_mem.ml:254
+#: ../lib/virt_mem.ml:260
msgid "Set kernel word size"
msgstr ""
-#: ../lib/virt_mem.ml:262
+#: ../lib/virt_mem.ml:268
msgid "Use saved kernel memory image"
msgstr ""
-#: ../lib/virt_mem.ml:139
+#: ../lib/virt_mem.ml:145
msgid "\\\n\n%s: %s\n\nDescription:\n%s\n\nOptions:"
msgstr ""
-#: ../lib/virt_mem.ml:119
-msgid "\\\n\nvirt-mem: Tools for providing information about virtual machines\n\nCurrently available tools include:\n%s\n\nGeneral usage is:\n <tool> [-options] [domains...]\n\nTo display extra help for a single tool, do:\n virt-mem help <tool>\n\nOptions:"
+#: ../lib/virt_mem.ml:125
+msgid "\\\n\nvirt-mem: Tools for providing information about virtual machines\n\nCurrently available tools include:\n%s\n\nGeneral usage is:\n <tool> [-options] [domains...]\n\nTo display extra help for a single tool, do:\n virt-mem --help <tool>\n\nOptions:"
msgstr ""
-#: ../dmesg/virt_dmesg.ml:76
+#: ../dmesg/virt_dmesg.ml:77
msgid "\\\nvirt-dmesg prints the kernel messages for virtual machines running\nunder libvirt. The output is similar to the ordinary dmesg command\nrun inside the virtual machine."
msgstr ""
-#: ../lib/virt_mem.ml:300
+#: ../lib/virt_mem.ml:308
msgid "\\\nvirt-mem: I could not work out which tool you are trying to run.\nUse 'virt-mem --help' for more help or read the manual page virt-mem(1)"
msgstr ""
-#: ../ps/virt_ps.ml:97
+#: ../ps/virt_ps.ml:66
msgid "\\\nvirt-ps prints a process listing for virtual machines running under\nlibvirt."
msgstr ""
msgid "\\\nvirt-uname prints the uname information such as OS version,\narchitecture and node name for virtual machines running under\nlibvirt."
msgstr ""
-#: ../dmesg/virt_dmesg.ml:75
+#: ../lib/virt_mem.ml:571
+msgid "could not read kernel symbols"
+msgstr ""
+
+#: ../lib/virt_mem.ml:573
+msgid "could not read kernel version"
+msgstr ""
+
+#: ../lib/virt_mem.ml:575
+msgid "could not read process table"
+msgstr ""
+
+#: ../dmesg/virt_dmesg.ml:76
msgid "display kernel messages"
msgstr ""
-#: ../ps/virt_ps.ml:96
+#: ../ps/virt_ps.ml:65
msgid "list processes in virtual machine"
msgstr ""
-#: ../lib/virt_mem.ml:171
+#: ../lib/virt_mem.ml:177
msgid "set_endian: %s: unknown endianness"
msgstr ""
-#: ../lib/virt_mem.ml:214
+#: ../lib/virt_mem.ml:220
msgid "set_text_addr: %s: incorrect number of parameters to -T option"
msgstr ""
-#: ../lib/virt_mem.ml:160
+#: ../lib/virt_mem.ml:166
msgid "set_wordsize: %s: unknown wordsize"
msgstr ""
msgid "uname command for virtual machines"
msgstr ""
-#: ../lib/virt_mem.ml:417
+#: ../lib/virt_mem.ml:425
msgid "virt-mem: error loading kernel memory: address out of range\nPossibly the '-T' command line parameter was used inconsistently."
msgstr ""
-#: ../lib/virt_mem.ml:434
+#: ../lib/virt_mem.ml:442
msgid "virt-mem: if -t given on command line, then no domain arguments should be listed"
msgstr ""
virt_ps.cmo: ../lib/virt_mem_utils.cmo ../lib/virt_mem_types.cmi \
- ../lib/virt_mem_mmap.cmi ../lib/virt_mem_gettext.cmo ../lib/virt_mem.cmi \
+ ../lib/virt_mem_gettext.cmo ../lib/virt_mem.cmi \
../lib/kernel_task_struct.cmi
virt_ps.cmx: ../lib/virt_mem_utils.cmx ../lib/virt_mem_types.cmx \
- ../lib/virt_mem_mmap.cmx ../lib/virt_mem_gettext.cmx ../lib/virt_mem.cmx \
+ ../lib/virt_mem_gettext.cmx ../lib/virt_mem.cmx \
../lib/kernel_task_struct.cmx
open Kernel_task_struct
-let run debug (image, ksymmap, utsname) =
- try
- let { domname = domname } = image in
-
- let kernel_version =
- match utsname with
- | None ->
- eprintf (f_"%s: could not guess kernel version\n") domname;
- raise Exit
- | Some { kernel_release = v } -> v in
-
- if not (task_struct_known kernel_version) then (
- eprintf (f_"%s: %s: unknown kernel version
-Try a newer version of virt-mem, or if the guest is not from a
-supported Linux distribution, see this page about adding support:
- http://et.redhat.com/~rjones/virt-mem/faq.html\n") domname kernel_version;
- raise Exit
- );
-
- let task_struct_size = task_struct_size kernel_version in
-
- let init_task, init_task_addr =
- let init_task_addr =
- try Ksymmap.find "init_task" ksymmap
- with Not_found ->
- eprintf (f_"%s: could not find init_task in kernel image\n") domname;
- raise Exit in
- let init_task =
- get_task_struct kernel_version image.mem init_task_addr in
- init_task, init_task_addr in
-
- (* Starting at init_task, navigate through the linked list of
- * tasks (through tasks.next). Grab each task_struct as we go.
- *)
- let tasks, image =
- let rec loop image acc task =
- let next = task.task_struct_tasks'next in
- if next <> init_task_addr then (
- let mapped =
- Virt_mem_mmap.is_mapped_range image.mem next task_struct_size in
- let image =
- if not mapped then load_memory image next task_struct_size
- else image in
- let task = get_task_struct kernel_version image.mem next in
- let task = {
- task with
- task_struct_comm = truncate_c_string task.task_struct_comm
- } in
- let acc = task :: acc in
- loop image acc task
- ) else
- acc, image
- in
- loop image [] init_task in
-
- (* Sort tasks by PID. *)
- let cmp { task_struct_pid = p1 } { task_struct_pid = p2 } = compare p1 p2 in
- let tasks = List.sort cmp tasks in
-
- printf " PID STAT COMMAND\n";
-
- List.iter (
- fun task ->
- printf "%5Ld %s\n" task.task_struct_pid task.task_struct_comm
- ) tasks
-
- with Exit -> ()
+let run debug { domname = domname; mem = mem }
+ { utsname = utsname; tasks = tasks } =
+ let utsname = Option.get utsname in
+ let kernel_version = utsname.kernel_release in
+ let init_task_addr = Option.get tasks in
+
+ (* Starting at init_task, navigate through the linked list of
+ * tasks (through tasks.next). The main program has already made
+ * sure these are mapped into memory.
+ *)
+ let tasks =
+ let rec loop acc task =
+ let next = task.task_struct_tasks'next in
+ if next <> init_task_addr then (
+ let task = get_task_struct kernel_version mem next in
+ let task = {
+ task with
+ task_struct_comm = truncate_c_string task.task_struct_comm
+ } in
+ let acc = task :: acc in
+ loop acc task
+ ) else
+ acc
+ in
+ loop [] (get_task_struct kernel_version mem init_task_addr) in
+
+ (* Sort tasks by PID. *)
+ let cmp { task_struct_pid = p1 } { task_struct_pid = p2 } = compare p1 p2 in
+ let tasks = List.sort cmp tasks in
+
+ printf " PID STAT COMMAND\n";
+
+ List.iter (
+ fun task ->
+ printf "%5Ld %s\n" task.task_struct_pid task.task_struct_comm
+ ) tasks
let summary = s_"list processes in virtual machine"
let description = s_"\
virt-ps prints a process listing for virtual machines running under
libvirt."
-let () = Virt_mem.register "ps" summary description ~run
+let () =
+ Virt_mem.register "ps" summary description
+ ~needs_utsname:true ~needs_tasks:true ~run
open Virt_mem_utils
open Virt_mem_types
-let run debug ({ domname = domname }, _, utsname) =
+let run debug { domname = domname } { utsname = utsname } =
match utsname with
| Some u ->
printf "%s: %s %s %s %s %s %s\n"
architecture and node name for virtual machines running under
libvirt."
-let () = Virt_mem.register "uname" summary description ~run
+let () = Virt_mem.register "uname" summary description ~needs_utsname:true ~run
.\" ========================================================================
.\"
.IX Title "VIRT-MEM 1"
-.TH VIRT-MEM 1 "2008-07-24" "virt-mem-0.2.7" "Virtualization Support"
+.TH VIRT-MEM 1 "2008-08-07" "virt-mem-0.2.9" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.PP
virt\-dmesg \- print kernel messages for virtual machines
.PP
+virt\-ps \- list processes for virtual machines
+.PP
virt\-mem \- tool with additional information output
.SH "SUMMARY"
.IX Header "SUMMARY"
.PP
virt-dmesg [\-options] [domains...]
.PP
+virt-ps [\-options] [domains...]
+.PP
virt-mem uname [...]
.PP
virt-mem dmesg [...]
.PP
+virt-mem ps [...]
+.PP
virt-mem [\-options]
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
virt-dmesg - print kernel messages for virtual machines
+virt-ps - list processes for virtual machines
+
virt-mem - tool with additional information output
=head1 SUMMARY
virt-dmesg [-options] [domains...]
+virt-ps [-options] [domains...]
+
virt-mem uname [...]
virt-mem dmesg [...]
+virt-mem ps [...]
+
virt-mem [-options]
=head1 DESCRIPTION
virt-dmesg - print kernel messages for virtual machines
+ virt-ps - list processes for virtual machines
+
virt-mem - tool with additional information output
SUMMARY
virt-dmesg [-options] [domains...]
+ virt-ps [-options] [domains...]
+
virt-mem uname [...]
virt-mem dmesg [...]
+ virt-mem ps [...]
+
virt-mem [-options]
DESCRIPTION