Tally_rusageSourcev pid measures the resource usage (via sysctl ctl_kern.kern_proc.kern_proc_pid on FreeBSD, /proc/<pid>/stat and /proc/<pid>/status on Linux) and reports the counters.
type ru = {utime : int;user time in microseconds
*)stime : int;system time in microseconds
*)maxrss : int;maximum resident set size in kilobytes
*)ixrss : int;integral shared text memory size in kilobytes * ticks-of-execution, only implemented on FreeBSD
*)idrss : int;integral unshared data size in kilobytes * ticks-of-execution, only implemented on FreeBSD
*)isrss : int;integral unshared stack size in kilobytes * ticks-of-execution, only implemented on FreeBSD
*)minflt : int;page reclaims
*)majflt : int;page faults
*)nswap : int;number of times the process was swapped in
*)inblock : int;amount of block input operations, only implemented on FreeBSD
*)outblock : int;amount of block output operations, only implemented on FreeBSD
*)msgsnd : int;number of IPC messages sent, only implemented on FreeBSD
*)msgrcv : int;number of IPC messages received, only implemented on FreeBSD
*)nsignals : int;number of signals delivered, only implemented on FreeBSD
*)nvcsw : int;number of voluntary context switches
*)nivcsw : int;number of involuntary context switches
*)vsize : int;virtual size in bytes
*)rss : int;resident set size before last swap
*)tsize : int;text size in pages
*)dsize : int;data size in pages
*)ssize : int;stack size in pages
*)runtime : int;real time in microseconds
*)cow : int;number of copy-on-write faults, only implemented on FreeBSD
*)start : int;starting time in microseconds
*)}The type of memory usage.
rusage pid is the resource usage of pid or an error.