Posix_resourceHigh-level API to <sys/resource.h>. See: sys/resource.h for details on data structures and functions.
type rusage = {ru_utime : Posix_time2.Timeval.t;User CPU time used
*)ru_stime : Posix_time2.Timeval.t;System CPU time used
*)ru_maxrss : int64;Maximum resident set size
*)ru_ixrss : int64;Integral shared memory size
*)ru_idrss : int64;Integral unshared data size
*)ru_isrss : int64;Integral unshared stack size
*)ru_minflt : int64;Page reclaims (soft page faults)
*)ru_majflt : int64;Page faults (hard page faults)
*)ru_nswap : int64;Swaps
*)ru_inblock : int64;Block input operations
*)ru_oublock : int64;Block output operations
*)ru_msgsnd : int64;IPC messages sent
*)ru_msgrcv : int64;IPC messages received
*)ru_nsignals : int64;Signals received
*)ru_nvcsw : int64;Voluntary context switches
*)ru_nivcsw : int64;Involuntary context switches
*)}val getrlimit : int -> rlimitgetrlimit resource returns the current resource limits for resource.
val setrlimit : int -> rlimit -> unitsetrlimit resource limits sets the resource limits for resource.
val getrusage : int -> rusagegetrusage who returns resource usage statistics. who should be rusage_self or rusage_children.
getpriority which who returns the priority of process, process group, or user. which should be prio_process, prio_pgrp, or prio_user.