Date: Sat, 5 Nov 2011 14:50:12 GMT From: Kostik Belousov <kostikbel@gmail.com> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/161257: procstat(1): procstat should grow a -l flag to display resource limits Message-ID: <201111051450.pA5EoCC3035818@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/161257; it has been noted by GNATS. From: Kostik Belousov <kostikbel@gmail.com> To: Mikolaj Golub <trociny@freebsd.org> Cc: John Baldwin <jhb@freebsd.org>, bug-followup@freebsd.org, Robert Watson <rwatson@freebsd.org> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111051450.pA5EoCC3035818>