From owner-freebsd-bugs@FreeBSD.ORG Sat Nov 5 16:10:13 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E225106564A for ; Sat, 5 Nov 2011 16:10:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4DD708FC13 for ; Sat, 5 Nov 2011 16:10:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id pA5GAD39010353 for ; Sat, 5 Nov 2011 16:10:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id pA5GADV9010352; Sat, 5 Nov 2011 16:10:13 GMT (envelope-from gnats) Date: Sat, 5 Nov 2011 16:10:13 GMT Message-Id: <201111051610.pA5GADV9010352@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Mikolaj Golub Cc: Subject: Re: bin/161257: procstat(1): procstat should grow a -l flag to display resource limits X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mikolaj Golub List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2011 16:10:13 -0000 The following reply was made to PR bin/161257; it has been noted by GNATS. From: Mikolaj Golub To: Kostik Belousov Cc: John Baldwin , bug-followup@freebsd.org, Robert Watson Subject: Re: bin/161257: procstat(1): procstat should grow a -l flag to display resource limits Date: Sat, 05 Nov 2011 18:06:10 +0200 On Sat, 5 Nov 2011 16:08:39 +0200 Kostik Belousov wrote: KB> On Sat, Nov 05, 2011 at 02:45:03PM +0200, Mikolaj Golub wrote: >> Hi, >> >> Here is the patch that does 'procstat -l'. >> >> Note, I had to change rlimit_ident[] from char * to const char * to make >> procstat compile without warnings. KB> Commit it as a separate change. Also, I suggest you to commit the sysctl KB> kern.proc. oids in advance to avoid conflicts with argv/env patches. KB> You just cannot stop ? KB> The intendation in the sysctl_kern_proc_rlimit local variables block KB> is inconsistent. Err, it is inconsistent in the whole function. KB> Please note that we grow the count of resources supported, e.g. KB> we got RLIMIT_NPTS and RLIMIT_SWAP for 8.0. At least a comment near KB> RLIM_NLIMITS to point anybody adding a new resource, to the kern.proc.rlimit KB> handler, is useful. For the same reason, you can restructure the handler KB> to honour the sysctl oldsize (but this is not needed right now). KB> Not related to your patch: it seems that lim_fork() wants an assert KB> that processes locks are held. Also you can add a blank line after '{' KB> there too. KB> For the output format, I much prefer to have current and maximum KB> values be tab-separated, instead of slash. Thank you for your comments. Concerning this last one, all limits for a process are printed on the same line, as it is done for other stats (to have it readable when procstat is run with -a flag). So as for me having current and maximum values be tab-separated will make output less readable. Don't you agree? -- Mikolaj Golub