mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
add human-readable support to the df parser
This commit is contained in:
@ -24,10 +24,13 @@ Schema:
|
||||
{
|
||||
"filesystem": string,
|
||||
"size": string,
|
||||
"size_bytes": integer, # [0]
|
||||
"1k_blocks": integer,
|
||||
"512_blocks": integer,
|
||||
"used": integer,
|
||||
"used_bytes": integer, # [0]
|
||||
"available": integer,
|
||||
"available_bytes": integer, # [0]
|
||||
"capacity_percent": integer,
|
||||
"ifree": integer,
|
||||
"iused": integer,
|
||||
@ -37,6 +40,9 @@ Schema:
|
||||
}
|
||||
]
|
||||
|
||||
[0] It is recommended to use these fields as they are normalized to bytes
|
||||
and will work even with human-readable `df` output.
|
||||
|
||||
Examples:
|
||||
|
||||
$ df | jc --df -p
|
||||
@ -45,7 +51,9 @@ Examples:
|
||||
"filesystem": "devtmpfs",
|
||||
"1k_blocks": 1918820,
|
||||
"used": 0,
|
||||
"used_bytes": 0,
|
||||
"available": 1918820,
|
||||
"available_bytes": 1918820,
|
||||
"use_percent": 0,
|
||||
"mounted_on": "/dev"
|
||||
},
|
||||
@ -53,7 +61,9 @@ Examples:
|
||||
"filesystem": "tmpfs",
|
||||
"1k_blocks": 1930668,
|
||||
"used": 0,
|
||||
"used_bytes": 0,
|
||||
"available": 1930668,
|
||||
"available_bytes": 1930668,
|
||||
"use_percent": 0,
|
||||
"mounted_on": "/dev/shm"
|
||||
},
|
||||
@ -61,7 +71,9 @@ Examples:
|
||||
"filesystem": "tmpfs",
|
||||
"1k_blocks": 1930668,
|
||||
"used": 11800,
|
||||
"used_bytes": 11800,
|
||||
"available": 1918868,
|
||||
"available_bytes": 1918868,
|
||||
"use_percent": 1,
|
||||
"mounted_on": "/run"
|
||||
},
|
||||
@ -122,4 +134,4 @@ Compatibility: linux, darwin, freebsd
|
||||
|
||||
Source: [`jc/parsers/df.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/df.py)
|
||||
|
||||
Version 1.11 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
Version 1.12 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
||||
|
Reference in New Issue
Block a user