Bug 222198

Summary: Duplicate JSON key in vmstat
Product: Base System Reporter: Yavuz Tanrıverdi <sternix>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Many People CC: allanjude, emaste
Priority: --- Keywords: patch
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
diff for vmstat.c none

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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 2017-11-11 14:17:14 UTC
Sorry it took so long to get this committed.

Thank you for your contribution.