From owner-freebsd-current@FreeBSD.ORG Mon Jan 14 22:44:51 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2C6B9800; Mon, 14 Jan 2013 22:44:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id C1488C5; Mon, 14 Jan 2013 22:44:50 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r0EMignN084485; Tue, 15 Jan 2013 00:44:42 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.4 kib.kiev.ua r0EMignN084485 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r0EMig05084484; Tue, 15 Jan 2013 00:44:42 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 15 Jan 2013 00:44:42 +0200 From: Konstantin Belousov To: John Baldwin Subject: Re: [PATCH] Add rusage reporting to procstat Message-ID: <20130114224442.GO2561@kib.kiev.ua> References: <201301141639.17783.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PkntWmqUzlIrpeQX" Content-Disposition: inline In-Reply-To: <201301141639.17783.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2013 22:44:51 -0000 --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--