lkml.org 
[lkml]   [2008]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Add rlimits to /proc/<PID>/status
From
Date
On Fri, 2008-05-30 at 22:11 +0200, Clifford Wolf wrote:
> Signed-off-by: Clifford Wolf <clifford@clifford.at>
> ---
> fs/proc/array.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 57 insertions(+), 0 deletions(-)
>
> diff --git a/fs/proc/array.c b/fs/proc/array.c
> index 9e3b8c3..3cb2ad3 100644
> --- a/fs/proc/array.c
> +++ b/fs/proc/array.c
> @@ -242,6 +242,62 @@ static void collect_sigign_sigcatch(struct task_struct *p, sigset_t *ign,
> }
> }
>
> +static const char *rlim_names[RLIM_NLIMITS] = {
> + [RLIMIT_CPU] = "CPU",
> + [RLIMIT_FSIZE] = "FSize",
> + [RLIMIT_DATA] = "Data",
> + [RLIMIT_STACK] = "Stack",
> + [RLIMIT_CORE] = "Core",
> + [RLIMIT_RSS] = "RSS",
> + [RLIMIT_NPROC] = "NProc",
> + [RLIMIT_NOFILE] = "NoFile",
> + [RLIMIT_MEMLOCK] = "MemLock",
> + [RLIMIT_AS] = "AddrSpace",
> + [RLIMIT_LOCKS] = "Locks",
> + [RLIMIT_SIGPENDING] = "SigPending",
> + [RLIMIT_MSGQUEUE] = "MsgQueue",
> + [RLIMIT_NICE] = "Nice",
> + [RLIMIT_RTPRIO] = "RTPrio",
> + [RLIMIT_RTTIME] = "RTTime"
> +};

fs/proc/base.c already has an array with strings in it



\
 
 \ /
  Last update: 2008-05-30 23:49    [W:0.091 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site