From 7c0e43b2e147b9a0cfa3c737f91fcccde28f45f0 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Thu, 22 Sep 2022 14:41:40 -0700 Subject: [PATCH] pidstat doc update --- README.md | 2 +- completions/jc_zsh_completion.sh | 2 +- docs/parsers/pidstat.md | 4 ++-- docs/parsers/pidstat_s.md | 12 ++++++------ jc/parsers/pidstat.py | 4 ++-- jc/parsers/pidstat_s.py | 14 +++++++------- man/jc.1 | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 8411b9df..709ee872 100644 --- a/README.md +++ b/README.md @@ -222,7 +222,7 @@ option. | ` --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) | | ` --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-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) | diff --git a/completions/jc_zsh_completion.sh b/completions/jc_zsh_completion.sh index 3b250a45..ced2aa52 100644 --- a/completions/jc_zsh_completion.sh +++ b/completions/jc_zsh_completion.sh @@ -165,7 +165,7 @@ _jc() { '--ntpq:`ntpq -p` command parser' '--passwd:`/etc/passwd` file 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-s:`ping` and `ping6` command streaming parser' '--pip-list:`pip list` command parser' diff --git a/docs/parsers/pidstat.md b/docs/parsers/pidstat.md index 0d536aa5..b40ad23c 100644 --- a/docs/parsers/pidstat.md +++ b/docs/parsers/pidstat.md @@ -10,11 +10,11 @@ All other `pidstat` options are supported in combination with this option. Usage (cli): - $ pidstat -h | jc --pidstat + $ pidstat -H | jc --pidstat or - $ jc pidstat -h + $ jc pidstat -H Usage (module): diff --git a/docs/parsers/pidstat_s.md b/docs/parsers/pidstat_s.md index 3de747c8..f3639c16 100644 --- a/docs/parsers/pidstat_s.md +++ b/docs/parsers/pidstat_s.md @@ -3,17 +3,17 @@ # 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 > Dictionaries (module) -Must use the `-h` option in `pidstat`. All other `pidstat` options are -supported in combination with `-h`. +Must use the `-H` (or `-h`, if `-H` is not available) option in `pidstat`. +All other `pidstat` options are supported in combination with this option. Usage (cli): - $ pidstat | jc --pidstat-s + $ pidstat -H | jc --pidstat-s > 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 @@ -65,13 +65,13 @@ Schema: 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":6,"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":"6","percent_usr":"0.00","perc...} {"time":"1646859134","uid":"0","pid":"9","percent_usr":"0.00","perc...} diff --git a/jc/parsers/pidstat.py b/jc/parsers/pidstat.py index 65742006..b89427d0 100644 --- a/jc/parsers/pidstat.py +++ b/jc/parsers/pidstat.py @@ -5,11 +5,11 @@ All other `pidstat` options are supported in combination with this option. Usage (cli): - $ pidstat -h | jc --pidstat + $ pidstat -H | jc --pidstat or - $ jc pidstat -h + $ jc pidstat -H Usage (module): diff --git a/jc/parsers/pidstat_s.py b/jc/parsers/pidstat_s.py index 9242d97a..f27cd9bf 100644 --- a/jc/parsers/pidstat_s.py +++ b/jc/parsers/pidstat_s.py @@ -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 > Dictionaries (module) -Must use the `-h` option in `pidstat`. All other `pidstat` options are -supported in combination with `-h`. +Must use the `-H` (or `-h`, if `-H` is not available) option in `pidstat`. +All other `pidstat` options are supported in combination with this option. Usage (cli): - $ pidstat | jc --pidstat-s + $ pidstat -H | jc --pidstat-s > 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 @@ -60,13 +60,13 @@ Schema: 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":6,"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":"6","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(): """Provides parser metadata (version, author, etc.)""" version = '1.1' - description = '`pidstat -h` command streaming parser' + description = '`pidstat -H` command streaming parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' compatible = ['linux'] diff --git a/man/jc.1 b/man/jc.1 index 40a41991..0888ea5b 100644 --- a/man/jc.1 +++ b/man/jc.1 @@ -373,7 +373,7 @@ M3U and M3U8 file parser .TP .B \fB--pidstat-s\fP -`pidstat -h` command streaming parser +`pidstat -H` command streaming parser .TP .B