Atoptool / atop

System and process monitor for Linux
GNU General Public License v2.0
789 stars 110 forks source link

atop json output produces invalid json with LVM label #247

Closed jbd closed 1 year ago

jbd commented 1 year ago

Hello,

I was trying to get atop json output from all labels without success. I've tried all label one by one, and the only one generating an invalid json is LVM. I'm testing the validity of the json simply using jq.

$ atop -JLVM 1 1|jq
parse error: ':' not as part of an object at line 1, column 226 
$ atop -JLVM 1 1
{"host": "brucciu", "timestamp": 1677848153, "elapsed": 359675, "LVM": [{"lvmname": "nvme0n1p3_crypt", "io_ms": 1151996, "nread": 176654, "nrsect": 8421342, "nwrite": 1284680, "nwsect": 74863473, "avque": 3621976}, "inflight": 0}, {"lvmname": "vg0-swap", "io_ms": 60, "nread": 157, "nrsect": 7104, "nwrite": 0, "nwsect": 0, "avque": 40}, "inflight": 0}, {"lvmname": "vg0-root", "io_ms": 1152324, "nread": 176452, "nrsect": 8412206, "nwrite": 1282400, "nwsect": 74863473, "avque": 3607640}, "inflight": 0}]}

Gentle ping to @pizhenwei and @ShirleyFei.

Atoptool commented 1 year ago

Solved by PR #248.