printf "%s\n" s
let print_xen_physinfo ~xc =
+ let string_of_cap_flag flag =
+ match flag with
+ | Xc.CAP_HVM -> "hvm"
+ | Xc.CAP_DirectIO -> "directio"
+ in
let physinfo = Xc.physinfo xc in
let totalmib = Xc.pages_to_mib (Int64.of_nativeint physinfo.Xc.total_pages)
and freemib = Xc.pages_to_mib (Int64.of_nativeint physinfo.Xc.free_pages)
printf "cpu_khz = %d\n" physinfo.Xc.cpu_khz;
printf "total_pages = %s (%Ld Mb)\n" (Nativeint.to_string physinfo.Xc.total_pages) totalmib;
printf "free_pages = %s (%Ld Mb)\n" (Nativeint.to_string physinfo.Xc.free_pages) freemib;
- printf "scrub_pages = %s (%Ld Mb)\n" (Nativeint.to_string physinfo.Xc.scrub_pages) scrubmib
+ printf "scrub_pages = %s (%Ld Mb)\n" (Nativeint.to_string physinfo.Xc.scrub_pages) scrubmib;
+ printf "capabilities = %s\n" (String.concat " " (List.map string_of_cap_flag physinfo.Xc.capabilities));
+ ()
let print_pcpus_info ~xc =
let physinfo = Xc.physinfo xc in