1 (* 'top'-like tool for libvirt domains.
2 * $Id: virt_top_csv.ml,v 1.1 2007/08/23 11:09:19 rjones Exp $
4 * This file contains all code which requires CSV support.
9 module C = Libvirt.Connect
10 module D = Libvirt.Domain
11 module N = Libvirt.Network
13 (* Output channel, or None if CSV output not enabled. *)
14 let chan = ref None ;;
18 chan := Some (open_out filename) ;;
23 | None -> () (* CSV output not enabled. *)
25 Csv.save_out chan [row];
26 (* Flush the output to the file immediately because we don't
27 * explicitly close this file.