Module Procfs


module Procfs: sig .. end
Process and system stats

type bigint = Big_int.big_int 

type stat = {
   comm : string; (*The filename of the executable*)
   state : char;
   ppid : int;
   pgrp : int;
   session : int;
   tty_nr : int;
   tpgid : int;
   flags : bigint;
   minflt : bigint;
   cminflt : bigint;
   majflt : bigint;
   cmajflt : bigint;
   utime : bigint;
   stime : bigint;
   cutime : bigint;
   cstime : bigint;
   priority : bigint;
   nice : bigint;
   unused : bigint;
   itrealvalue : bigint;
   starttime : bigint;
   vsize : bigint;
   rss : bigint;
   rlim : bigint;
   startcode : bigint;
   endcode : bigint;
   startstack : bigint;
   kstkesp : bigint;
   signal : bigint;
   blocked : bigint;
   sigignore : bigint;
   sigcatch : bigint;
   wchan : bigint;
   nswap : bigint;
   cnswap : bigint;
   exit_signal : int;
   processor : int;
   rt_priority : bigint;
   policy : bigint;
}
type statm = {
   size : bigint;
   resident : bigint;
   share : bigint;
   text : bigint;
   lib : bigint;
   data : bigint;
   dt : bigint;
}
type status = {
   uid : int;
   euid : int;
   suid : int;
   fsuid : int;
}
type process = {
   pid : int;
   cmdline : string;
   cwd : string option;
   environ : string option;
   exe : string option;
   root : string option;
   stat : stat;
   statm : statm;
   status : status;
   top_command : string;
}
val get_all_procs : unit -> process list
get_all_procs returns a process list
val with_pid : int -> process
val with_uid : int -> process list
val with_username : string -> process list
val hertz : float
val memtotal : int