1 The code is structured into these files:
3 virt_top_utils.mli / virt_top_utils.ml
5 String functions and other small utility functions. This is
6 included directly into virt_top.ml.
8 virt_top.mli / virt_top.ml
10 This is the virt-top program.
12 The two interesting functions are called 'collect' and 'redraw'.
14 'collect' collects all the information about domains, etc.
16 'redraw' updates the display on each frame.
18 Another interesting function is 'start_up' which handles all
19 start-up stuff, eg. command line arguments, connecting to the
20 hypervisor, enabling curses.
22 The function 'main_loop' runs the main loop and has sub-functions
23 to deal with keypresses, help screens and so on.
27 Any code which needs the optional xml-light library goes
28 in here. Mainly for parsing domain XML descriptions to get
29 the list of block devices and network interfaces.
31 The reason for having it in a separate file is so that we
32 don't depend on xml-light.
36 Any code which needs the optional ocaml-csv library goes
37 in here. This implements the --csv command line option.
41 Any code which needs the optional ocaml-calendar library
42 goes in here. This implements the --end-time command line
47 This is just a small bit of code to glue whatever modules
48 (Virt_top + Virt_top_xml? + Virt_top_csv?) together.
50 The man-page is generated from the single file:
54 which generates (using perldoc) the following: