Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Nov 2008 23:13:19 +0100
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-hackers@freebsd.org
Subject:   YAVP (Yet Another Vmstat Patch)
Message-ID:  <geqhe8$tmj$1@ger.gmane.org>

next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig46FEBD7A4700E2C477855B8A
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi,

I'm working on something that tends to generate a lot of context
switches and I don't like the way values in "vmstat 1" are printed
practically unbounded, causing wrapping, etc.

Here's a patch against -CURRENT that uses humanize_number() to keep the
formatting of memory and context switches tabular in the common case:

http://people.freebsd.org/~ivoras/diffs/vmstat.c.patch.txt

The following people might not like it:

* Those who really need to distinguish between 185400 context switches
and 185499 context switches
* Those who have scripts that parse the output
* Those who thought the previous chaotic behaviour is cute :)

Example of new output is:

 procs   memory      page                    disks     faults          cp=
u
 r b w  avm free   flt  re  pi  po    fr  sr ad4 ad8   in   sy   cs  us
sy id
 3 0 0 112M 3.7G     0   0   0   0     0   0   0   0    2 373K 267K   4
37 59
 2 0 0 112M 3.7G     0   0   0   0     0   0   0   0    0 366K 271K   4
37 59
 3 0 0 112M 3.7G     0   0   0   0     0   0   0   0    0 370K 267K   4
36 59
 4 0 0 112M 3.7G     0   0   0   0     0   0   0   0    0 378K 278K   5
36 60
 3 0 0 112M 3.7G     0   0   0   0     0   0   0   0   69 366K 268K   4
39 58
 2 0 0 112M 3.7G     0   0   0   0     0   0   0   0   65 372K 271K   5
41 54
 4 0 0 112M 3.7G     0   0   0   0     0   0   0   0   71 374K 271K   5
40 55
 2 0 0 112M 3.7G     0   0   0   0     0   0   0   0    6 375K 276K   4
39 57

Any objections to the patch?


--------------enig46FEBD7A4700E2C477855B8A
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEUEARECAAYFAkkQyQgACgkQldnAQVacBcif5QCg6G7L6xXScsshYXn/Q3hFWL8I
/74AmO7da9UVABzQmyVSRzxvuWSHQIM=
=IRgo
-----END PGP SIGNATURE-----

--------------enig46FEBD7A4700E2C477855B8A--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?geqhe8$tmj$1>