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": string,
|
||||||
"author_email": string,
|
"author_email": string,
|
||||||
"date": string,
|
"date": string,
|
||||||
"epoch": integer, [0]
|
"epoch": integer, # [0]
|
||||||
"epoch_utc": integer, [1]
|
"epoch_utc": integer, # [1]
|
||||||
"commit_by": string,
|
"commit_by": string,
|
||||||
"commit_by_email": string,
|
"commit_by_email": string,
|
||||||
"commit_by_date": string,
|
"commit_by_date": string,
|
||||||
|
@ -44,8 +44,8 @@ Schema:
|
|||||||
"author": string,
|
"author": string,
|
||||||
"author_email": string,
|
"author_email": string,
|
||||||
"date": string,
|
"date": string,
|
||||||
"epoch": integer, [0]
|
"epoch": integer, # [0]
|
||||||
"epoch_utc": integer, [1]
|
"epoch_utc": integer, # [1]
|
||||||
"commit_by": string,
|
"commit_by": string,
|
||||||
"commit_by_email": string,
|
"commit_by_email": string,
|
||||||
"commit_by_date": string,
|
"commit_by_date": string,
|
||||||
|
@ -26,8 +26,8 @@ Usage (module):
|
|||||||
|
|
||||||
Schema:
|
Schema:
|
||||||
|
|
||||||
ini or key/value document converted to a dictionary - see the
|
ini or key/value document converted to a dictionary - see the configparser
|
||||||
configparser standard library documentation for more details.
|
standard library documentation for more details.
|
||||||
|
|
||||||
{
|
{
|
||||||
"key1": string,
|
"key1": string,
|
||||||
|
@ -26,8 +26,8 @@ Usage (module):
|
|||||||
|
|
||||||
Schema:
|
Schema:
|
||||||
|
|
||||||
key/value document converted to a dictionary - see the
|
key/value document converted to a dictionary - see the configparser standard
|
||||||
configparser standard library documentation for more details.
|
library documentation for more details.
|
||||||
|
|
||||||
{
|
{
|
||||||
"key1": string,
|
"key1": string,
|
||||||
|
@ -40,7 +40,7 @@ Schema:
|
|||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"<key>": string/integer/float, [0]
|
"<key>": string/integer/float, # [0]
|
||||||
"dhcp4_option_x": {
|
"dhcp4_option_x": {
|
||||||
"name": string,
|
"name": string,
|
||||||
"value": string/integer/float,
|
"value": string/integer/float,
|
||||||
|
@ -51,8 +51,8 @@ Schema:
|
|||||||
"time": string,
|
"time": string,
|
||||||
"process": integer,
|
"process": integer,
|
||||||
"metadata": string,
|
"metadata": string,
|
||||||
"update_type": string/null, [0]
|
"update_type": string/null, # [0]
|
||||||
"file_type": string/null, [1]
|
"file_type": string/null, # [1]
|
||||||
"checksum_or_value_different": bool/null,
|
"checksum_or_value_different": bool/null,
|
||||||
"size_different": bool/null,
|
"size_different": bool/null,
|
||||||
"modification_time_different": bool/null,
|
"modification_time_different": bool/null,
|
||||||
@ -61,7 +61,7 @@ Schema:
|
|||||||
"group_different": bool/null,
|
"group_different": bool/null,
|
||||||
"acl_different": bool/null,
|
"acl_different": bool/null,
|
||||||
"extended_attribute_different": bool/null,
|
"extended_attribute_different": bool/null,
|
||||||
"epoch": integer, [2]
|
"epoch": integer, # [2]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -49,8 +49,8 @@ Schema:
|
|||||||
"time": string,
|
"time": string,
|
||||||
"process": integer,
|
"process": integer,
|
||||||
"metadata": string,
|
"metadata": string,
|
||||||
"update_type": string/null, [0]
|
"update_type": string/null, # [0]
|
||||||
"file_type": string/null, [1]
|
"file_type": string/null, # [1]
|
||||||
"checksum_or_value_different": bool/null,
|
"checksum_or_value_different": bool/null,
|
||||||
"size_different": bool/null,
|
"size_different": bool/null,
|
||||||
"modification_time_different": bool/null,
|
"modification_time_different": bool/null,
|
||||||
@ -59,7 +59,7 @@ Schema:
|
|||||||
"group_different": bool/null,
|
"group_different": bool/null,
|
||||||
"acl_different": bool/null,
|
"acl_different": bool/null,
|
||||||
"extended_attribute_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
|
# below object only exists if using -qq or ignore_exceptions=True
|
||||||
"_jc_meta": {
|
"_jc_meta": {
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
|
|
||||||
jc - JSON Convert `/usr/bin/time` command output parser
|
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`.
|
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.
|
so `jc` can receive it.
|
||||||
|
|
||||||
> Note: `/usr/bin/time` is similar but different from the Bash builtin
|
> 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_hardware": float,
|
||||||
"cpu_software": float,
|
"cpu_software": float,
|
||||||
"cpu_steal": float,
|
"cpu_steal": float,
|
||||||
"mem_total": float, [0]
|
"mem_total": float, # [0]
|
||||||
"mem_free": float, [0]
|
"mem_free": float, # [0]
|
||||||
"mem_used": float, [0]
|
"mem_used": float, # [0]
|
||||||
"mem_buff_cache": float, [0]
|
"mem_buff_cache": float, # [0]
|
||||||
"swap_total": float, [0]
|
"swap_total": float, # [0]
|
||||||
"swap_free": float, [0]
|
"swap_free": float, # [0]
|
||||||
"swap_used": float, [0]
|
"swap_used": float, # [0]
|
||||||
"mem_available": float, [0]
|
"mem_available": float, # [0]
|
||||||
"processes": [
|
"processes": [
|
||||||
{
|
{
|
||||||
"pid": integer,
|
"pid": integer,
|
||||||
"user": string,
|
"user": string,
|
||||||
"priority": integer,
|
"priority": integer,
|
||||||
"nice": integer,
|
"nice": integer,
|
||||||
"virtual_mem": float, [1]
|
"virtual_mem": float, # [1]
|
||||||
"resident_mem": float, [1]
|
"resident_mem": float, # [1]
|
||||||
"shared_mem": float, [1]
|
"shared_mem": float, # [1]
|
||||||
"status": string,
|
"status": string,
|
||||||
"percent_cpu": float,
|
"percent_cpu": float,
|
||||||
"percent_mem": float,
|
"percent_mem": float,
|
||||||
@ -87,9 +87,9 @@ All `-` values are converted to `null`
|
|||||||
"thread_count": integer,
|
"thread_count": integer,
|
||||||
"last_used_processor": integer,
|
"last_used_processor": integer,
|
||||||
"time": string,
|
"time": string,
|
||||||
"swap": float, [1]
|
"swap": float, # [1]
|
||||||
"code": float, [1]
|
"code": float, # [1]
|
||||||
"data": float, [1]
|
"data": float, # [1]
|
||||||
"major_page_fault_count": integer,
|
"major_page_fault_count": integer,
|
||||||
"minor_page_fault_count": integer,
|
"minor_page_fault_count": integer,
|
||||||
"dirty_pages_count": integer,
|
"dirty_pages_count": integer,
|
||||||
@ -108,7 +108,7 @@ All `-` values are converted to `null`
|
|||||||
]
|
]
|
||||||
"major_page_fault_count_delta": integer,
|
"major_page_fault_count_delta": integer,
|
||||||
"minor_page_fault_count_delta": integer,
|
"minor_page_fault_count_delta": integer,
|
||||||
"used": float, [1]
|
"used": float, # [1]
|
||||||
"ipc_namespace_inode": integer,
|
"ipc_namespace_inode": integer,
|
||||||
"mount_namespace_inode": integer,
|
"mount_namespace_inode": integer,
|
||||||
"net_namespace_inode": integer,
|
"net_namespace_inode": integer,
|
||||||
|
@ -48,23 +48,23 @@ Schema:
|
|||||||
"cpu_hardware": float,
|
"cpu_hardware": float,
|
||||||
"cpu_software": float,
|
"cpu_software": float,
|
||||||
"cpu_steal": float,
|
"cpu_steal": float,
|
||||||
"mem_total": float, [0]
|
"mem_total": float, # [0]
|
||||||
"mem_free": float, [0]
|
"mem_free": float, # [0]
|
||||||
"mem_used": float, [0]
|
"mem_used": float, # [0]
|
||||||
"mem_buff_cache": float, [0]
|
"mem_buff_cache": float, # [0]
|
||||||
"swap_total": float, [0]
|
"swap_total": float, # [0]
|
||||||
"swap_free": float, [0]
|
"swap_free": float, # [0]
|
||||||
"swap_used": float, [0]
|
"swap_used": float, # [0]
|
||||||
"mem_available": float, [0]
|
"mem_available": float, # [0]
|
||||||
"processes": [
|
"processes": [
|
||||||
{
|
{
|
||||||
"pid": integer,
|
"pid": integer,
|
||||||
"user": string,
|
"user": string,
|
||||||
"priority": integer,
|
"priority": integer,
|
||||||
"nice": integer,
|
"nice": integer,
|
||||||
"virtual_mem": float, [1]
|
"virtual_mem": float, # [1]
|
||||||
"resident_mem": float, [1]
|
"resident_mem": float, # [1]
|
||||||
"shared_mem": float, [1]
|
"shared_mem": float, # [1]
|
||||||
"status": string,
|
"status": string,
|
||||||
"percent_cpu": float,
|
"percent_cpu": float,
|
||||||
"percent_mem": float,
|
"percent_mem": float,
|
||||||
@ -85,9 +85,9 @@ Schema:
|
|||||||
"thread_count": integer,
|
"thread_count": integer,
|
||||||
"last_used_processor": integer,
|
"last_used_processor": integer,
|
||||||
"time": string,
|
"time": string,
|
||||||
"swap": float, [1]
|
"swap": float, # [1]
|
||||||
"code": float, [1]
|
"code": float, # [1]
|
||||||
"data": float, [1]
|
"data": float, # [1]
|
||||||
"major_page_fault_count": integer,
|
"major_page_fault_count": integer,
|
||||||
"minor_page_fault_count": integer,
|
"minor_page_fault_count": integer,
|
||||||
"dirty_pages_count": integer,
|
"dirty_pages_count": integer,
|
||||||
@ -106,7 +106,7 @@ Schema:
|
|||||||
]
|
]
|
||||||
"major_page_fault_count_delta": integer,
|
"major_page_fault_count_delta": integer,
|
||||||
"minor_page_fault_count_delta": integer,
|
"minor_page_fault_count_delta": integer,
|
||||||
"used": float, [1]
|
"used": float, # [1]
|
||||||
"ipc_namespace_inode": integer,
|
"ipc_namespace_inode": integer,
|
||||||
"mount_namespace_inode": integer,
|
"mount_namespace_inode": integer,
|
||||||
"net_namespace_inode": integer,
|
"net_namespace_inode": integer,
|
||||||
|
@ -38,8 +38,8 @@ Schema:
|
|||||||
"author": string,
|
"author": string,
|
||||||
"author_email": string,
|
"author_email": string,
|
||||||
"date": string,
|
"date": string,
|
||||||
"epoch": integer, [0]
|
"epoch": integer, # [0]
|
||||||
"epoch_utc": integer, [1]
|
"epoch_utc": integer, # [1]
|
||||||
"commit_by": string,
|
"commit_by": string,
|
||||||
"commit_by_email": string,
|
"commit_by_email": string,
|
||||||
"commit_by_date": string,
|
"commit_by_date": string,
|
||||||
|
@ -39,8 +39,8 @@ Schema:
|
|||||||
"author": string,
|
"author": string,
|
||||||
"author_email": string,
|
"author_email": string,
|
||||||
"date": string,
|
"date": string,
|
||||||
"epoch": integer, [0]
|
"epoch": integer, # [0]
|
||||||
"epoch_utc": integer, [1]
|
"epoch_utc": integer, # [1]
|
||||||
"commit_by": string,
|
"commit_by": string,
|
||||||
"commit_by_email": string,
|
"commit_by_email": string,
|
||||||
"commit_by_date": string,
|
"commit_by_date": string,
|
||||||
|
@ -21,8 +21,8 @@ Usage (module):
|
|||||||
|
|
||||||
Schema:
|
Schema:
|
||||||
|
|
||||||
ini or key/value document converted to a dictionary - see the
|
ini or key/value document converted to a dictionary - see the configparser
|
||||||
configparser standard library documentation for more details.
|
standard library documentation for more details.
|
||||||
|
|
||||||
{
|
{
|
||||||
"key1": string,
|
"key1": string,
|
||||||
|
@ -21,8 +21,8 @@ Usage (module):
|
|||||||
|
|
||||||
Schema:
|
Schema:
|
||||||
|
|
||||||
key/value document converted to a dictionary - see the
|
key/value document converted to a dictionary - see the configparser standard
|
||||||
configparser standard library documentation for more details.
|
library documentation for more details.
|
||||||
|
|
||||||
{
|
{
|
||||||
"key1": string,
|
"key1": string,
|
||||||
|
@ -35,7 +35,7 @@ Schema:
|
|||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"<key>": string/integer/float, [0]
|
"<key>": string/integer/float, # [0]
|
||||||
"dhcp4_option_x": {
|
"dhcp4_option_x": {
|
||||||
"name": string,
|
"name": string,
|
||||||
"value": string/integer/float,
|
"value": string/integer/float,
|
||||||
|
@ -46,8 +46,8 @@ Schema:
|
|||||||
"time": string,
|
"time": string,
|
||||||
"process": integer,
|
"process": integer,
|
||||||
"metadata": string,
|
"metadata": string,
|
||||||
"update_type": string/null, [0]
|
"update_type": string/null, # [0]
|
||||||
"file_type": string/null, [1]
|
"file_type": string/null, # [1]
|
||||||
"checksum_or_value_different": bool/null,
|
"checksum_or_value_different": bool/null,
|
||||||
"size_different": bool/null,
|
"size_different": bool/null,
|
||||||
"modification_time_different": bool/null,
|
"modification_time_different": bool/null,
|
||||||
@ -56,7 +56,7 @@ Schema:
|
|||||||
"group_different": bool/null,
|
"group_different": bool/null,
|
||||||
"acl_different": bool/null,
|
"acl_different": bool/null,
|
||||||
"extended_attribute_different": bool/null,
|
"extended_attribute_different": bool/null,
|
||||||
"epoch": integer, [2]
|
"epoch": integer, # [2]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -44,8 +44,8 @@ Schema:
|
|||||||
"time": string,
|
"time": string,
|
||||||
"process": integer,
|
"process": integer,
|
||||||
"metadata": string,
|
"metadata": string,
|
||||||
"update_type": string/null, [0]
|
"update_type": string/null, # [0]
|
||||||
"file_type": string/null, [1]
|
"file_type": string/null, # [1]
|
||||||
"checksum_or_value_different": bool/null,
|
"checksum_or_value_different": bool/null,
|
||||||
"size_different": bool/null,
|
"size_different": bool/null,
|
||||||
"modification_time_different": bool/null,
|
"modification_time_different": bool/null,
|
||||||
@ -54,7 +54,7 @@ Schema:
|
|||||||
"group_different": bool/null,
|
"group_different": bool/null,
|
||||||
"acl_different": bool/null,
|
"acl_different": bool/null,
|
||||||
"extended_attribute_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
|
# below object only exists if using -qq or ignore_exceptions=True
|
||||||
"_jc_meta": {
|
"_jc_meta": {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""jc - JSON Convert `/usr/bin/time` command output parser
|
"""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`.
|
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.
|
so `jc` can receive it.
|
||||||
|
|
||||||
> Note: `/usr/bin/time` is similar but different from the Bash builtin
|
> 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_hardware": float,
|
||||||
"cpu_software": float,
|
"cpu_software": float,
|
||||||
"cpu_steal": float,
|
"cpu_steal": float,
|
||||||
"mem_total": float, [0]
|
"mem_total": float, # [0]
|
||||||
"mem_free": float, [0]
|
"mem_free": float, # [0]
|
||||||
"mem_used": float, [0]
|
"mem_used": float, # [0]
|
||||||
"mem_buff_cache": float, [0]
|
"mem_buff_cache": float, # [0]
|
||||||
"swap_total": float, [0]
|
"swap_total": float, # [0]
|
||||||
"swap_free": float, [0]
|
"swap_free": float, # [0]
|
||||||
"swap_used": float, [0]
|
"swap_used": float, # [0]
|
||||||
"mem_available": float, [0]
|
"mem_available": float, # [0]
|
||||||
"processes": [
|
"processes": [
|
||||||
{
|
{
|
||||||
"pid": integer,
|
"pid": integer,
|
||||||
"user": string,
|
"user": string,
|
||||||
"priority": integer,
|
"priority": integer,
|
||||||
"nice": integer,
|
"nice": integer,
|
||||||
"virtual_mem": float, [1]
|
"virtual_mem": float, # [1]
|
||||||
"resident_mem": float, [1]
|
"resident_mem": float, # [1]
|
||||||
"shared_mem": float, [1]
|
"shared_mem": float, # [1]
|
||||||
"status": string,
|
"status": string,
|
||||||
"percent_cpu": float,
|
"percent_cpu": float,
|
||||||
"percent_mem": float,
|
"percent_mem": float,
|
||||||
@ -82,9 +82,9 @@ All `-` values are converted to `null`
|
|||||||
"thread_count": integer,
|
"thread_count": integer,
|
||||||
"last_used_processor": integer,
|
"last_used_processor": integer,
|
||||||
"time": string,
|
"time": string,
|
||||||
"swap": float, [1]
|
"swap": float, # [1]
|
||||||
"code": float, [1]
|
"code": float, # [1]
|
||||||
"data": float, [1]
|
"data": float, # [1]
|
||||||
"major_page_fault_count": integer,
|
"major_page_fault_count": integer,
|
||||||
"minor_page_fault_count": integer,
|
"minor_page_fault_count": integer,
|
||||||
"dirty_pages_count": integer,
|
"dirty_pages_count": integer,
|
||||||
@ -103,7 +103,7 @@ All `-` values are converted to `null`
|
|||||||
]
|
]
|
||||||
"major_page_fault_count_delta": integer,
|
"major_page_fault_count_delta": integer,
|
||||||
"minor_page_fault_count_delta": integer,
|
"minor_page_fault_count_delta": integer,
|
||||||
"used": float, [1]
|
"used": float, # [1]
|
||||||
"ipc_namespace_inode": integer,
|
"ipc_namespace_inode": integer,
|
||||||
"mount_namespace_inode": integer,
|
"mount_namespace_inode": integer,
|
||||||
"net_namespace_inode": integer,
|
"net_namespace_inode": integer,
|
||||||
|
@ -43,23 +43,23 @@ Schema:
|
|||||||
"cpu_hardware": float,
|
"cpu_hardware": float,
|
||||||
"cpu_software": float,
|
"cpu_software": float,
|
||||||
"cpu_steal": float,
|
"cpu_steal": float,
|
||||||
"mem_total": float, [0]
|
"mem_total": float, # [0]
|
||||||
"mem_free": float, [0]
|
"mem_free": float, # [0]
|
||||||
"mem_used": float, [0]
|
"mem_used": float, # [0]
|
||||||
"mem_buff_cache": float, [0]
|
"mem_buff_cache": float, # [0]
|
||||||
"swap_total": float, [0]
|
"swap_total": float, # [0]
|
||||||
"swap_free": float, [0]
|
"swap_free": float, # [0]
|
||||||
"swap_used": float, [0]
|
"swap_used": float, # [0]
|
||||||
"mem_available": float, [0]
|
"mem_available": float, # [0]
|
||||||
"processes": [
|
"processes": [
|
||||||
{
|
{
|
||||||
"pid": integer,
|
"pid": integer,
|
||||||
"user": string,
|
"user": string,
|
||||||
"priority": integer,
|
"priority": integer,
|
||||||
"nice": integer,
|
"nice": integer,
|
||||||
"virtual_mem": float, [1]
|
"virtual_mem": float, # [1]
|
||||||
"resident_mem": float, [1]
|
"resident_mem": float, # [1]
|
||||||
"shared_mem": float, [1]
|
"shared_mem": float, # [1]
|
||||||
"status": string,
|
"status": string,
|
||||||
"percent_cpu": float,
|
"percent_cpu": float,
|
||||||
"percent_mem": float,
|
"percent_mem": float,
|
||||||
@ -80,9 +80,9 @@ Schema:
|
|||||||
"thread_count": integer,
|
"thread_count": integer,
|
||||||
"last_used_processor": integer,
|
"last_used_processor": integer,
|
||||||
"time": string,
|
"time": string,
|
||||||
"swap": float, [1]
|
"swap": float, # [1]
|
||||||
"code": float, [1]
|
"code": float, # [1]
|
||||||
"data": float, [1]
|
"data": float, # [1]
|
||||||
"major_page_fault_count": integer,
|
"major_page_fault_count": integer,
|
||||||
"minor_page_fault_count": integer,
|
"minor_page_fault_count": integer,
|
||||||
"dirty_pages_count": integer,
|
"dirty_pages_count": integer,
|
||||||
@ -101,7 +101,7 @@ Schema:
|
|||||||
]
|
]
|
||||||
"major_page_fault_count_delta": integer,
|
"major_page_fault_count_delta": integer,
|
||||||
"minor_page_fault_count_delta": integer,
|
"minor_page_fault_count_delta": integer,
|
||||||
"used": float, [1]
|
"used": float, # [1]
|
||||||
"ipc_namespace_inode": integer,
|
"ipc_namespace_inode": integer,
|
||||||
"mount_namespace_inode": integer,
|
"mount_namespace_inode": integer,
|
||||||
"net_namespace_inode": integer,
|
"net_namespace_inode": integer,
|
||||||
|
Reference in New Issue
Block a user