mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
pidstat doc update
This commit is contained in:
@ -222,7 +222,7 @@ option.
|
|||||||
| ` --ntpq` | `ntpq -p` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/ntpq) |
|
| ` --ntpq` | `ntpq -p` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/ntpq) |
|
||||||
| ` --passwd` | `/etc/passwd` file parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/passwd) |
|
| ` --passwd` | `/etc/passwd` file parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/passwd) |
|
||||||
| ` --pidstat` | `pidstat -H` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/pidstat) |
|
| ` --pidstat` | `pidstat -H` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/pidstat) |
|
||||||
| ` --pidstat-s` | `pidstat -h` command streaming parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/pidstat_s) |
|
| ` --pidstat-s` | `pidstat -H` command streaming parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/pidstat_s) |
|
||||||
| ` --ping` | `ping` and `ping6` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/ping) |
|
| ` --ping` | `ping` and `ping6` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/ping) |
|
||||||
| ` --ping-s` | `ping` and `ping6` command streaming parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/ping_s) |
|
| ` --ping-s` | `ping` and `ping6` command streaming parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/ping_s) |
|
||||||
| ` --pip-list` | `pip list` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/pip_list) |
|
| ` --pip-list` | `pip list` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/pip_list) |
|
||||||
|
@ -165,7 +165,7 @@ _jc() {
|
|||||||
'--ntpq:`ntpq -p` command parser'
|
'--ntpq:`ntpq -p` command parser'
|
||||||
'--passwd:`/etc/passwd` file parser'
|
'--passwd:`/etc/passwd` file parser'
|
||||||
'--pidstat:`pidstat -H` command parser'
|
'--pidstat:`pidstat -H` command parser'
|
||||||
'--pidstat-s:`pidstat -h` command streaming parser'
|
'--pidstat-s:`pidstat -H` command streaming parser'
|
||||||
'--ping:`ping` and `ping6` command parser'
|
'--ping:`ping` and `ping6` command parser'
|
||||||
'--ping-s:`ping` and `ping6` command streaming parser'
|
'--ping-s:`ping` and `ping6` command streaming parser'
|
||||||
'--pip-list:`pip list` command parser'
|
'--pip-list:`pip list` command parser'
|
||||||
|
@ -10,11 +10,11 @@ All other `pidstat` options are supported in combination with this option.
|
|||||||
|
|
||||||
Usage (cli):
|
Usage (cli):
|
||||||
|
|
||||||
$ pidstat -h | jc --pidstat
|
$ pidstat -H | jc --pidstat
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
$ jc pidstat -h
|
$ jc pidstat -H
|
||||||
|
|
||||||
Usage (module):
|
Usage (module):
|
||||||
|
|
||||||
|
@ -3,17 +3,17 @@
|
|||||||
|
|
||||||
# jc.parsers.pidstat\_s
|
# jc.parsers.pidstat\_s
|
||||||
|
|
||||||
jc - JSON Convert `pidstat -h` command output streaming parser
|
jc - JSON Convert `pidstat -H` command output streaming parser
|
||||||
|
|
||||||
> This streaming parser outputs JSON Lines (cli) or returns an Iterable of
|
> This streaming parser outputs JSON Lines (cli) or returns an Iterable of
|
||||||
> Dictionaries (module)
|
> Dictionaries (module)
|
||||||
|
|
||||||
Must use the `-h` option in `pidstat`. All other `pidstat` options are
|
Must use the `-H` (or `-h`, if `-H` is not available) option in `pidstat`.
|
||||||
supported in combination with `-h`.
|
All other `pidstat` options are supported in combination with this option.
|
||||||
|
|
||||||
Usage (cli):
|
Usage (cli):
|
||||||
|
|
||||||
$ pidstat | jc --pidstat-s
|
$ pidstat -H | jc --pidstat-s
|
||||||
|
|
||||||
> Note: When piping `jc` converted `pidstat` output to other processes it
|
> Note: When piping `jc` converted `pidstat` output to other processes it
|
||||||
> may appear the output is hanging due to the OS pipe buffers. This is
|
> may appear the output is hanging due to the OS pipe buffers. This is
|
||||||
@ -65,13 +65,13 @@ Schema:
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ pidstat -hl | jc --pidstat-s
|
$ pidstat -Hl | jc --pidstat-s
|
||||||
{"time":1646859134,"uid":0,"pid":1,"percent_usr":0.0,"percent_syste...}
|
{"time":1646859134,"uid":0,"pid":1,"percent_usr":0.0,"percent_syste...}
|
||||||
{"time":1646859134,"uid":0,"pid":6,"percent_usr":0.0,"percent_syste...}
|
{"time":1646859134,"uid":0,"pid":6,"percent_usr":0.0,"percent_syste...}
|
||||||
{"time":1646859134,"uid":0,"pid":9,"percent_usr":0.0,"percent_syste...}
|
{"time":1646859134,"uid":0,"pid":9,"percent_usr":0.0,"percent_syste...}
|
||||||
...
|
...
|
||||||
|
|
||||||
$ pidstat -hl | jc --pidstat-s -r
|
$ pidstat -Hl | jc --pidstat-s -r
|
||||||
{"time":"1646859134","uid":"0","pid":"1","percent_usr":"0.00","perc...}
|
{"time":"1646859134","uid":"0","pid":"1","percent_usr":"0.00","perc...}
|
||||||
{"time":"1646859134","uid":"0","pid":"6","percent_usr":"0.00","perc...}
|
{"time":"1646859134","uid":"0","pid":"6","percent_usr":"0.00","perc...}
|
||||||
{"time":"1646859134","uid":"0","pid":"9","percent_usr":"0.00","perc...}
|
{"time":"1646859134","uid":"0","pid":"9","percent_usr":"0.00","perc...}
|
||||||
|
@ -5,11 +5,11 @@ All other `pidstat` options are supported in combination with this option.
|
|||||||
|
|
||||||
Usage (cli):
|
Usage (cli):
|
||||||
|
|
||||||
$ pidstat -h | jc --pidstat
|
$ pidstat -H | jc --pidstat
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
$ jc pidstat -h
|
$ jc pidstat -H
|
||||||
|
|
||||||
Usage (module):
|
Usage (module):
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
"""jc - JSON Convert `pidstat -h` command output streaming parser
|
"""jc - JSON Convert `pidstat -H` command output streaming parser
|
||||||
|
|
||||||
> This streaming parser outputs JSON Lines (cli) or returns an Iterable of
|
> This streaming parser outputs JSON Lines (cli) or returns an Iterable of
|
||||||
> Dictionaries (module)
|
> Dictionaries (module)
|
||||||
|
|
||||||
Must use the `-h` option in `pidstat`. All other `pidstat` options are
|
Must use the `-H` (or `-h`, if `-H` is not available) option in `pidstat`.
|
||||||
supported in combination with `-h`.
|
All other `pidstat` options are supported in combination with this option.
|
||||||
|
|
||||||
Usage (cli):
|
Usage (cli):
|
||||||
|
|
||||||
$ pidstat | jc --pidstat-s
|
$ pidstat -H | jc --pidstat-s
|
||||||
|
|
||||||
> Note: When piping `jc` converted `pidstat` output to other processes it
|
> Note: When piping `jc` converted `pidstat` output to other processes it
|
||||||
> may appear the output is hanging due to the OS pipe buffers. This is
|
> may appear the output is hanging due to the OS pipe buffers. This is
|
||||||
@ -60,13 +60,13 @@ Schema:
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ pidstat -hl | jc --pidstat-s
|
$ pidstat -Hl | jc --pidstat-s
|
||||||
{"time":1646859134,"uid":0,"pid":1,"percent_usr":0.0,"percent_syste...}
|
{"time":1646859134,"uid":0,"pid":1,"percent_usr":0.0,"percent_syste...}
|
||||||
{"time":1646859134,"uid":0,"pid":6,"percent_usr":0.0,"percent_syste...}
|
{"time":1646859134,"uid":0,"pid":6,"percent_usr":0.0,"percent_syste...}
|
||||||
{"time":1646859134,"uid":0,"pid":9,"percent_usr":0.0,"percent_syste...}
|
{"time":1646859134,"uid":0,"pid":9,"percent_usr":0.0,"percent_syste...}
|
||||||
...
|
...
|
||||||
|
|
||||||
$ pidstat -hl | jc --pidstat-s -r
|
$ pidstat -Hl | jc --pidstat-s -r
|
||||||
{"time":"1646859134","uid":"0","pid":"1","percent_usr":"0.00","perc...}
|
{"time":"1646859134","uid":"0","pid":"1","percent_usr":"0.00","perc...}
|
||||||
{"time":"1646859134","uid":"0","pid":"6","percent_usr":"0.00","perc...}
|
{"time":"1646859134","uid":"0","pid":"6","percent_usr":"0.00","perc...}
|
||||||
{"time":"1646859134","uid":"0","pid":"9","percent_usr":"0.00","perc...}
|
{"time":"1646859134","uid":"0","pid":"9","percent_usr":"0.00","perc...}
|
||||||
@ -84,7 +84,7 @@ from jc.exceptions import ParseError
|
|||||||
class info():
|
class info():
|
||||||
"""Provides parser metadata (version, author, etc.)"""
|
"""Provides parser metadata (version, author, etc.)"""
|
||||||
version = '1.1'
|
version = '1.1'
|
||||||
description = '`pidstat -h` command streaming parser'
|
description = '`pidstat -H` command streaming parser'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
compatible = ['linux']
|
compatible = ['linux']
|
||||||
|
Reference in New Issue
Block a user