From aa31628970b12295a41dff20e829fcce9f8a4d07 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Sat, 30 May 2020 20:33:00 -0700 Subject: [PATCH] update docs --- README.md | 46 ++++++++++++++++++++----------------- docs/parsers/netstat.md | 16 ++++++++++--- docs/parsers/route.md | 51 ++++++++++++++--------------------------- docs/parsers/stat.md | 4 ++-- jc/parsers/netstat.py | 16 ++++++++++--- 5 files changed, 70 insertions(+), 63 deletions(-) diff --git a/README.md b/README.md index d0dc1e76..1ad9f9ea 100644 --- a/README.md +++ b/README.md @@ -1699,7 +1699,11 @@ $ netstat -r | jc --netstat -p # or: jc -p netstat -r "window": 0, "irtt": 0, "iface": "ens33", - "kind": "route" + "kind": "route", + "route_flags_pretty": [ + "UP", + "GATEWAY" + ] }, { "destination": "172.17.0.0", @@ -1710,7 +1714,10 @@ $ netstat -r | jc --netstat -p # or: jc -p netstat -r "window": 0, "irtt": 0, "iface": "docker0", - "kind": "route" + "kind": "route", + "route_flags_pretty": [ + "UP" + ] }, { "destination": "192.168.71.0", @@ -1721,7 +1728,10 @@ $ netstat -r | jc --netstat -p # or: jc -p netstat -r "window": 0, "irtt": 0, "iface": "ens33", - "kind": "route" + "kind": "route", + "route_flags_pretty": [ + "UP" + ] } ] @@ -1961,42 +1971,36 @@ $ route -ee | jc --route -p # or: jc -p route -ee [ { "destination": "default", - "gateway": "gateway", + "gateway": "_gateway", "genmask": "0.0.0.0", "flags": "UG", - "metric": 100, + "metric": 202, "ref": 0, "use": 0, "iface": "ens33", "mss": 0, "window": 0, - "irtt": 0 - }, - { - "destination": "172.17.0.0", - "gateway": "0.0.0.0", - "genmask": "255.255.0.0", - "flags": "U", - "metric": 0, - "ref": 0, - "use": 0, - "iface": "docker", - "mss": 0, - "window": 0, - "irtt": 0 + "irtt": 0, + "flags_pretty": [ + "UP", + "GATEWAY" + ] }, { "destination": "192.168.71.0", "gateway": "0.0.0.0", "genmask": "255.255.255.0", "flags": "U", - "metric": 100, + "metric": 202, "ref": 0, "use": 0, "iface": "ens33", "mss": 0, "window": 0, - "irtt": 0 + "irtt": 0, + "flags_pretty": [ + "UP" + ] } ] ``` diff --git a/docs/parsers/netstat.md b/docs/parsers/netstat.md index 21b251a9..e2bbdad4 100644 --- a/docs/parsers/netstat.md +++ b/docs/parsers/netstat.md @@ -177,7 +177,11 @@ Examples: "window": 0, "irtt": 0, "iface": "ens33", - "kind": "route" + "kind": "route", + "route_flags_pretty": [ + "UP", + "GATEWAY" + ] }, { "destination": "172.17.0.0", @@ -188,7 +192,10 @@ Examples: "window": 0, "irtt": 0, "iface": "docker0", - "kind": "route" + "kind": "route", + "route_flags_pretty": [ + "UP" + ] }, { "destination": "192.168.71.0", @@ -199,7 +206,10 @@ Examples: "window": 0, "irtt": 0, "iface": "ens33", - "kind": "route" + "kind": "route", + "route_flags_pretty": [ + "UP" + ] } ] diff --git a/docs/parsers/route.md b/docs/parsers/route.md index 1a42f932..d2206f81 100644 --- a/docs/parsers/route.md +++ b/docs/parsers/route.md @@ -15,53 +15,48 @@ Examples: [ { "destination": "default", - "gateway": "gateway", + "gateway": "_gateway", "genmask": "0.0.0.0", "flags": "UG", - "metric": 100, + "metric": 202, "ref": 0, "use": 0, "iface": "ens33", "mss": 0, "window": 0, - "irtt": 0 - }, - { - "destination": "172.17.0.0", - "gateway": "0.0.0.0", - "genmask": "255.255.0.0", - "flags": "U", - "metric": 0, - "ref": 0, - "use": 0, - "iface": "docker", - "mss": 0, - "window": 0, - "irtt": 0 + "irtt": 0, + "flags_pretty": [ + "UP", + "GATEWAY" + ] }, { "destination": "192.168.71.0", "gateway": "0.0.0.0", "genmask": "255.255.255.0", "flags": "U", - "metric": 100, + "metric": 202, "ref": 0, "use": 0, "iface": "ens33", "mss": 0, "window": 0, - "irtt": 0 + "irtt": 0, + "flags_pretty": [ + "UP" + ] } ] + $ route -ee | jc --route -p -r [ { "destination": "default", - "gateway": "gateway", + "gateway": "_gateway", "genmask": "0.0.0.0", "flags": "UG", - "metric": "100", + "metric": "202", "ref": "0", "use": "0", "iface": "ens33", @@ -69,25 +64,12 @@ Examples: "window": "0", "irtt": "0" }, - { - "destination": "172.17.0.0", - "gateway": "0.0.0.0", - "genmask": "255.255.0.0", - "flags": "U", - "metric": "0", - "ref": "0", - "use": "0", - "iface": "docker", - "mss": "0", - "window": "0", - "irtt": "0" - }, { "destination": "192.168.71.0", "gateway": "0.0.0.0", "genmask": "255.255.255.0", "flags": "U", - "metric": "100", + "metric": "202", "ref": "0", "use": "0", "iface": "ens33", @@ -97,6 +79,7 @@ Examples: } ] + ## info ```python info(self, /, *args, **kwargs) diff --git a/docs/parsers/stat.md b/docs/parsers/stat.md index c0b6b5a2..20b6f3b1 100644 --- a/docs/parsers/stat.md +++ b/docs/parsers/stat.md @@ -142,10 +142,10 @@ Returns: "modify_time": string, # - = null "change_time": string, # - = null "birth_time": string, # - = null - "osx_device": integer, + "unix_device": integer, "rdev": integer, "block_size": integer, - "osx_flags": string + "unix_flags": string } ] diff --git a/jc/parsers/netstat.py b/jc/parsers/netstat.py index f0f9b021..7547ddb2 100644 --- a/jc/parsers/netstat.py +++ b/jc/parsers/netstat.py @@ -176,7 +176,11 @@ Examples: "window": 0, "irtt": 0, "iface": "ens33", - "kind": "route" + "kind": "route", + "route_flags_pretty": [ + "UP", + "GATEWAY" + ] }, { "destination": "172.17.0.0", @@ -187,7 +191,10 @@ Examples: "window": 0, "irtt": 0, "iface": "docker0", - "kind": "route" + "kind": "route", + "route_flags_pretty": [ + "UP" + ] }, { "destination": "192.168.71.0", @@ -198,7 +205,10 @@ Examples: "window": 0, "irtt": 0, "iface": "ens33", - "kind": "route" + "kind": "route", + "route_flags_pretty": [ + "UP" + ] } ]