Process and system stats
get_all_procs
returns a list of all processes on the system
with_uid uid
returns all processes owned by uid
pkill ~signal f
sends the signal to all processes for which f returns true. It
returns the list of processes that were signaled, and the resulting errors if any.
with_username_exn user
calls with_uid after looking up the user's uid
with_username user
calls with_uid after looking up the user's uid
jiffies_per_second_exn
. A jiffy "is one tick of the system timer interrupt. It is
not an absolute time interval unit, since its duration depends on the clock interrupt
frequency of the particular hardware platform."
Further reading: https://secure.wikimedia.org/wikipedia/en/wiki/Jiffy_(time)
meminfo_exn
queries /proc/meminfo and fills out Meminfo.t. All values in bytes.
loadavg_exn
parses /proc/loadavg.