Bug 222198 - Duplicate JSON key in vmstat
Summary: Duplicate JSON key in vmstat
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-09-10 15:48 UTC by Yavuz Tanrıverdi
Modified: 2017-11-11 14:17 UTC (History)
2 users (show)

See Also:


Attachments
diff for vmstat.c (570 bytes, patch)
2017-09-10 15:48 UTC, Yavuz Tanrıverdi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yavuz Tanrıverdi 2017-09-10 15:48:36 UTC
Created attachment 186229 [details]
diff for vmstat.c

Hi

My FreeBSD version is:

FreeBSD ... 11.1-RELEASE-p1 FreeBSD 11.1-RELEASE-p1 #0: Wed Aug  9 11:55:48 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

vmstat command with --libxo flag has duplicate "vnode-page-outs" key, you can see with

$ vmstat --libxo json,pretty -s | grep vnode-page-outs
 "vnode-page-outs": ...,
 "vnode-page-outs": ...,


$ vmstat -s
 ... vnode pager pageouts
 ... vnode pager pages paged out

the second key might be "vnode-page-out-pages" i think.
Comment 1 Allan Jude freebsd_committer 2017-09-16 16:18:08 UTC
Being reviewed

https://reviews.freebsd.org/D12395
Comment 2 Yavuz Tanrıverdi 2017-09-17 10:42:07 UTC
Thank you very much.
Comment 3 commit-hook freebsd_committer 2017-11-11 14:03:04 UTC
A commit references this bug:

Author: allanjude
Date: Sat Nov 11 14:02:22 UTC 2017
New revision: 325715
URL: https://svnweb.freebsd.org/changeset/base/325715

Log:
  vmstat: fix duplicate key in libxo output

  In the libxo output from vmstat, the number of pages that have been
  paged out uses the same key name as the number of times pages have been
  paged. Appears to have been a typo or copy-pasto.

  PR:		222198
  Submitted by:	Yavuz Tanriverdi <stemix@gmail.com>
  Reviewed by:	phil, garga
  Differential Revision:	https://reviews.freebsd.org/D12395

Changes:
  head/usr.bin/vmstat/vmstat.c
Comment 4 Allan Jude freebsd_committer 2017-11-11 14:17:14 UTC
Sorry it took so long to get this committed.

Thank you for your contribution.