Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Aug 2017 19:37:08 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 221290] vmstat output have columns without space
Message-ID:  <bug-221290-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221290

            Bug ID: 221290
           Summary: vmstat output have columns without space
           Product: Base System
           Version: 11.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: mail@josuah.net

Created attachment 185098
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D185098&action=
=3Dedit
I attached a patch applied to the git repo, and I could not test it with th=
is
version, but applying the same edit on 11.0-RELEASE worked fine.

vmstat displays humanized numbers while stdout is a TTY.  But while piping =
out
through, say, tee(1), the numbers under fre and flt are displayed without a=
ny "
" when flt's numbers are too big.


To reproduce:


    =E2=94=80=E2=94=80=E2=94=80 stress -m 1 -t 3 & vmstat 1 3 | tee
    [1] 9628
    stress: info: [9628] dispatching hogs: 0 cpu, 0 io, 1 vm, 0 hdd
    procs     memory        page                    disks     faults=20=20=
=20=20=20=20=20=20
cpu
    r b w     avm     fre  flt  re  pi  po    fr   sr ad0 pa0   in    sy   =
 cs
us sy id
    1 0 0 4691676 12188436 1408   0 173   8  1490  171   0   0  192  6998  =
1832
 8  1 91
    1 0 0 4935316 12036000496115   0   0  12 461929  229   0   0    3   372=
=20=20
156  4 23 73
    1 0 0 4935316 12062292518046   0   0   0 527749  287   0   0    2   627=
=20=20
170  3 24 73
    stress: info: [9628] successful run completed in 3s
    =E2=94=80=E2=94=80=E2=94=80=20


By adding a xo_emit(" ") on dovmstat() { ... } seems to fix the problem (see
attached patch).

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-221290-8>