package uwt

  1. Overview
  2. Docs
type timeval = {
  1. sec : int;
  2. usec : int;
}
type rusage = {
  1. utime : timeval;
  2. stime : timeval;
  3. maxrss : int64;
  4. ixrss : int64;
  5. idrss : int64;
  6. isrss : int64;
  7. minflt : int64;
  8. majflt : int64;
  9. nswap : int64;
  10. inblock : int64;
  11. outblock : int64;
  12. msgsnd : int64;
  13. msgrcv : int64;
  14. nsignals : int64;
  15. nvcsw : int64;
  16. nivcsw : int64;
}
type cpu_times = {
  1. user : int64;
  2. nice : int64;
  3. sys : int64;
  4. idle : int64;
  5. irq : int64;
}
type cpu_info = {
  1. model : string;
  2. speed : int;
  3. cpu_times : cpu_times;
}
type interface_address = {
  1. name : string;
  2. phys_addr : string;
  3. is_internal : bool;
  4. address : sockaddr;
  5. netmask : sockaddr;
}
type handle_type =
  1. | File
  2. | Tty
  3. | Pipe
  4. | Tcp
  5. | Udp
  6. | Unknown
val guess_handle : file -> handle_type
val resident_set_memory : unit -> int64 result
val resident_set_memory_exn : unit -> int64
val uptime : unit -> float result
val uptime_exn : unit -> float
val getrusage : unit -> rusage result
val getrusage_exn : unit -> rusage
val cpu_info : unit -> cpu_info array result
val cpu_info_exn : unit -> cpu_info array
val interface_addresses : unit -> interface_address array result
val interface_addresses_exn : unit -> interface_address array
val load_avg : unit -> float * float * float
val ip4_addr : string -> int -> sockaddr result
val ip4_addr_exn : string -> int -> sockaddr
val ip4_name : sockaddr -> string result
val ip4_name_exn : sockaddr -> string
val ip6_addr : string -> int -> sockaddr result
val ip6_addr_exn : string -> int -> sockaddr
val ip6_name : sockaddr -> string result
val ip6_name_exn : sockaddr -> string
val get_total_memory : unit -> int64
val hrtime : unit -> int64
type version = {
  1. major : int;
  2. minor : int;
  3. patch : int;
}
val version : unit -> version
val version_raw : unit -> int
val version_string : unit -> string
val os_homedir : unit -> string result
val exepath : unit -> string result

like Sys.executable_name , but utf-8 encoded under windows and perhaps more reliable under niche operating systems

OCaml

Innovation. Community. Security.