ProcfsSourcemodule Blocking_IO :
Procfs_intf.IO
with type 'a io := 'a
and type file_descr = Core_unix.File_descr.tmodule Make
(IO : Procfs_intf.IO) :
Procfs_intf.S with type 'a io := 'a IO.io and type file_descr = IO.file_descrinclude Procfs_intf.S
with type 'a io := 'a
and type file_descr = Core_unix.File_descr.tOptions when returning process details: load_tasks (default true) indicates that individual task (thread) info should be loaded into task_stats.
get_all_procs returns a list of all processes on the system.
get_pid_ancestry_unsafe returns a list of processes, with the given PID at the head following parents to the tail (typically the init task). This is inherently racey, as a process could reparent (or seemingly reparent) mid-walk.
with_pid returns a single process that matches the given pid. If there is no such process, with_pid returns None.
with_pid_exn is like with_pid, except it raises Not_found instead of returning None.
with_uid uid returns all processes owned by uid.
pgrep f returns all processes for which f is true.
val pkill :
signal:Core.Signal.t ->
(Process.t -> bool) ->
(Core.Pid.t * (unit, Core_unix.Error.t) Core.Result.t) listpkill ~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 calls with_uid after looking up the user's uid
with_username_exn is like with_username, except it raises instead of returning None.
jiffies_per_second. 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://en.wikipedia.org/wiki/Jiffy_(time)
jiffies_per_second_exn is like jiffies_per_second, except it raises instead of returning None.
meminfo queries /proc/meminfo and fills out Meminfo.t. All values in bytes.
meminfo_exn is like meminfo, except it raises instead of returning None.
loadavg_exn is like loadavg, except it raises instead of returning None.
diskstats queries /proc/diskstats and returns a list of Diskstat.t.
diskstats_exn is like diskstats except it raises instead of returning None.
This is a helper function to get the list of processes holding an advisory flock-style lock on a given path.