Report current memory use to XenStore

This commit is contained in:
Thomas Leonard 2016-01-02 15:59:59 +00:00
parent 425ba26286
commit f1ed6ffdd8
3 changed files with 44 additions and 5 deletions

View file

@ -61,6 +61,8 @@ module Main (Clock : V1.CLOCK) = struct
let shutdown_rq = OS.Lifecycle.await_shutdown () >>= fun (`Poweroff | `Reboot) -> return () in
(* Set up networking *)
let net_listener = network qubesDB in
(* Report memory usage to XenStore *)
Memory_pressure.init ();
(* Run until something fails or we get a shutdown request. *)
Lwt.choose [agent_listener; net_listener; shutdown_rq] >>= fun () ->
(* Give the console daemon time to show any final log messages. *)