mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
doc formatting
This commit is contained in:
@ -43,8 +43,8 @@ Schema:
|
||||
"author": string,
|
||||
"author_email": string,
|
||||
"date": string,
|
||||
"epoch": integer, [0]
|
||||
"epoch_utc": integer, [1]
|
||||
"epoch": integer, # [0]
|
||||
"epoch_utc": integer, # [1]
|
||||
"commit_by": string,
|
||||
"commit_by_email": string,
|
||||
"commit_by_date": string,
|
||||
|
@ -44,8 +44,8 @@ Schema:
|
||||
"author": string,
|
||||
"author_email": string,
|
||||
"date": string,
|
||||
"epoch": integer, [0]
|
||||
"epoch_utc": integer, [1]
|
||||
"epoch": integer, # [0]
|
||||
"epoch_utc": integer, # [1]
|
||||
"commit_by": string,
|
||||
"commit_by_email": string,
|
||||
"commit_by_date": string,
|
||||
|
@ -26,8 +26,8 @@ Usage (module):
|
||||
|
||||
Schema:
|
||||
|
||||
ini or key/value document converted to a dictionary - see the
|
||||
configparser standard library documentation for more details.
|
||||
ini or key/value document converted to a dictionary - see the configparser
|
||||
standard library documentation for more details.
|
||||
|
||||
{
|
||||
"key1": string,
|
||||
|
@ -26,8 +26,8 @@ Usage (module):
|
||||
|
||||
Schema:
|
||||
|
||||
key/value document converted to a dictionary - see the
|
||||
configparser standard library documentation for more details.
|
||||
key/value document converted to a dictionary - see the configparser standard
|
||||
library documentation for more details.
|
||||
|
||||
{
|
||||
"key1": string,
|
||||
|
@ -40,7 +40,7 @@ Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"<key>": string/integer/float, [0]
|
||||
"<key>": string/integer/float, # [0]
|
||||
"dhcp4_option_x": {
|
||||
"name": string,
|
||||
"value": string/integer/float,
|
||||
|
@ -22,20 +22,20 @@ Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"destination": string,
|
||||
"gateway": string,
|
||||
"genmask": string,
|
||||
"flags": string,
|
||||
"destination": string,
|
||||
"gateway": string,
|
||||
"genmask": string,
|
||||
"flags": string,
|
||||
"flags_pretty": [
|
||||
string
|
||||
string
|
||||
]
|
||||
"metric": integer,
|
||||
"ref": integer,
|
||||
"use": integer,
|
||||
"mss": integer,
|
||||
"window": integer,
|
||||
"irtt": integer,
|
||||
"iface": string
|
||||
"metric": integer,
|
||||
"ref": integer,
|
||||
"use": integer,
|
||||
"mss": integer,
|
||||
"window": integer,
|
||||
"irtt": integer,
|
||||
"iface": string
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -51,8 +51,8 @@ Schema:
|
||||
"time": string,
|
||||
"process": integer,
|
||||
"metadata": string,
|
||||
"update_type": string/null, [0]
|
||||
"file_type": string/null, [1]
|
||||
"update_type": string/null, # [0]
|
||||
"file_type": string/null, # [1]
|
||||
"checksum_or_value_different": bool/null,
|
||||
"size_different": bool/null,
|
||||
"modification_time_different": bool/null,
|
||||
@ -61,7 +61,7 @@ Schema:
|
||||
"group_different": bool/null,
|
||||
"acl_different": bool/null,
|
||||
"extended_attribute_different": bool/null,
|
||||
"epoch": integer, [2]
|
||||
"epoch": integer, # [2]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -49,8 +49,8 @@ Schema:
|
||||
"time": string,
|
||||
"process": integer,
|
||||
"metadata": string,
|
||||
"update_type": string/null, [0]
|
||||
"file_type": string/null, [1]
|
||||
"update_type": string/null, # [0]
|
||||
"file_type": string/null, # [1]
|
||||
"checksum_or_value_different": bool/null,
|
||||
"size_different": bool/null,
|
||||
"modification_time_different": bool/null,
|
||||
@ -59,7 +59,7 @@ Schema:
|
||||
"group_different": bool/null,
|
||||
"acl_different": bool/null,
|
||||
"extended_attribute_different": bool/null,
|
||||
"epoch": integer, [2]
|
||||
"epoch": integer, # [2]
|
||||
|
||||
# below object only exists if using -qq or ignore_exceptions=True
|
||||
"_jc_meta": {
|
||||
|
@ -5,10 +5,10 @@
|
||||
|
||||
jc - JSON Convert `/usr/bin/time` command output parser
|
||||
|
||||
Output from `/usr/bin/time` is sent to STDERR, so the `-o` option can be
|
||||
Output from `/usr/bin/time` is sent to `STDERR`, so the `-o` option can be
|
||||
used to redirect the output to a file that can be read by `jc`.
|
||||
|
||||
Alternatively, the output from `/usr/bin/time` can be redirected to STDOUT
|
||||
Alternatively, the output from `/usr/bin/time` can be redirected to `STDOUT`
|
||||
so `jc` can receive it.
|
||||
|
||||
> Note: `/usr/bin/time` is similar but different from the Bash builtin
|
||||
|
@ -50,23 +50,23 @@ All `-` values are converted to `null`
|
||||
"cpu_hardware": float,
|
||||
"cpu_software": float,
|
||||
"cpu_steal": float,
|
||||
"mem_total": float, [0]
|
||||
"mem_free": float, [0]
|
||||
"mem_used": float, [0]
|
||||
"mem_buff_cache": float, [0]
|
||||
"swap_total": float, [0]
|
||||
"swap_free": float, [0]
|
||||
"swap_used": float, [0]
|
||||
"mem_available": float, [0]
|
||||
"mem_total": float, # [0]
|
||||
"mem_free": float, # [0]
|
||||
"mem_used": float, # [0]
|
||||
"mem_buff_cache": float, # [0]
|
||||
"swap_total": float, # [0]
|
||||
"swap_free": float, # [0]
|
||||
"swap_used": float, # [0]
|
||||
"mem_available": float, # [0]
|
||||
"processes": [
|
||||
{
|
||||
"pid": integer,
|
||||
"user": string,
|
||||
"priority": integer,
|
||||
"nice": integer,
|
||||
"virtual_mem": float, [1]
|
||||
"resident_mem": float, [1]
|
||||
"shared_mem": float, [1]
|
||||
"virtual_mem": float, # [1]
|
||||
"resident_mem": float, # [1]
|
||||
"shared_mem": float, # [1]
|
||||
"status": string,
|
||||
"percent_cpu": float,
|
||||
"percent_mem": float,
|
||||
@ -87,9 +87,9 @@ All `-` values are converted to `null`
|
||||
"thread_count": integer,
|
||||
"last_used_processor": integer,
|
||||
"time": string,
|
||||
"swap": float, [1]
|
||||
"code": float, [1]
|
||||
"data": float, [1]
|
||||
"swap": float, # [1]
|
||||
"code": float, # [1]
|
||||
"data": float, # [1]
|
||||
"major_page_fault_count": integer,
|
||||
"minor_page_fault_count": integer,
|
||||
"dirty_pages_count": integer,
|
||||
@ -108,7 +108,7 @@ All `-` values are converted to `null`
|
||||
]
|
||||
"major_page_fault_count_delta": integer,
|
||||
"minor_page_fault_count_delta": integer,
|
||||
"used": float, [1]
|
||||
"used": float, # [1]
|
||||
"ipc_namespace_inode": integer,
|
||||
"mount_namespace_inode": integer,
|
||||
"net_namespace_inode": integer,
|
||||
|
@ -48,23 +48,23 @@ Schema:
|
||||
"cpu_hardware": float,
|
||||
"cpu_software": float,
|
||||
"cpu_steal": float,
|
||||
"mem_total": float, [0]
|
||||
"mem_free": float, [0]
|
||||
"mem_used": float, [0]
|
||||
"mem_buff_cache": float, [0]
|
||||
"swap_total": float, [0]
|
||||
"swap_free": float, [0]
|
||||
"swap_used": float, [0]
|
||||
"mem_available": float, [0]
|
||||
"mem_total": float, # [0]
|
||||
"mem_free": float, # [0]
|
||||
"mem_used": float, # [0]
|
||||
"mem_buff_cache": float, # [0]
|
||||
"swap_total": float, # [0]
|
||||
"swap_free": float, # [0]
|
||||
"swap_used": float, # [0]
|
||||
"mem_available": float, # [0]
|
||||
"processes": [
|
||||
{
|
||||
"pid": integer,
|
||||
"user": string,
|
||||
"priority": integer,
|
||||
"nice": integer,
|
||||
"virtual_mem": float, [1]
|
||||
"resident_mem": float, [1]
|
||||
"shared_mem": float, [1]
|
||||
"virtual_mem": float, # [1]
|
||||
"resident_mem": float, # [1]
|
||||
"shared_mem": float, # [1]
|
||||
"status": string,
|
||||
"percent_cpu": float,
|
||||
"percent_mem": float,
|
||||
@ -85,9 +85,9 @@ Schema:
|
||||
"thread_count": integer,
|
||||
"last_used_processor": integer,
|
||||
"time": string,
|
||||
"swap": float, [1]
|
||||
"code": float, [1]
|
||||
"data": float, [1]
|
||||
"swap": float, # [1]
|
||||
"code": float, # [1]
|
||||
"data": float, # [1]
|
||||
"major_page_fault_count": integer,
|
||||
"minor_page_fault_count": integer,
|
||||
"dirty_pages_count": integer,
|
||||
@ -106,7 +106,7 @@ Schema:
|
||||
]
|
||||
"major_page_fault_count_delta": integer,
|
||||
"minor_page_fault_count_delta": integer,
|
||||
"used": float, [1]
|
||||
"used": float, # [1]
|
||||
"ipc_namespace_inode": integer,
|
||||
"mount_namespace_inode": integer,
|
||||
"net_namespace_inode": integer,
|
||||
|
@ -75,9 +75,9 @@ Schema:
|
||||
|
||||
# below object only exists if using -qq or ignore_exceptions=True
|
||||
"_jc_meta": {
|
||||
"success": boolean, # [2]
|
||||
"error": string, # [3]
|
||||
"line": string # [3]
|
||||
"success": boolean, # [2]
|
||||
"error": string, # [3]
|
||||
"line": string # [3]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,8 +38,8 @@ Schema:
|
||||
"author": string,
|
||||
"author_email": string,
|
||||
"date": string,
|
||||
"epoch": integer, [0]
|
||||
"epoch_utc": integer, [1]
|
||||
"epoch": integer, # [0]
|
||||
"epoch_utc": integer, # [1]
|
||||
"commit_by": string,
|
||||
"commit_by_email": string,
|
||||
"commit_by_date": string,
|
||||
|
@ -39,8 +39,8 @@ Schema:
|
||||
"author": string,
|
||||
"author_email": string,
|
||||
"date": string,
|
||||
"epoch": integer, [0]
|
||||
"epoch_utc": integer, [1]
|
||||
"epoch": integer, # [0]
|
||||
"epoch_utc": integer, # [1]
|
||||
"commit_by": string,
|
||||
"commit_by_email": string,
|
||||
"commit_by_date": string,
|
||||
|
@ -21,8 +21,8 @@ Usage (module):
|
||||
|
||||
Schema:
|
||||
|
||||
ini or key/value document converted to a dictionary - see the
|
||||
configparser standard library documentation for more details.
|
||||
ini or key/value document converted to a dictionary - see the configparser
|
||||
standard library documentation for more details.
|
||||
|
||||
{
|
||||
"key1": string,
|
||||
|
@ -21,8 +21,8 @@ Usage (module):
|
||||
|
||||
Schema:
|
||||
|
||||
key/value document converted to a dictionary - see the
|
||||
configparser standard library documentation for more details.
|
||||
key/value document converted to a dictionary - see the configparser standard
|
||||
library documentation for more details.
|
||||
|
||||
{
|
||||
"key1": string,
|
||||
|
@ -35,7 +35,7 @@ Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"<key>": string/integer/float, [0]
|
||||
"<key>": string/integer/float, # [0]
|
||||
"dhcp4_option_x": {
|
||||
"name": string,
|
||||
"value": string/integer/float,
|
||||
|
@ -17,20 +17,20 @@ Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"destination": string,
|
||||
"gateway": string,
|
||||
"genmask": string,
|
||||
"flags": string,
|
||||
"destination": string,
|
||||
"gateway": string,
|
||||
"genmask": string,
|
||||
"flags": string,
|
||||
"flags_pretty": [
|
||||
string
|
||||
string
|
||||
]
|
||||
"metric": integer,
|
||||
"ref": integer,
|
||||
"use": integer,
|
||||
"mss": integer,
|
||||
"window": integer,
|
||||
"irtt": integer,
|
||||
"iface": string
|
||||
"metric": integer,
|
||||
"ref": integer,
|
||||
"use": integer,
|
||||
"mss": integer,
|
||||
"window": integer,
|
||||
"irtt": integer,
|
||||
"iface": string
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -46,8 +46,8 @@ Schema:
|
||||
"time": string,
|
||||
"process": integer,
|
||||
"metadata": string,
|
||||
"update_type": string/null, [0]
|
||||
"file_type": string/null, [1]
|
||||
"update_type": string/null, # [0]
|
||||
"file_type": string/null, # [1]
|
||||
"checksum_or_value_different": bool/null,
|
||||
"size_different": bool/null,
|
||||
"modification_time_different": bool/null,
|
||||
@ -56,7 +56,7 @@ Schema:
|
||||
"group_different": bool/null,
|
||||
"acl_different": bool/null,
|
||||
"extended_attribute_different": bool/null,
|
||||
"epoch": integer, [2]
|
||||
"epoch": integer, # [2]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -44,8 +44,8 @@ Schema:
|
||||
"time": string,
|
||||
"process": integer,
|
||||
"metadata": string,
|
||||
"update_type": string/null, [0]
|
||||
"file_type": string/null, [1]
|
||||
"update_type": string/null, # [0]
|
||||
"file_type": string/null, # [1]
|
||||
"checksum_or_value_different": bool/null,
|
||||
"size_different": bool/null,
|
||||
"modification_time_different": bool/null,
|
||||
@ -54,7 +54,7 @@ Schema:
|
||||
"group_different": bool/null,
|
||||
"acl_different": bool/null,
|
||||
"extended_attribute_different": bool/null,
|
||||
"epoch": integer, [2]
|
||||
"epoch": integer, # [2]
|
||||
|
||||
# below object only exists if using -qq or ignore_exceptions=True
|
||||
"_jc_meta": {
|
||||
|
@ -1,9 +1,9 @@
|
||||
"""jc - JSON Convert `/usr/bin/time` command output parser
|
||||
|
||||
Output from `/usr/bin/time` is sent to STDERR, so the `-o` option can be
|
||||
Output from `/usr/bin/time` is sent to `STDERR`, so the `-o` option can be
|
||||
used to redirect the output to a file that can be read by `jc`.
|
||||
|
||||
Alternatively, the output from `/usr/bin/time` can be redirected to STDOUT
|
||||
Alternatively, the output from `/usr/bin/time` can be redirected to `STDOUT`
|
||||
so `jc` can receive it.
|
||||
|
||||
> Note: `/usr/bin/time` is similar but different from the Bash builtin
|
||||
|
@ -45,23 +45,23 @@ All `-` values are converted to `null`
|
||||
"cpu_hardware": float,
|
||||
"cpu_software": float,
|
||||
"cpu_steal": float,
|
||||
"mem_total": float, [0]
|
||||
"mem_free": float, [0]
|
||||
"mem_used": float, [0]
|
||||
"mem_buff_cache": float, [0]
|
||||
"swap_total": float, [0]
|
||||
"swap_free": float, [0]
|
||||
"swap_used": float, [0]
|
||||
"mem_available": float, [0]
|
||||
"mem_total": float, # [0]
|
||||
"mem_free": float, # [0]
|
||||
"mem_used": float, # [0]
|
||||
"mem_buff_cache": float, # [0]
|
||||
"swap_total": float, # [0]
|
||||
"swap_free": float, # [0]
|
||||
"swap_used": float, # [0]
|
||||
"mem_available": float, # [0]
|
||||
"processes": [
|
||||
{
|
||||
"pid": integer,
|
||||
"user": string,
|
||||
"priority": integer,
|
||||
"nice": integer,
|
||||
"virtual_mem": float, [1]
|
||||
"resident_mem": float, [1]
|
||||
"shared_mem": float, [1]
|
||||
"virtual_mem": float, # [1]
|
||||
"resident_mem": float, # [1]
|
||||
"shared_mem": float, # [1]
|
||||
"status": string,
|
||||
"percent_cpu": float,
|
||||
"percent_mem": float,
|
||||
@ -82,9 +82,9 @@ All `-` values are converted to `null`
|
||||
"thread_count": integer,
|
||||
"last_used_processor": integer,
|
||||
"time": string,
|
||||
"swap": float, [1]
|
||||
"code": float, [1]
|
||||
"data": float, [1]
|
||||
"swap": float, # [1]
|
||||
"code": float, # [1]
|
||||
"data": float, # [1]
|
||||
"major_page_fault_count": integer,
|
||||
"minor_page_fault_count": integer,
|
||||
"dirty_pages_count": integer,
|
||||
@ -103,7 +103,7 @@ All `-` values are converted to `null`
|
||||
]
|
||||
"major_page_fault_count_delta": integer,
|
||||
"minor_page_fault_count_delta": integer,
|
||||
"used": float, [1]
|
||||
"used": float, # [1]
|
||||
"ipc_namespace_inode": integer,
|
||||
"mount_namespace_inode": integer,
|
||||
"net_namespace_inode": integer,
|
||||
|
@ -43,23 +43,23 @@ Schema:
|
||||
"cpu_hardware": float,
|
||||
"cpu_software": float,
|
||||
"cpu_steal": float,
|
||||
"mem_total": float, [0]
|
||||
"mem_free": float, [0]
|
||||
"mem_used": float, [0]
|
||||
"mem_buff_cache": float, [0]
|
||||
"swap_total": float, [0]
|
||||
"swap_free": float, [0]
|
||||
"swap_used": float, [0]
|
||||
"mem_available": float, [0]
|
||||
"mem_total": float, # [0]
|
||||
"mem_free": float, # [0]
|
||||
"mem_used": float, # [0]
|
||||
"mem_buff_cache": float, # [0]
|
||||
"swap_total": float, # [0]
|
||||
"swap_free": float, # [0]
|
||||
"swap_used": float, # [0]
|
||||
"mem_available": float, # [0]
|
||||
"processes": [
|
||||
{
|
||||
"pid": integer,
|
||||
"user": string,
|
||||
"priority": integer,
|
||||
"nice": integer,
|
||||
"virtual_mem": float, [1]
|
||||
"resident_mem": float, [1]
|
||||
"shared_mem": float, [1]
|
||||
"virtual_mem": float, # [1]
|
||||
"resident_mem": float, # [1]
|
||||
"shared_mem": float, # [1]
|
||||
"status": string,
|
||||
"percent_cpu": float,
|
||||
"percent_mem": float,
|
||||
@ -80,9 +80,9 @@ Schema:
|
||||
"thread_count": integer,
|
||||
"last_used_processor": integer,
|
||||
"time": string,
|
||||
"swap": float, [1]
|
||||
"code": float, [1]
|
||||
"data": float, [1]
|
||||
"swap": float, # [1]
|
||||
"code": float, # [1]
|
||||
"data": float, # [1]
|
||||
"major_page_fault_count": integer,
|
||||
"minor_page_fault_count": integer,
|
||||
"dirty_pages_count": integer,
|
||||
@ -101,7 +101,7 @@ Schema:
|
||||
]
|
||||
"major_page_fault_count_delta": integer,
|
||||
"minor_page_fault_count_delta": integer,
|
||||
"used": float, [1]
|
||||
"used": float, # [1]
|
||||
"ipc_namespace_inode": integer,
|
||||
"mount_namespace_inode": integer,
|
||||
"net_namespace_inode": integer,
|
||||
|
@ -70,9 +70,9 @@ Schema:
|
||||
|
||||
# below object only exists if using -qq or ignore_exceptions=True
|
||||
"_jc_meta": {
|
||||
"success": boolean, # [2]
|
||||
"error": string, # [3]
|
||||
"line": string # [3]
|
||||
"success": boolean, # [2]
|
||||
"error": string, # [3]
|
||||
"line": string # [3]
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user