[Bug 221290] vmstat output have columns without space
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Aug 6 19:37:08 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221290
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 at FreeBSD.org
Reporter: mail at josuah.net
Created attachment 185098
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=185098&action=edit
I attached a patch applied to the git repo, and I could not test it with this
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 any "
" when flt's numbers are too big.
To reproduce:
─── 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
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
156 4 23 73
1 0 0 4935316 12062292518046 0 0 0 527749 287 0 0 2 627
170 3 24 73
stress: info: [9628] successful run completed in 3s
───
By adding a xo_emit(" ") on dovmstat() { ... } seems to fix the problem (see
attached patch).
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list