diff --git a/README.md b/README.md index d295fafb..8411b9df 100644 --- a/README.md +++ b/README.md @@ -221,7 +221,7 @@ option. | ` --nmcli` | `nmcli` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/nmcli) | | ` --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` | `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) | | ` --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) | diff --git a/completions/jc_zsh_completion.sh b/completions/jc_zsh_completion.sh index 13cddabf..3b250a45 100644 --- a/completions/jc_zsh_completion.sh +++ b/completions/jc_zsh_completion.sh @@ -164,7 +164,7 @@ _jc() { '--nmcli:`nmcli` command parser' '--ntpq:`ntpq -p` command parser' '--passwd:`/etc/passwd` file parser' - '--pidstat:`pidstat -h` command parser' + '--pidstat:`pidstat -H` command parser' '--pidstat-s:`pidstat -h` command streaming parser' '--ping:`ping` and `ping6` command parser' '--ping-s:`ping` and `ping6` command streaming parser' diff --git a/docs/parsers/pidstat.md b/docs/parsers/pidstat.md index e8d97af5..0d536aa5 100644 --- a/docs/parsers/pidstat.md +++ b/docs/parsers/pidstat.md @@ -3,10 +3,10 @@ # jc.parsers.pidstat -jc - JSON Convert `pidstat -h` command output parser +jc - JSON Convert `pidstat -H` command output parser -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): @@ -51,7 +51,7 @@ Schema: Examples: - $ pidstat -hl | jc --pidstat -p + $ pidstat -Hl | jc --pidstat -p [ { "time": 1646859134, @@ -88,7 +88,7 @@ Examples: } ] - $ pidstat -hl | jc --pidstat -p -r + $ pidstat -Hl | jc --pidstat -p -r [ { "time": "1646859134", diff --git a/jc/parsers/pidstat.py b/jc/parsers/pidstat.py index ee031eae..65742006 100644 --- a/jc/parsers/pidstat.py +++ b/jc/parsers/pidstat.py @@ -1,7 +1,7 @@ -"""jc - JSON Convert `pidstat -h` command output parser +"""jc - JSON Convert `pidstat -H` command output parser -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): @@ -46,7 +46,7 @@ Schema: Examples: - $ pidstat -hl | jc --pidstat -p + $ pidstat -Hl | jc --pidstat -p [ { "time": 1646859134, @@ -83,7 +83,7 @@ Examples: } ] - $ pidstat -hl | jc --pidstat -p -r + $ pidstat -Hl | jc --pidstat -p -r [ { "time": "1646859134", @@ -129,7 +129,7 @@ from jc.exceptions import ParseError class info(): """Provides parser metadata (version, author, etc.)""" version = '1.1' - description = '`pidstat -h` command parser' + description = '`pidstat -H` command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' compatible = ['linux'] @@ -210,7 +210,7 @@ def parse( .replace('%', 'percent_')\ .lower() - # remove remaining header lines (e.g. pidstat -h 2 5) + # remove remaining header lines (e.g. pidstat -H 2 5) data_list = [i for i in data_list if not i.startswith('#')] raw_output = simple_table_parse(data_list) diff --git a/man/jc.1 b/man/jc.1 index 4c63ebd3..40a41991 100644 --- a/man/jc.1 +++ b/man/jc.1 @@ -368,7 +368,7 @@ M3U and M3U8 file parser .TP .B \fB--pidstat\fP -`pidstat -h` command parser +`pidstat -H` command parser .TP .B