... which are limited by RLIMIT.
This was extremely useful for me when I looked at the pipebuf limits bugs.
[No manpages ATM, will write after feedback on the interfaces. Overall, it is trivial and clear IMO].
Differential D46747
getrlimusage(2): a syscall and a tool to query current resource usage kib on Sun, Sep 22, 1:11 PM. Authored by
Details
Diff Detail
Event TimelineComment Actions IMO it would be better to add this to procstat rlimit output, rather than adding a new utility. Why not implement this interface with a sysctl, similar to sysctl_kern_proc_rlimit()? Comment Actions This is somewhat ortogonal. The syscall is supposed to be used by the process itself to query its usage of the resources. Same as getrlimit(2) queries the limit, despite the presence of sysctl. For instance, this syscall might finally give the answer to question how much usable anon memory can be allocated, assuming the limits are enforced. Comment Actions But it takes a PID as a parameter. Having a simple syscall interface is nice I suppose, IMO it is nice to follow the precedent of:
Comment Actions Remove pid from the syscall args. Any advice how to properly use libxo would be appreciated. |