1 (** Memory info for virtual domains. *)
2 (* Memory info for virtual domains.
3 (C) Copyright 2008 Richard W.M. Jones, Red Hat Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 ?needs_utsname:bool ->
25 ?needs_everything:bool ->
26 run:(bool -> Virt_mem_types.image -> Virt_mem_types.kdata -> unit) ->
28 ?extra_args:(Arg.key * Arg.spec * Arg.doc) list ->
29 ?argcheck:(bool -> unit) ->
30 string -> string -> Arg.usage_msg ->
32 (** Tools register themselves with this call.
34 The required parameters are:
35 - tool name (eg. "uname")
39 The boolean parameters specify what kernel structures the
40 tool needs before it can run. The main program will read
41 these structures in before calling [~run].
42 - [~needs_ksyms:true] if kernel symbols are needed
43 - [~needs_utsname:true] if kernel version (utsname) is needed
44 - [~needs_task_struct:true] if all task_struct (processes) are needed
45 - [~needs_everything:true] if the tool requires as much as
46 possible (but will not fail if we cannot determine everything)
48 The [~run] function is the tool's run function. This function
49 is run once for each separate domain. It may throw any exception,
50 which is printed out, but does not abort the program. (If for
51 some reason you need to abort the whole program, call [exit].)
53 Pass [~external_cmd:false] if this tool doesn't have an
54 external 'virt-tool' link.
56 Pass [~extra_args:...] if this tool needs extra command
59 Pass [~argcheck:...] so that the tool can do any additional
60 parameter checks needed (eg. for [~extra_args]).
63 val main : unit -> unit
64 (** Entry point for the combined virt-mem executable. *)