On Mon, 13 Aug 2007 10:00:44 EDT, Neil Horman said: > Hey there- > Currently, there exists no method for a process to query the resource > limits of another process. They can be inferred via some mechanisms but they > cannot be explicitly determined. Given that this information can be usefull to > know during the debugging of an application, I've written this patch which > exports all of a processes limits via /proc/<pid>/limits. Tested successfully > by myself on x86 on top of 2.6.23-rc2-mm1. > /************************************************************************/ > /* Here the fs part begins */ > /************************************************************************/ > @@ -2017,6 +2080,7 @@ static const struct pid_entry tgid_base_stuff[] = { > INF("environ", S_IRUSR, pid_environ), > INF("auxv", S_IRUSR, pid_auxv), > INF("status", S_IRUGO, pid_status), > + INF("limits", S_IRUGO, pid_limits), Any takers for S_IRUSR instead? Either that, or lay out the use case for making it S_IRUGO. (I'm OK on it being world-visible *if* there's a good and sane reason for it) > #ifdef CONFIG_SCHED_DEBUG > REG("sched", S_IRUGO|S_IWUSR, pid_sched), > #endif > @@ -2310,6 +2374,7 @@ static const struct pid_entry tid_base_stuff[] = { > INF("environ", S_IRUSR, pid_environ), > INF("auxv", S_IRUSR, pid_auxv), > INF("status", S_IRUGO, pid_status), > + INF("limits", S_IRUGO, pid_limits), Here too.
Attachment:
pgpSVFRgosFJa.pgp
Description: PGP signature
- Follow-Ups:
- References:
- [PATCH]: proc: export a processes resource limits via proc/<pid>
- From: Neil Horman <[email protected]>
- [PATCH]: proc: export a processes resource limits via proc/<pid>
- Prev by Date: Re: 2.6.22-rc: regression: no irda0 interface (2.6.21 was OK), smsc does not find chip
- Next by Date: [PATCH] USB-Core, Kernel 2.6.22.2
- Previous by thread: Re: [PATCH]: proc: export a processes resource limits via proc/<pid>
- Next by thread: Re: [PATCH]: proc: export a processes resource limits via proc/<pid>
- Index(es):