From owner-freebsd-bugs@FreeBSD.ORG Sat Nov 5 14:50:12 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 9E0CA106564A for ; Sat, 5 Nov 2011 14:50:12 +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 79E318FC14 for ; Sat, 5 Nov 2011 14:50:12 +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 pA5EoCJX035819 for ; Sat, 5 Nov 2011 14:50:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id pA5EoCC3035818; Sat, 5 Nov 2011 14:50:12 GMT (envelope-from gnats) Date: Sat, 5 Nov 2011 14:50:12 GMT Message-Id: <201111051450.pA5EoCC3035818@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Kostik Belousov 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: Kostik Belousov List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2011 14:50:12 -0000 The following reply was made to PR bin/161257; it has been noted by GNATS. From: Kostik Belousov To: Mikolaj Golub 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, 5 Nov 2011 16:08:39 +0200 --8mza6Y2scN2dXhu9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 05, 2011 at 02:45:03PM +0200, Mikolaj Golub wrote: > Hi, >=20 > Here is the patch that does 'procstat -l'.=20 >=20 > Note, I had to change rlimit_ident[] from char * to const char * to make > procstat compile without warnings. Commit it as a separate change. Also, I suggest you to commit the sysctl kern.proc. oids in advance to avoid conflicts with argv/env patches. You just cannot stop ? The intendation in the sysctl_kern_proc_rlimit local variables block=20 is inconsistent. Err, it is inconsistent in the whole function. Please note that we grow the count of resources supported, e.g. we got RLIMIT_NPTS and RLIMIT_SWAP for 8.0. At least a comment near RLIM_NLIMITS to point anybody adding a new resource, to the kern.proc.rlimit handler, is useful. For the same reason, you can restructure the handler to honour the sysctl oldsize (but this is not needed right now). Not related to your patch: it seems that lim_fork() wants an assert that processes locks are held. Also you can add a blank line after '{' there too. For the output format, I much prefer to have current and maximum values be tab-separated, instead of slash. --8mza6Y2scN2dXhu9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEUEARECAAYFAk61Q2YACgkQC3+MBN1Mb4gJxgCY/s7sooJttBO9LIlmURRXpsWd xgCfQoy09PMpiWZQ+QsGPu2nFQ81+nY= =UH8N -----END PGP SIGNATURE----- --8mza6Y2scN2dXhu9--