[Bugs] [Bug 1654521] New: io-stats outputs json numbers as strings

bugzilla at redhat.com bugzilla at redhat.com
Thu Nov 29 00:40:14 UTC 2018


            Bug ID: 1654521
           Summary: io-stats outputs json numbers as strings
           Product: GlusterFS
           Version: 4.1
         Component: io-stats
          Severity: low
          Assignee: bugs at gluster.org
          Reporter: xfactor973 at gmail.com
                CC: bugs at gluster.org

Description of problem: The json output of the io-stats debug xlator quotes the
numbers as strings instead of just printing them as numbers.  This makes
parsing them in a strongly typed language more difficult than it should be. 
This is an easy fix so I'll be following up with a patch to correct the output. 

Version-Release number of selected component (if applicable):
As far as I know it's been like this since first released.  Commit:
d3e496cbcd35b9d9b840e328ae109c44f59083ce and bug id: 1271310

How reproducible: Easily reproducible by enabling the iostats fop diagnostics.  

Steps to Reproduce:
1. Setup a gluster volume called gv0
2. gluster vol set gv0 diagnostics.dump-fd-stats on
3. gluster vol set gv0 diagnostics.count-fop-hits on
4. gluster vol set gv0 diagnostics.stats-dump-interval 10
5. gluster vol set gv0 diagnostics.fop-sample-interval 10
6. Observe output in /var/lib/glusterd/stats/xxx.dump files

Actual results:
Json entries look like this:
"gluster.brick._mnt_brick.inter.bytes_written_per_sec": "0.00"

Expected results:
Json entries should look like this:
"gluster.brick._mnt_brick.inter.bytes_written_per_sec": 0.00

Additional info:

You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

More information about the Bugs mailing list