JSON output for dmstats
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | Add JSON output support to dmstats for list and report subcommandslibdm/ | +37 | 0 replies | |
| 2/2 | Update man page to include --reportformat for list and report subcommandsman/ | +11 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [linux-lvm] [PATCH 0/2] JSON output for dmstats
This set of patches adds "--reportformat basic|json" options for the dmstats list and report commands.
In the case where --count is specified with the JSON reportformat, the output will be <count> consecutive JSON documents.
Example output of a single iteration of "report" in JSON:
{
"report": [{
"stats_name": "mirrorvg-mirrorlv",
"group_id": "-",
"region_id": "0",
"obj_type": "area",
"area_id": "0",
"area_start": "0",
"area_len": "1.00g",
"reads_merged_per_sec": "0.00",
"writes_merged_per_sec": "0.00",
"reads_per_sec": "0.00",
"writes_per_sec": "0.00",
"read_size_per_sec": "0",
"write_size_per_sec": "0",
"avg_request_size": "0",
"queue_size": "0.00",
"util": "0.00",
"await": "0.00",
"read_await": "0.00",
"write_await": "0.00" }]
}
The above JSON has been reformatted for line length, but the content is from dmstats using this change.
Example output of "list" in JSON:
{
"list": [{
"stats_name": "mirrorvg-mirrorlv",
"group_id": "-",
"region_id": "0",
"obj_type": "region",
"region_start": "0",
"region_len": "1.00g",
"area_count": "1",
"area_len": "1.00g",
"program_id": "dmstats"
}]
}Todd Gill (2):
Add JSON output support to dmstats for list and report subcommands Update man page to include --reportformat for list and report
subcommands
libdm/dm-tools/dmsetup.c | 45 +++++++++++++++++++++++++++++++++------- man/dmstats.8_main | 11 ++++++++++ 2 files changed, 48 insertions(+), 8 deletions(-)
Signature · 1 line
2.21.1