Date: Tue, 15 Jan 2013 00:44:42 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: John Baldwin <jhb@freebsd.org> Cc: FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: [PATCH] Add rusage reporting to procstat Message-ID: <20130114224442.GO2561@kib.kiev.ua> In-Reply-To: <201301141639.17783.jhb@freebsd.org> References: <201301141639.17783.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--PkntWmqUzlIrpeQX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 14, 2013 at 04:39:17PM -0500, John Baldwin wrote: > This patch adds a new -r flag to dump the resource usage information (wha= t you=20 > would get from getrusage() or wait()) for a given process. Sample output: >=20 > % procstat -r $$ > PID COMM TYPE VALUE =20 > 1428 tcsh user time 00:00:00.050182 =20 > 1428 tcsh system time 00:00:00.040145 =20 > 1428 tcsh maximum RSS 3328 B > 1428 tcsh integral shared memory 2844 B > 1428 tcsh integral unshared data 6372 B > 1428 tcsh integral unshared stack 1152 B > 1428 tcsh page reclaims 1306 =20 > 1428 tcsh page faults 12 =20 > 1428 tcsh swaps 0 =20 > 1428 tcsh block reads 50 =20 > 1428 tcsh block writes 0 =20 > 1428 tcsh messages sent 172 =20 > 1428 tcsh messages received 0 =20 > 1428 tcsh signals received 33 =20 > 1428 tcsh voluntary context switches 1167 =20 > 1428 tcsh involuntary context switches 1 =20 >=20 > http://www.FreeBSD.org/~jhb/patches/procstat_rusage.patch >=20 > Any thoughts, etc.? It looks fine, but use of the human-oriented resource values, together with spaces in names, makes the parsing of the output unfeasible. The patch only reports the process-cumulative rusage, and not the per-thread rusage, it seems. --PkntWmqUzlIrpeQX Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQ9IpZAAoJEJDCuSvBvK1Bl9QP/3Pcudnpcq8tVWNJlf6wGR+o 7lMwcqrpptidDZE/Zx+ooW+Vi19MVISb7eU18Oc1X4IPtmKvoqkDcmFlWnJPcXmX IRYj+Yrh8qzbV2dUiUEZJjHGt9yYxyqGFlQc99DbykoROCUrrXhckPRvr0jBJsqO QHNk8JkA5jzU98poj2IL8DMNSmyRvAsd4oXDCrveHrIZ1pqAZhKc2MXhygI/itgn 0DVOZ5xMSkTcBRy3jmP++sXA335wPhw2P4Y4d5f7bI1CPZP2i/W6utGNDeteUffF orP1OkioRha4qXT1YBNN6kal2SNAI/CRWEBuJ1aeEWniRh/Puej9RkMfMgvyHzqA PaqAZTQEETFgpI29V1wuLniia/bu0UJypTQOU6/B1hzFsRMFyMuFqSnD0u+Ftki4 Xhn7sjyZi5BVRWvR59OcbP/1NxNObfsVgrIljs9MwwLiSpG3RAjjz/Bv42SrJ2Pj eC3HEFaFjvLI+uwOG1DsNYLRFHXLNqD4/5em5b+CMGD82YB4dSPOzmZtTsUPsF4w 0y5EaV68USuvl3No8R9Sqz53wa1SA5d3TMgnrciN+8TPX86PWq1+Tq6a5wrlyGlc P+6hzTOHn+ep9RZC3sAb4hKpFT6zoJnZCeQobPEzYFS43GrmUqRS3YRJ+Zl0V/3k mStmnb8hYw5iWbIVvG7d =zaq+ -----END PGP SIGNATURE----- --PkntWmqUzlIrpeQX--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130114224442.GO2561>