mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
212
README.md
212
README.md
@ -133,7 +133,7 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio
|
|||||||
- `--hosts` enables the `/etc/hosts` file parser
|
- `--hosts` enables the `/etc/hosts` file parser
|
||||||
- `--id` enables the `id` command parser
|
- `--id` enables the `id` command parser
|
||||||
- `--ifconfig` enables the `ifconfig` command parser
|
- `--ifconfig` enables the `ifconfig` command parser
|
||||||
- `--ini` enables the `INI` file parser
|
- `--ini` enables the `INI` file parser. Also parses files/output containing simple key/value pairs
|
||||||
- `--iptables` enables the `iptables` command parser
|
- `--iptables` enables the `iptables` command parser
|
||||||
- `--jobs` enables the `jobs` command parser
|
- `--jobs` enables the `jobs` command parser
|
||||||
- `--last` enables the `last` and `lastb` command parser
|
- `--last` enables the `last` and `lastb` command parser
|
||||||
@ -145,6 +145,7 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio
|
|||||||
- `--netstat` enables the `netstat` command parser
|
- `--netstat` enables the `netstat` command parser
|
||||||
- `--ntpq` enables the `ntpq -p` command parser
|
- `--ntpq` enables the `ntpq -p` command parser
|
||||||
- `--passwd` enables the `/etc/passwd` file parser
|
- `--passwd` enables the `/etc/passwd` file parser
|
||||||
|
- `--ping` enables the `ping` and `ping6` command parser
|
||||||
- `--pip-list` enables the `pip list` command parser
|
- `--pip-list` enables the `pip list` command parser
|
||||||
- `--pip-show` enables the `pip show` command parser
|
- `--pip-show` enables the `pip show` command parser
|
||||||
- `--ps` enables the `ps` command parser
|
- `--ps` enables the `ps` command parser
|
||||||
@ -158,6 +159,8 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio
|
|||||||
- `--systemctl-ls` enables the `systemctl list-sockets` command parser
|
- `--systemctl-ls` enables the `systemctl list-sockets` command parser
|
||||||
- `--systemctl-luf` enables the `systemctl list-unit-files` command parser
|
- `--systemctl-luf` enables the `systemctl list-unit-files` command parser
|
||||||
- `--timedatectl` enables the `timedatectl status` command parser
|
- `--timedatectl` enables the `timedatectl status` command parser
|
||||||
|
- `--tracepath` enables the `tracepath` and `tracepath6` command parser
|
||||||
|
- `--traceroute` enables the `traceroute` and `traceroute6` command parser
|
||||||
- `--uname` enables the `uname -a` command parser
|
- `--uname` enables the `uname -a` command parser
|
||||||
- `--uptime` enables the `uptime` command parser
|
- `--uptime` enables the `uptime` command parser
|
||||||
- `--w` enables the `w` command parser
|
- `--w` enables the `w` command parser
|
||||||
@ -229,6 +232,7 @@ Feel free to add/improve code or parsers! You can use the [`jc/parsers/foo.py`](
|
|||||||
- [`ifconfig-parser`](https://github.com/KnightWhoSayNi/ifconfig-parser) module by KnightWhoSayNi
|
- [`ifconfig-parser`](https://github.com/KnightWhoSayNi/ifconfig-parser) module by KnightWhoSayNi
|
||||||
- [`xmltodict`](https://github.com/martinblech/xmltodict) module by Martín Blech
|
- [`xmltodict`](https://github.com/martinblech/xmltodict) module by Martín Blech
|
||||||
- [`ruamel.yaml`](https://pypi.org/project/ruamel.yaml) module by Anthon van der Neut
|
- [`ruamel.yaml`](https://pypi.org/project/ruamel.yaml) module by Anthon van der Neut
|
||||||
|
- [`trparse`](https://github.com/lbenitez000/trparse) module by Luis Benitez
|
||||||
- Parsing [code](https://gist.github.com/cahna/43a1a3ff4d075bcd71f9d7120037a501) from Conor Heine adapted for some parsers
|
- Parsing [code](https://gist.github.com/cahna/43a1a3ff4d075bcd71f9d7120037a501) from Conor Heine adapted for some parsers
|
||||||
- Excellent constructive feedback from [Ilya Sher](https://github.com/ilyash-b)
|
- Excellent constructive feedback from [Ilya Sher](https://github.com/ilyash-b)
|
||||||
|
|
||||||
@ -1239,7 +1243,7 @@ ifconfig | jc --ifconfig -p # or: jc -p ifconfig
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
### INI files
|
### INI and plain key/value pair files
|
||||||
```bash
|
```bash
|
||||||
cat example.ini
|
cat example.ini
|
||||||
```
|
```
|
||||||
@ -1278,6 +1282,31 @@ cat example.ini | jc --ini -p
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
```bash
|
||||||
|
cat keyvalue.txt
|
||||||
|
```
|
||||||
|
```
|
||||||
|
# this file contains key/value pairs
|
||||||
|
name = John Doe
|
||||||
|
address=555 California Drive
|
||||||
|
age: 34
|
||||||
|
; comments can include # or ;
|
||||||
|
# delimiter can be = or :
|
||||||
|
# quoted values have quotation marks stripped by default
|
||||||
|
# but can be preserved with the -r argument
|
||||||
|
occupation:"Engineer"
|
||||||
|
```
|
||||||
|
```bash
|
||||||
|
cat keyvalue.txt | jc --ini -p
|
||||||
|
```
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "John Doe",
|
||||||
|
"address": "555 California Drive",
|
||||||
|
"age": "34",
|
||||||
|
"occupation": "Engineer"
|
||||||
|
}
|
||||||
|
```
|
||||||
### iptables
|
### iptables
|
||||||
```bash
|
```bash
|
||||||
iptables --line-numbers -v -L -t nat | jc --iptables -p # or: jc -p iptables --line-numbers -v -L -t nat
|
iptables --line-numbers -v -L -t nat | jc --iptables -p # or: jc -p iptables --line-numbers -v -L -t nat
|
||||||
@ -1910,6 +1939,59 @@ cat /etc/passwd | jc --passwd -p
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
### ping
|
||||||
|
```bash
|
||||||
|
ping 8.8.8.8 -c 3 | jc --ping -p # or: jc -p ping 8.8.8.8 -c 3
|
||||||
|
```
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"destination_ip": "8.8.8.8",
|
||||||
|
"data_bytes": 56,
|
||||||
|
"pattern": null,
|
||||||
|
"destination": "8.8.8.8",
|
||||||
|
"packets_transmitted": 3,
|
||||||
|
"packets_received": 3,
|
||||||
|
"packet_loss_percent": 0.0,
|
||||||
|
"duplicates": 0,
|
||||||
|
"time_ms": 2005.0,
|
||||||
|
"round_trip_ms_min": 23.835,
|
||||||
|
"round_trip_ms_avg": 30.46,
|
||||||
|
"round_trip_ms_max": 34.838,
|
||||||
|
"round_trip_ms_stddev": 4.766,
|
||||||
|
"responses": [
|
||||||
|
{
|
||||||
|
"type": "reply",
|
||||||
|
"timestamp": null,
|
||||||
|
"bytes": 64,
|
||||||
|
"response_ip": "8.8.8.8",
|
||||||
|
"icmp_seq": 1,
|
||||||
|
"ttl": 118,
|
||||||
|
"time_ms": 23.8,
|
||||||
|
"duplicate": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "reply",
|
||||||
|
"timestamp": null,
|
||||||
|
"bytes": 64,
|
||||||
|
"response_ip": "8.8.8.8",
|
||||||
|
"icmp_seq": 2,
|
||||||
|
"ttl": 118,
|
||||||
|
"time_ms": 34.8,
|
||||||
|
"duplicate": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "reply",
|
||||||
|
"timestamp": null,
|
||||||
|
"bytes": 64,
|
||||||
|
"response_ip": "8.8.8.8",
|
||||||
|
"icmp_seq": 3,
|
||||||
|
"ttl": 118,
|
||||||
|
"time_ms": 32.7,
|
||||||
|
"duplicate": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
### pip list
|
### pip list
|
||||||
```bash
|
```bash
|
||||||
pip list | jc --pip-list -p # or: jc -p pip list # or: jc -p pip3 list
|
pip list | jc --pip-list -p # or: jc -p pip list # or: jc -p pip3 list
|
||||||
@ -1929,7 +2011,6 @@ pip list | jc --pip-list -p # or: jc -p pip list # or: jc -p
|
|||||||
"version": "0.24.0"
|
"version": "0.24.0"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
```
|
```
|
||||||
### pip show
|
### pip show
|
||||||
```bash
|
```bash
|
||||||
@ -2422,6 +2503,131 @@ timedatectl | jc --timedatectl -p # or: jc -p timedatectl
|
|||||||
"dst_active": true
|
"dst_active": true
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
### tracepath
|
||||||
|
```bash
|
||||||
|
tracepath6 3ffe:2400:0:109::2 | jc --tracepath -p
|
||||||
|
```
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"pmtu": 1480,
|
||||||
|
"forward_hops": 2,
|
||||||
|
"return_hops": 2,
|
||||||
|
"hops": [
|
||||||
|
{
|
||||||
|
"ttl": 1,
|
||||||
|
"guess": true,
|
||||||
|
"host": "[LOCALHOST]",
|
||||||
|
"reply_ms": null,
|
||||||
|
"pmtu": 1500,
|
||||||
|
"asymmetric_difference": null,
|
||||||
|
"reached": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ttl": 1,
|
||||||
|
"guess": false,
|
||||||
|
"host": "dust.inr.ac.ru",
|
||||||
|
"reply_ms": 0.411,
|
||||||
|
"pmtu": null,
|
||||||
|
"asymmetric_difference": null,
|
||||||
|
"reached": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ttl": 2,
|
||||||
|
"guess": false,
|
||||||
|
"host": "dust.inr.ac.ru",
|
||||||
|
"reply_ms": 0.39,
|
||||||
|
"pmtu": 1480,
|
||||||
|
"asymmetric_difference": 1,
|
||||||
|
"reached": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ttl": 2,
|
||||||
|
"guess": false,
|
||||||
|
"host": "3ffe:2400:0:109::2",
|
||||||
|
"reply_ms": 463.514,
|
||||||
|
"pmtu": null,
|
||||||
|
"asymmetric_difference": null,
|
||||||
|
"reached": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
### traceroute
|
||||||
|
```bash
|
||||||
|
traceroute -m 3 8.8.8.8 | jc --traceroute -p # or: jc -p traceroute -m 3 8.8.8.8
|
||||||
|
```
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"destination_ip": "8.8.8.8",
|
||||||
|
"destination_name": "8.8.8.8",
|
||||||
|
"hops": [
|
||||||
|
{
|
||||||
|
"hop": 1,
|
||||||
|
"probes": [
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "192.168.1.254",
|
||||||
|
"name": "dsldevice.local.net",
|
||||||
|
"rtt": 6.616
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "192.168.1.254",
|
||||||
|
"name": "dsldevice.local.net",
|
||||||
|
"rtt": 6.413
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "192.168.1.254",
|
||||||
|
"name": "dsldevice.local.net",
|
||||||
|
"rtt": 6.308
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hop": 2,
|
||||||
|
"probes": [
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "76.220.24.1",
|
||||||
|
"name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net",
|
||||||
|
"rtt": 29.367
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "76.220.24.1",
|
||||||
|
"name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net",
|
||||||
|
"rtt": 40.197
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "76.220.24.1",
|
||||||
|
"name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net",
|
||||||
|
"rtt": 29.162
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hop": 3,
|
||||||
|
"probes": [
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": null,
|
||||||
|
"name": null,
|
||||||
|
"rtt": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
### uname -a
|
### uname -a
|
||||||
```bash
|
```bash
|
||||||
uname -a | jc --uname -p # or: jc -p uname -a
|
uname -a | jc --uname -p # or: jc -p uname -a
|
||||||
|
@ -1,10 +1,18 @@
|
|||||||
jc changelog
|
jc changelog
|
||||||
|
|
||||||
|
20200727 v1.13.0
|
||||||
|
- Add ping and ping6 command parser tested on linux, macos, and freebsd
|
||||||
|
- Add traceroute and traceroute6 command parser tested on linux, macos, and freebsd
|
||||||
|
- Add tracepath command parser tested on linux
|
||||||
|
- Update ini parser to support files only containing key/value pairs
|
||||||
|
- Update uname parser exception with a hint to use "uname -a"
|
||||||
|
- Update route parser to support IPv6 tables
|
||||||
|
|
||||||
20200711 v1.12.1
|
20200711 v1.12.1
|
||||||
- Fix tests when using older version of pygments library
|
- Fix tests when using older version of pygments library
|
||||||
|
|
||||||
20200710 v1.12.0
|
20200710 v1.12.0
|
||||||
- Add sysctl command parser tested on linux, macOS, and freebsd12
|
- Add sysctl command parser tested on linux, macOS, and freebsd
|
||||||
- Update the cli code to allow older versions of the pygments library (2.3.0) for debian packaging
|
- Update the cli code to allow older versions of the pygments library (2.3.0) for debian packaging
|
||||||
- Code cleanup on the cli
|
- Code cleanup on the cli
|
||||||
- Add tests for the cli
|
- Add tests for the cli
|
||||||
|
@ -37,6 +37,7 @@ pydocmd simple jc.parsers.mount+ > ../docs/parsers/mount.md
|
|||||||
pydocmd simple jc.parsers.netstat+ > ../docs/parsers/netstat.md
|
pydocmd simple jc.parsers.netstat+ > ../docs/parsers/netstat.md
|
||||||
pydocmd simple jc.parsers.ntpq+ > ../docs/parsers/ntpq.md
|
pydocmd simple jc.parsers.ntpq+ > ../docs/parsers/ntpq.md
|
||||||
pydocmd simple jc.parsers.passwd+ > ../docs/parsers/passwd.md
|
pydocmd simple jc.parsers.passwd+ > ../docs/parsers/passwd.md
|
||||||
|
pydocmd simple jc.parsers.ping+ > ../docs/parsers/ping.md
|
||||||
pydocmd simple jc.parsers.pip_list+ > ../docs/parsers/pip_list.md
|
pydocmd simple jc.parsers.pip_list+ > ../docs/parsers/pip_list.md
|
||||||
pydocmd simple jc.parsers.pip_show+ > ../docs/parsers/pip_show.md
|
pydocmd simple jc.parsers.pip_show+ > ../docs/parsers/pip_show.md
|
||||||
pydocmd simple jc.parsers.ps+ > ../docs/parsers/ps.md
|
pydocmd simple jc.parsers.ps+ > ../docs/parsers/ps.md
|
||||||
@ -50,6 +51,8 @@ pydocmd simple jc.parsers.systemctl_lj+ > ../docs/parsers/systemctl_lj.md
|
|||||||
pydocmd simple jc.parsers.systemctl_ls+ > ../docs/parsers/systemctl_ls.md
|
pydocmd simple jc.parsers.systemctl_ls+ > ../docs/parsers/systemctl_ls.md
|
||||||
pydocmd simple jc.parsers.systemctl_luf+ > ../docs/parsers/systemctl_luf.md
|
pydocmd simple jc.parsers.systemctl_luf+ > ../docs/parsers/systemctl_luf.md
|
||||||
pydocmd simple jc.parsers.timedatectl+ > ../docs/parsers/timedatectl.md
|
pydocmd simple jc.parsers.timedatectl+ > ../docs/parsers/timedatectl.md
|
||||||
|
pydocmd simple jc.parsers.tracepath+ > ../docs/parsers/tracepath.md
|
||||||
|
pydocmd simple jc.parsers.traceroute+ > ../docs/parsers/traceroute.md
|
||||||
pydocmd simple jc.parsers.uname+ > ../docs/parsers/uname.md
|
pydocmd simple jc.parsers.uname+ > ../docs/parsers/uname.md
|
||||||
pydocmd simple jc.parsers.uptime+ > ../docs/parsers/uptime.md
|
pydocmd simple jc.parsers.uptime+ > ../docs/parsers/uptime.md
|
||||||
pydocmd simple jc.parsers.w+ > ../docs/parsers/w.md
|
pydocmd simple jc.parsers.w+ > ../docs/parsers/w.md
|
||||||
|
@ -3,7 +3,9 @@ jc - JSON CLI output utility INI Parser
|
|||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
specify --ini as the first argument if the piped input is coming from an INI file
|
Specify --ini as the first argument if the piped input is coming from an INI file or any
|
||||||
|
simple key/value pair file. Delimiter can be '=' or ':'. Missing values are supported.
|
||||||
|
Comment prefix can be '#' or ';'. Comments must be on their own line.
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
@ -61,11 +63,14 @@ Parameters:
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Dictionary representing an ini document:
|
Dictionary representing an ini or simple key/value pair document:
|
||||||
|
|
||||||
{
|
{
|
||||||
ini document converted to a dictionary
|
ini or key/value document converted to a dictionary - see configparser standard
|
||||||
see configparser standard library documentation for more details
|
library documentation for more details.
|
||||||
|
|
||||||
|
Note: Values starting and ending with quotation marks will have the marks removed.
|
||||||
|
If you would like to keep the quotation marks, use the -r or raw=True argument.
|
||||||
}
|
}
|
||||||
|
|
||||||
## parse
|
## parse
|
||||||
|
171
docs/parsers/ping.md
Normal file
171
docs/parsers/ping.md
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
# jc.parsers.ping
|
||||||
|
jc - JSON CLI output utility ping Parser
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
specify --ping as the first argument if the piped input is coming from ping
|
||||||
|
|
||||||
|
Note: Use the ping -c (count) option, otherwise data will not be piped to jc.
|
||||||
|
|
||||||
|
Compatibility:
|
||||||
|
|
||||||
|
'linux', 'darwin', 'freebsd'
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
$ ping -c 3 -p ff cnn.com | jc --ping -p
|
||||||
|
{
|
||||||
|
"destination_ip": "151.101.1.67",
|
||||||
|
"data_bytes": 56,
|
||||||
|
"pattern": "0xff",
|
||||||
|
"destination": "cnn.com",
|
||||||
|
"packets_transmitted": 3,
|
||||||
|
"packets_received": 3,
|
||||||
|
"packet_loss_percent": 0.0,
|
||||||
|
"duplicates": 0,
|
||||||
|
"round_trip_ms_min": 28.015,
|
||||||
|
"round_trip_ms_avg": 32.848,
|
||||||
|
"round_trip_ms_max": 39.376,
|
||||||
|
"round_trip_ms_stddev": 4.79,
|
||||||
|
"responses": [
|
||||||
|
{
|
||||||
|
"type": "reply",
|
||||||
|
"bytes": 64,
|
||||||
|
"response_ip": "151.101.1.67",
|
||||||
|
"icmp_seq": 0,
|
||||||
|
"ttl": 59,
|
||||||
|
"time_ms": 28.015,
|
||||||
|
"duplicate": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "reply",
|
||||||
|
"bytes": 64,
|
||||||
|
"response_ip": "151.101.1.67",
|
||||||
|
"icmp_seq": 1,
|
||||||
|
"ttl": 59,
|
||||||
|
"time_ms": 39.376,
|
||||||
|
"duplicate": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "reply",
|
||||||
|
"bytes": 64,
|
||||||
|
"response_ip": "151.101.1.67",
|
||||||
|
"icmp_seq": 2,
|
||||||
|
"ttl": 59,
|
||||||
|
"time_ms": 31.153,
|
||||||
|
"duplicate": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$ ping -c 3 -p ff cnn.com | jc --ping -p -r
|
||||||
|
{
|
||||||
|
"destination_ip": "151.101.129.67",
|
||||||
|
"data_bytes": "56",
|
||||||
|
"pattern": "0xff",
|
||||||
|
"destination": "cnn.com",
|
||||||
|
"packets_transmitted": "3",
|
||||||
|
"packets_received": "3",
|
||||||
|
"packet_loss_percent": "0.0",
|
||||||
|
"duplicates": "0",
|
||||||
|
"round_trip_ms_min": "25.078",
|
||||||
|
"round_trip_ms_avg": "29.543",
|
||||||
|
"round_trip_ms_max": "32.553",
|
||||||
|
"round_trip_ms_stddev": "3.221",
|
||||||
|
"responses": [
|
||||||
|
{
|
||||||
|
"type": "reply",
|
||||||
|
"bytes": "64",
|
||||||
|
"response_ip": "151.101.129.67",
|
||||||
|
"icmp_seq": "0",
|
||||||
|
"ttl": "59",
|
||||||
|
"time_ms": "25.078",
|
||||||
|
"duplicate": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "reply",
|
||||||
|
"bytes": "64",
|
||||||
|
"response_ip": "151.101.129.67",
|
||||||
|
"icmp_seq": "1",
|
||||||
|
"ttl": "59",
|
||||||
|
"time_ms": "30.999",
|
||||||
|
"duplicate": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "reply",
|
||||||
|
"bytes": "64",
|
||||||
|
"response_ip": "151.101.129.67",
|
||||||
|
"icmp_seq": "2",
|
||||||
|
"ttl": "59",
|
||||||
|
"time_ms": "32.553",
|
||||||
|
"duplicate": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
## info
|
||||||
|
```python
|
||||||
|
info(self, /, *args, **kwargs)
|
||||||
|
```
|
||||||
|
|
||||||
|
## process
|
||||||
|
```python
|
||||||
|
process(proc_data)
|
||||||
|
```
|
||||||
|
|
||||||
|
Final processing to conform to the schema.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
|
||||||
|
proc_data: (dictionary) raw structured data to process
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Dictionary. Structured data with the following schema:
|
||||||
|
|
||||||
|
{
|
||||||
|
"source_ip": string,
|
||||||
|
"destination_ip": string,
|
||||||
|
"data_bytes": integer,
|
||||||
|
"pattern": string, (null if not set)
|
||||||
|
"destination": string,
|
||||||
|
"packets_transmitted": integer,
|
||||||
|
"packets_received": integer,
|
||||||
|
"packet_loss_percent": float,
|
||||||
|
"duplicates": integer,
|
||||||
|
"round_trip_ms_min": float,
|
||||||
|
"round_trip_ms_avg": float,
|
||||||
|
"round_trip_ms_max": float,
|
||||||
|
"round_trip_ms_stddev": float,
|
||||||
|
"responses": [
|
||||||
|
{
|
||||||
|
"type": string, ('reply' or 'timeout')
|
||||||
|
"timestamp": float,
|
||||||
|
"bytes": integer,
|
||||||
|
"response_ip": string,
|
||||||
|
"icmp_seq": integer,
|
||||||
|
"ttl": integer,
|
||||||
|
"time_ms": float,
|
||||||
|
"duplicate": boolean
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
## parse
|
||||||
|
```python
|
||||||
|
parse(data, raw=False, quiet=False)
|
||||||
|
```
|
||||||
|
|
||||||
|
Main text parsing function
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
|
||||||
|
data: (string) text data to parse
|
||||||
|
raw: (boolean) output preprocessed JSON if True
|
||||||
|
quiet: (boolean) suppress warning messages if True
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Dictionary. Raw or processed structured data.
|
||||||
|
|
158
docs/parsers/tracepath.md
Normal file
158
docs/parsers/tracepath.md
Normal file
@ -0,0 +1,158 @@
|
|||||||
|
# jc.parsers.tracepath
|
||||||
|
jc - JSON CLI output utility tracepath Parser
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
specify --tracepath as the first argument if the piped input is coming from tracepath
|
||||||
|
|
||||||
|
Compatibility:
|
||||||
|
|
||||||
|
'linux'
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
$ tracepath6 3ffe:2400:0:109::2 | jc --tracepath -p
|
||||||
|
{
|
||||||
|
"pmtu": 1480,
|
||||||
|
"forward_hops": 2,
|
||||||
|
"return_hops": 2,
|
||||||
|
"hops": [
|
||||||
|
{
|
||||||
|
"ttl": 1,
|
||||||
|
"guess": true,
|
||||||
|
"host": "[LOCALHOST]",
|
||||||
|
"reply_ms": null,
|
||||||
|
"pmtu": 1500,
|
||||||
|
"asymmetric_difference": null,
|
||||||
|
"reached": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ttl": 1,
|
||||||
|
"guess": false,
|
||||||
|
"host": "dust.inr.ac.ru",
|
||||||
|
"reply_ms": 0.411,
|
||||||
|
"pmtu": null,
|
||||||
|
"asymmetric_difference": null,
|
||||||
|
"reached": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ttl": 2,
|
||||||
|
"guess": false,
|
||||||
|
"host": "dust.inr.ac.ru",
|
||||||
|
"reply_ms": 0.39,
|
||||||
|
"pmtu": 1480,
|
||||||
|
"asymmetric_difference": 1,
|
||||||
|
"reached": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ttl": 2,
|
||||||
|
"guess": false,
|
||||||
|
"host": "3ffe:2400:0:109::2",
|
||||||
|
"reply_ms": 463.514,
|
||||||
|
"pmtu": null,
|
||||||
|
"asymmetric_difference": null,
|
||||||
|
"reached": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
$ tracepath6 3ffe:2400:0:109::2 | jc --tracepath -p -r
|
||||||
|
{
|
||||||
|
"pmtu": "1480",
|
||||||
|
"forward_hops": "2",
|
||||||
|
"return_hops": "2",
|
||||||
|
"hops": [
|
||||||
|
{
|
||||||
|
"ttl": "1",
|
||||||
|
"guess": true,
|
||||||
|
"host": "[LOCALHOST]",
|
||||||
|
"reply_ms": null,
|
||||||
|
"pmtu": "1500",
|
||||||
|
"asymmetric_difference": null,
|
||||||
|
"reached": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ttl": "1",
|
||||||
|
"guess": false,
|
||||||
|
"host": "dust.inr.ac.ru",
|
||||||
|
"reply_ms": "0.411",
|
||||||
|
"pmtu": null,
|
||||||
|
"asymmetric_difference": null,
|
||||||
|
"reached": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ttl": "2",
|
||||||
|
"guess": false,
|
||||||
|
"host": "dust.inr.ac.ru",
|
||||||
|
"reply_ms": "0.390",
|
||||||
|
"pmtu": "1480",
|
||||||
|
"asymmetric_difference": "1",
|
||||||
|
"reached": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ttl": "2",
|
||||||
|
"guess": false,
|
||||||
|
"host": "3ffe:2400:0:109::2",
|
||||||
|
"reply_ms": "463.514",
|
||||||
|
"pmtu": null,
|
||||||
|
"asymmetric_difference": null,
|
||||||
|
"reached": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
## info
|
||||||
|
```python
|
||||||
|
info(self, /, *args, **kwargs)
|
||||||
|
```
|
||||||
|
|
||||||
|
## process
|
||||||
|
```python
|
||||||
|
process(proc_data)
|
||||||
|
```
|
||||||
|
|
||||||
|
Final processing to conform to the schema.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
|
||||||
|
proc_data: (dictionary) raw structured data to process
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Dictionary. Structured data with the following schema:
|
||||||
|
|
||||||
|
{
|
||||||
|
"pmtu": integer,
|
||||||
|
"forward_hops": integer,
|
||||||
|
"return_hops": integer,
|
||||||
|
"hops": [
|
||||||
|
{
|
||||||
|
"ttl": integer,
|
||||||
|
"guess": boolean,
|
||||||
|
"host": string,
|
||||||
|
"reply_ms": float,
|
||||||
|
"pmtu": integer,
|
||||||
|
"asymmetric_difference": integer,
|
||||||
|
"reached": boolean
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
## parse
|
||||||
|
```python
|
||||||
|
parse(data, raw=False, quiet=False)
|
||||||
|
```
|
||||||
|
|
||||||
|
Main text parsing function
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
|
||||||
|
data: (string) text data to parse
|
||||||
|
raw: (boolean) output preprocessed JSON if True
|
||||||
|
quiet: (boolean) suppress warning messages if True
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Dictionary. Raw or processed structured data.
|
||||||
|
|
147
docs/parsers/traceroute.md
Normal file
147
docs/parsers/traceroute.md
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
# jc.parsers.traceroute
|
||||||
|
jc - JSON CLI output utility traceroute Parser
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
specify --traceroute as the first argument if the piped input is coming from traceroute
|
||||||
|
|
||||||
|
Note: on OSX and FreeBSD be sure to redirect STDERR to STDOUT since the header line is sent to STDERR
|
||||||
|
e.g. $ traceroute 8.8.8.8 2>&1 | jc --traceroute
|
||||||
|
|
||||||
|
Compatibility:
|
||||||
|
|
||||||
|
'linux', 'darwin', 'freebsd'
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
$ traceroute google.com | jc --traceroute -p
|
||||||
|
{
|
||||||
|
"destination_ip": "216.58.194.46",
|
||||||
|
"destination_name": "google.com",
|
||||||
|
"hops": [
|
||||||
|
{
|
||||||
|
"hop": 1,
|
||||||
|
"probes": [
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "216.230.231.141",
|
||||||
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
|
"rtt": 198.574
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "216.230.231.141",
|
||||||
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
|
"rtt": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "216.230.231.141",
|
||||||
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
|
"rtt": 198.65
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
...
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
$ traceroute google.com | jc --traceroute -p -r
|
||||||
|
{
|
||||||
|
"destination_ip": "216.58.194.46",
|
||||||
|
"destination_name": "google.com",
|
||||||
|
"hops": [
|
||||||
|
{
|
||||||
|
"hop": "1",
|
||||||
|
"probes": [
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "216.230.231.141",
|
||||||
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
|
"rtt": "198.574"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "216.230.231.141",
|
||||||
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
|
"rtt": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "216.230.231.141",
|
||||||
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
|
"rtt": "198.650"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
...
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
## info
|
||||||
|
```python
|
||||||
|
info(self, /, *args, **kwargs)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Hop
|
||||||
|
```python
|
||||||
|
Hop(self, idx)
|
||||||
|
```
|
||||||
|
|
||||||
|
## process
|
||||||
|
```python
|
||||||
|
process(proc_data)
|
||||||
|
```
|
||||||
|
|
||||||
|
Final processing to conform to the schema.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
|
||||||
|
proc_data: (dictionary) raw structured data to process
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Dictionary. Structured data with the following schema:
|
||||||
|
|
||||||
|
{
|
||||||
|
"destination_ip": string,
|
||||||
|
"destination_name": string,
|
||||||
|
"hops": [
|
||||||
|
{
|
||||||
|
"hop": integer,
|
||||||
|
"probes": [
|
||||||
|
{
|
||||||
|
"annotation": string,
|
||||||
|
"asn": integer,
|
||||||
|
"ip": string,
|
||||||
|
"name": string,
|
||||||
|
"rtt": float
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
## parse
|
||||||
|
```python
|
||||||
|
parse(data, raw=False, quiet=False)
|
||||||
|
```
|
||||||
|
|
||||||
|
Main text parsing function
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
|
||||||
|
data: (string) text data to parse
|
||||||
|
raw: (boolean) output preprocessed JSON if True
|
||||||
|
quiet: (boolean) suppress warning messages if True
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Dictionary. Raw or processed structured data.
|
||||||
|
|
@ -21,8 +21,8 @@ import jc.appdirs as appdirs
|
|||||||
|
|
||||||
|
|
||||||
class info():
|
class info():
|
||||||
version = '1.12.1'
|
version = '1.13.0'
|
||||||
description = 'JSON conversion tool for CLI output'
|
description = 'JSON CLI output utility'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
|
|
||||||
@ -63,6 +63,7 @@ parsers = [
|
|||||||
'netstat',
|
'netstat',
|
||||||
'ntpq',
|
'ntpq',
|
||||||
'passwd',
|
'passwd',
|
||||||
|
'ping',
|
||||||
'pip-list',
|
'pip-list',
|
||||||
'pip-show',
|
'pip-show',
|
||||||
'ps',
|
'ps',
|
||||||
@ -76,6 +77,8 @@ parsers = [
|
|||||||
'systemctl-ls',
|
'systemctl-ls',
|
||||||
'systemctl-luf',
|
'systemctl-luf',
|
||||||
'timedatectl',
|
'timedatectl',
|
||||||
|
'tracepath',
|
||||||
|
'traceroute',
|
||||||
'uname',
|
'uname',
|
||||||
'uptime',
|
'uptime',
|
||||||
'w',
|
'w',
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
specify --ini as the first argument if the piped input is coming from an INI file
|
Specify --ini as the first argument if the piped input is coming from an INI file or any
|
||||||
|
simple key/value pair file. Delimiter can be '=' or ':'. Missing values are supported.
|
||||||
|
Comment prefix can be '#' or ';'. Comments must be on their own line.
|
||||||
|
|
||||||
Compatibility:
|
Compatibility:
|
||||||
|
|
||||||
@ -47,8 +49,8 @@ import configparser
|
|||||||
|
|
||||||
|
|
||||||
class info():
|
class info():
|
||||||
version = '1.1'
|
version = '1.2'
|
||||||
description = 'INI file parser'
|
description = 'INI file parser. Also parses files/output containing simple key/value pairs'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
details = 'Using configparser from the standard library'
|
details = 'Using configparser from the standard library'
|
||||||
@ -70,15 +72,33 @@ def process(proc_data):
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Dictionary representing an ini document:
|
Dictionary representing an ini or simple key/value pair document:
|
||||||
|
|
||||||
{
|
{
|
||||||
ini document converted to a dictionary
|
ini or key/value document converted to a dictionary - see configparser standard
|
||||||
see configparser standard library documentation for more details
|
library documentation for more details.
|
||||||
|
|
||||||
|
Note: Values starting and ending with quotation marks will have the marks removed.
|
||||||
|
If you would like to keep the quotation marks, use the -r or raw=True argument.
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
# remove quotation marks from beginning and end of values
|
||||||
|
for heading in proc_data:
|
||||||
|
# standard ini files with headers
|
||||||
|
if isinstance(proc_data[heading], dict):
|
||||||
|
for key, value in proc_data[heading].items():
|
||||||
|
if value is not None and value.startswith('"') and value.endswith('"'):
|
||||||
|
proc_data[heading][key] = value.lstrip('"').rstrip('"')
|
||||||
|
elif value is None:
|
||||||
|
proc_data[heading][key] = ''
|
||||||
|
|
||||||
|
# simple key/value files with no headers
|
||||||
|
else:
|
||||||
|
if proc_data[heading] is not None and proc_data[heading].startswith('"') and proc_data[heading].endswith('"'):
|
||||||
|
proc_data[heading] = proc_data[heading].lstrip('"').rstrip('"')
|
||||||
|
elif proc_data[heading] is None:
|
||||||
|
proc_data[heading] = ''
|
||||||
|
|
||||||
# No further processing
|
|
||||||
return proc_data
|
return proc_data
|
||||||
|
|
||||||
|
|
||||||
@ -103,9 +123,17 @@ def parse(data, raw=False, quiet=False):
|
|||||||
|
|
||||||
if jc.utils.has_data(data):
|
if jc.utils.has_data(data):
|
||||||
|
|
||||||
ini = configparser.ConfigParser()
|
ini = configparser.ConfigParser(allow_no_value=True, interpolation=None)
|
||||||
ini.read_string(data)
|
try:
|
||||||
raw_output = {s: dict(ini.items(s)) for s in ini.sections()}
|
ini.read_string(data)
|
||||||
|
raw_output = {s: dict(ini.items(s)) for s in ini.sections()}
|
||||||
|
|
||||||
|
except configparser.MissingSectionHeaderError:
|
||||||
|
data = '[data]\n' + data
|
||||||
|
ini.read_string(data)
|
||||||
|
output_dict = {s: dict(ini.items(s)) for s in ini.sections()}
|
||||||
|
for key, value in output_dict['data'].items():
|
||||||
|
raw_output[key] = value
|
||||||
|
|
||||||
if raw:
|
if raw:
|
||||||
return raw_output
|
return raw_output
|
||||||
|
507
jc/parsers/ping.py
Normal file
507
jc/parsers/ping.py
Normal file
@ -0,0 +1,507 @@
|
|||||||
|
"""jc - JSON CLI output utility ping Parser
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
specify --ping as the first argument if the piped input is coming from ping
|
||||||
|
|
||||||
|
Note: Use the ping -c (count) option, otherwise data will not be piped to jc.
|
||||||
|
|
||||||
|
Compatibility:
|
||||||
|
|
||||||
|
'linux', 'darwin', 'freebsd'
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
$ ping -c 3 -p ff cnn.com | jc --ping -p
|
||||||
|
{
|
||||||
|
"destination_ip": "151.101.1.67",
|
||||||
|
"data_bytes": 56,
|
||||||
|
"pattern": "0xff",
|
||||||
|
"destination": "cnn.com",
|
||||||
|
"packets_transmitted": 3,
|
||||||
|
"packets_received": 3,
|
||||||
|
"packet_loss_percent": 0.0,
|
||||||
|
"duplicates": 0,
|
||||||
|
"round_trip_ms_min": 28.015,
|
||||||
|
"round_trip_ms_avg": 32.848,
|
||||||
|
"round_trip_ms_max": 39.376,
|
||||||
|
"round_trip_ms_stddev": 4.79,
|
||||||
|
"responses": [
|
||||||
|
{
|
||||||
|
"type": "reply",
|
||||||
|
"bytes": 64,
|
||||||
|
"response_ip": "151.101.1.67",
|
||||||
|
"icmp_seq": 0,
|
||||||
|
"ttl": 59,
|
||||||
|
"time_ms": 28.015,
|
||||||
|
"duplicate": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "reply",
|
||||||
|
"bytes": 64,
|
||||||
|
"response_ip": "151.101.1.67",
|
||||||
|
"icmp_seq": 1,
|
||||||
|
"ttl": 59,
|
||||||
|
"time_ms": 39.376,
|
||||||
|
"duplicate": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "reply",
|
||||||
|
"bytes": 64,
|
||||||
|
"response_ip": "151.101.1.67",
|
||||||
|
"icmp_seq": 2,
|
||||||
|
"ttl": 59,
|
||||||
|
"time_ms": 31.153,
|
||||||
|
"duplicate": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$ ping -c 3 -p ff cnn.com | jc --ping -p -r
|
||||||
|
{
|
||||||
|
"destination_ip": "151.101.129.67",
|
||||||
|
"data_bytes": "56",
|
||||||
|
"pattern": "0xff",
|
||||||
|
"destination": "cnn.com",
|
||||||
|
"packets_transmitted": "3",
|
||||||
|
"packets_received": "3",
|
||||||
|
"packet_loss_percent": "0.0",
|
||||||
|
"duplicates": "0",
|
||||||
|
"round_trip_ms_min": "25.078",
|
||||||
|
"round_trip_ms_avg": "29.543",
|
||||||
|
"round_trip_ms_max": "32.553",
|
||||||
|
"round_trip_ms_stddev": "3.221",
|
||||||
|
"responses": [
|
||||||
|
{
|
||||||
|
"type": "reply",
|
||||||
|
"bytes": "64",
|
||||||
|
"response_ip": "151.101.129.67",
|
||||||
|
"icmp_seq": "0",
|
||||||
|
"ttl": "59",
|
||||||
|
"time_ms": "25.078",
|
||||||
|
"duplicate": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "reply",
|
||||||
|
"bytes": "64",
|
||||||
|
"response_ip": "151.101.129.67",
|
||||||
|
"icmp_seq": "1",
|
||||||
|
"ttl": "59",
|
||||||
|
"time_ms": "30.999",
|
||||||
|
"duplicate": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "reply",
|
||||||
|
"bytes": "64",
|
||||||
|
"response_ip": "151.101.129.67",
|
||||||
|
"icmp_seq": "2",
|
||||||
|
"ttl": "59",
|
||||||
|
"time_ms": "32.553",
|
||||||
|
"duplicate": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
import string
|
||||||
|
import jc.utils
|
||||||
|
|
||||||
|
|
||||||
|
class info():
|
||||||
|
version = '1.0'
|
||||||
|
description = 'ping command parser'
|
||||||
|
author = 'Kelly Brazil'
|
||||||
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
|
|
||||||
|
# compatible options: linux, darwin, cygwin, win32, aix, freebsd
|
||||||
|
compatible = ['linux', 'darwin', 'freebsd']
|
||||||
|
magic_commands = ['ping', 'ping6']
|
||||||
|
|
||||||
|
|
||||||
|
__version__ = info.version
|
||||||
|
|
||||||
|
|
||||||
|
def process(proc_data):
|
||||||
|
"""
|
||||||
|
Final processing to conform to the schema.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
|
||||||
|
proc_data: (dictionary) raw structured data to process
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Dictionary. Structured data with the following schema:
|
||||||
|
|
||||||
|
{
|
||||||
|
"source_ip": string,
|
||||||
|
"destination_ip": string,
|
||||||
|
"data_bytes": integer,
|
||||||
|
"pattern": string, (null if not set)
|
||||||
|
"destination": string,
|
||||||
|
"packets_transmitted": integer,
|
||||||
|
"packets_received": integer,
|
||||||
|
"packet_loss_percent": float,
|
||||||
|
"duplicates": integer,
|
||||||
|
"round_trip_ms_min": float,
|
||||||
|
"round_trip_ms_avg": float,
|
||||||
|
"round_trip_ms_max": float,
|
||||||
|
"round_trip_ms_stddev": float,
|
||||||
|
"responses": [
|
||||||
|
{
|
||||||
|
"type": string, ('reply' or 'timeout')
|
||||||
|
"timestamp": float,
|
||||||
|
"bytes": integer,
|
||||||
|
"response_ip": string,
|
||||||
|
"icmp_seq": integer,
|
||||||
|
"ttl": integer,
|
||||||
|
"time_ms": float,
|
||||||
|
"duplicate": boolean
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
int_list = ['data_bytes', 'packets_transmitted', 'packets_received', 'bytes', 'icmp_seq', 'ttl', 'duplicates']
|
||||||
|
float_list = ['packet_loss_percent', 'round_trip_ms_min', 'round_trip_ms_avg', 'round_trip_ms_max',
|
||||||
|
'round_trip_ms_stddev', 'timestamp', 'time_ms']
|
||||||
|
|
||||||
|
for key in proc_data.keys():
|
||||||
|
for item in int_list:
|
||||||
|
if item == key:
|
||||||
|
try:
|
||||||
|
proc_data[key] = int(proc_data[key])
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
proc_data[key] = None
|
||||||
|
|
||||||
|
for item in float_list:
|
||||||
|
if item == key:
|
||||||
|
try:
|
||||||
|
proc_data[key] = float(proc_data[key])
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
proc_data[key] = None
|
||||||
|
|
||||||
|
if key == 'responses':
|
||||||
|
for entry in proc_data['responses']:
|
||||||
|
for k in entry.keys():
|
||||||
|
if k in int_list:
|
||||||
|
try:
|
||||||
|
entry[k] = int(entry[k])
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
entry[k] = None
|
||||||
|
if k in float_list:
|
||||||
|
try:
|
||||||
|
entry[k] = float(entry[k])
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
entry[k] = None
|
||||||
|
|
||||||
|
return proc_data
|
||||||
|
|
||||||
|
|
||||||
|
def linux_parse(data):
|
||||||
|
raw_output = {}
|
||||||
|
ping_responses = []
|
||||||
|
pattern = None
|
||||||
|
footer = False
|
||||||
|
|
||||||
|
linedata = data.splitlines()
|
||||||
|
|
||||||
|
# check for PATTERN
|
||||||
|
if linedata[0].startswith('PATTERN: '):
|
||||||
|
pattern = linedata.pop(0).split(': ')[1]
|
||||||
|
|
||||||
|
while not linedata[0].startswith('PING '):
|
||||||
|
linedata.pop(0)
|
||||||
|
|
||||||
|
ipv4 = True if 'bytes of data' in linedata[0] else False
|
||||||
|
|
||||||
|
if ipv4 and linedata[0][5] not in string.digits:
|
||||||
|
hostname = True
|
||||||
|
elif ipv4 and linedata[0][5] in string.digits:
|
||||||
|
hostname = False
|
||||||
|
elif not ipv4 and ' (' in linedata[0]:
|
||||||
|
hostname = True
|
||||||
|
else:
|
||||||
|
hostname = False
|
||||||
|
|
||||||
|
for line in filter(None, linedata):
|
||||||
|
if line.startswith('PING '):
|
||||||
|
if ipv4 and not hostname:
|
||||||
|
dst_ip, dta_byts = (2, 3)
|
||||||
|
elif ipv4 and hostname:
|
||||||
|
dst_ip, dta_byts = (2, 3)
|
||||||
|
elif not ipv4 and not hostname:
|
||||||
|
dst_ip, dta_byts = (2, 3)
|
||||||
|
else:
|
||||||
|
dst_ip, dta_byts = (3, 4)
|
||||||
|
|
||||||
|
line = line.replace('(', ' ').replace(')', ' ')
|
||||||
|
raw_output.update(
|
||||||
|
{
|
||||||
|
'destination_ip': line.split()[dst_ip].lstrip('(').rstrip(')'),
|
||||||
|
'data_bytes': line.split()[dta_byts],
|
||||||
|
'pattern': pattern
|
||||||
|
}
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
|
||||||
|
if line.startswith('---'):
|
||||||
|
footer = True
|
||||||
|
raw_output['destination'] = line.split()[1]
|
||||||
|
continue
|
||||||
|
|
||||||
|
if footer:
|
||||||
|
if 'packets transmitted' in line:
|
||||||
|
if ' duplicates,' in line:
|
||||||
|
raw_output.update(
|
||||||
|
{
|
||||||
|
'packets_transmitted': line.split()[0],
|
||||||
|
'packets_received': line.split()[3],
|
||||||
|
'packet_loss_percent': line.split()[7].rstrip('%'),
|
||||||
|
'duplicates': line.split()[5].lstrip('+'),
|
||||||
|
'time_ms': line.split()[11].replace('ms', '')
|
||||||
|
}
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
raw_output.update(
|
||||||
|
{
|
||||||
|
'packets_transmitted': line.split()[0],
|
||||||
|
'packets_received': line.split()[3],
|
||||||
|
'packet_loss_percent': line.split()[5].rstrip('%'),
|
||||||
|
'duplicates': '0',
|
||||||
|
'time_ms': line.split()[9].replace('ms', '')
|
||||||
|
}
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
|
||||||
|
else:
|
||||||
|
split_line = line.split(' = ')[1]
|
||||||
|
split_line = split_line.split('/')
|
||||||
|
raw_output.update(
|
||||||
|
{
|
||||||
|
'round_trip_ms_min': split_line[0],
|
||||||
|
'round_trip_ms_avg': split_line[1],
|
||||||
|
'round_trip_ms_max': split_line[2],
|
||||||
|
'round_trip_ms_stddev': split_line[3].split()[0]
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
# ping response lines
|
||||||
|
else:
|
||||||
|
# request timeout
|
||||||
|
if 'no answer yet for icmp_seq=' in line:
|
||||||
|
timestamp = False
|
||||||
|
isequence = 5
|
||||||
|
|
||||||
|
# if timestamp option is specified, then shift icmp sequence field right by one
|
||||||
|
if line[0] == '[':
|
||||||
|
timestamp = True
|
||||||
|
isequence = 6
|
||||||
|
|
||||||
|
response = {
|
||||||
|
'type': 'timeout',
|
||||||
|
'timestamp': line.split()[0].lstrip('[').rstrip(']') if timestamp else None,
|
||||||
|
'icmp_seq': line.replace('=', ' ').split()[isequence]
|
||||||
|
}
|
||||||
|
ping_responses.append(response)
|
||||||
|
continue
|
||||||
|
|
||||||
|
# normal responses
|
||||||
|
else:
|
||||||
|
|
||||||
|
line = line.replace('(', ' ').replace(')', ' ').replace('=', ' ')
|
||||||
|
|
||||||
|
# positions of items depend on whether ipv4/ipv6 and/or ip/hostname is used
|
||||||
|
if ipv4 and not hostname:
|
||||||
|
bts, rip, iseq, t2l, tms = (0, 3, 5, 7, 9)
|
||||||
|
elif ipv4 and hostname:
|
||||||
|
bts, rip, iseq, t2l, tms = (0, 4, 7, 9, 11)
|
||||||
|
elif not ipv4 and not hostname:
|
||||||
|
bts, rip, iseq, t2l, tms = (0, 3, 5, 7, 9)
|
||||||
|
elif not ipv4 and hostname:
|
||||||
|
bts, rip, iseq, t2l, tms = (0, 4, 7, 9, 11)
|
||||||
|
|
||||||
|
# if timestamp option is specified, then shift everything right by one
|
||||||
|
timestamp = False
|
||||||
|
if line[0] == '[':
|
||||||
|
timestamp = True
|
||||||
|
bts, rip, iseq, t2l, tms = (bts + 1, rip + 1, iseq + 1, t2l + 1, tms + 1)
|
||||||
|
|
||||||
|
response = {
|
||||||
|
'type': 'reply',
|
||||||
|
'timestamp': line.split()[0].lstrip('[').rstrip(']') if timestamp else None,
|
||||||
|
'bytes': line.split()[bts],
|
||||||
|
'response_ip': line.split()[rip].rstrip(':'),
|
||||||
|
'icmp_seq': line.split()[iseq],
|
||||||
|
'ttl': line.split()[t2l],
|
||||||
|
'time_ms': line.split()[tms],
|
||||||
|
'duplicate': True if 'DUP!' in line else False
|
||||||
|
}
|
||||||
|
|
||||||
|
ping_responses.append(response)
|
||||||
|
continue
|
||||||
|
|
||||||
|
raw_output['responses'] = ping_responses
|
||||||
|
|
||||||
|
return raw_output
|
||||||
|
|
||||||
|
|
||||||
|
def bsd_parse(data):
|
||||||
|
raw_output = {}
|
||||||
|
ping_responses = []
|
||||||
|
pattern = None
|
||||||
|
footer = False
|
||||||
|
|
||||||
|
linedata = data.splitlines()
|
||||||
|
|
||||||
|
# check for PATTERN
|
||||||
|
if linedata[0].startswith('PATTERN: '):
|
||||||
|
pattern = linedata.pop(0).split(': ')[1]
|
||||||
|
|
||||||
|
for line in filter(None, linedata):
|
||||||
|
if line.startswith('PING '):
|
||||||
|
raw_output.update(
|
||||||
|
{
|
||||||
|
'destination_ip': line.split()[2].lstrip('(').rstrip(':').rstrip(')'),
|
||||||
|
'data_bytes': line.split()[3],
|
||||||
|
'pattern': pattern
|
||||||
|
}
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
|
||||||
|
if line.startswith('PING6('):
|
||||||
|
line = line.replace('(', ' ').replace(')', ' ').replace('=', ' ')
|
||||||
|
raw_output.update(
|
||||||
|
{
|
||||||
|
'source_ip': line.split()[4],
|
||||||
|
'destination_ip': line.split()[6],
|
||||||
|
'data_bytes': line.split()[1],
|
||||||
|
'pattern': pattern
|
||||||
|
}
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
|
||||||
|
if line.startswith('---'):
|
||||||
|
footer = True
|
||||||
|
raw_output['destination'] = line.split()[1]
|
||||||
|
continue
|
||||||
|
|
||||||
|
if footer:
|
||||||
|
if 'packets transmitted' in line:
|
||||||
|
if ' duplicates,' in line:
|
||||||
|
raw_output.update(
|
||||||
|
{
|
||||||
|
'packets_transmitted': line.split()[0],
|
||||||
|
'packets_received': line.split()[3],
|
||||||
|
'packet_loss_percent': line.split()[8].rstrip('%'),
|
||||||
|
'duplicates': line.split()[6].lstrip('+'),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
raw_output.update(
|
||||||
|
{
|
||||||
|
'packets_transmitted': line.split()[0],
|
||||||
|
'packets_received': line.split()[3],
|
||||||
|
'packet_loss_percent': line.split()[6].rstrip('%'),
|
||||||
|
'duplicates': '0',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
|
||||||
|
else:
|
||||||
|
split_line = line.split(' = ')[1]
|
||||||
|
split_line = split_line.split('/')
|
||||||
|
raw_output.update(
|
||||||
|
{
|
||||||
|
'round_trip_ms_min': split_line[0],
|
||||||
|
'round_trip_ms_avg': split_line[1],
|
||||||
|
'round_trip_ms_max': split_line[2],
|
||||||
|
'round_trip_ms_stddev': split_line[3].replace(' ms', '')
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
# ping response lines
|
||||||
|
else:
|
||||||
|
# ipv4 lines
|
||||||
|
if ',' not in line:
|
||||||
|
|
||||||
|
# request timeout
|
||||||
|
if line.startswith('Request timeout for '):
|
||||||
|
response = {
|
||||||
|
'type': 'timeout',
|
||||||
|
'icmp_seq': line.split()[4]
|
||||||
|
}
|
||||||
|
ping_responses.append(response)
|
||||||
|
continue
|
||||||
|
|
||||||
|
# normal response
|
||||||
|
else:
|
||||||
|
line = line.replace(':', ' ').replace('=', ' ')
|
||||||
|
response = {
|
||||||
|
'type': 'reply',
|
||||||
|
'bytes': line.split()[0],
|
||||||
|
'response_ip': line.split()[3],
|
||||||
|
'icmp_seq': line.split()[5],
|
||||||
|
'ttl': line.split()[7],
|
||||||
|
'time_ms': line.split()[9]
|
||||||
|
}
|
||||||
|
ping_responses.append(response)
|
||||||
|
continue
|
||||||
|
|
||||||
|
# ipv6 lines
|
||||||
|
else:
|
||||||
|
line = line.replace(',', ' ').replace('=', ' ')
|
||||||
|
response = {
|
||||||
|
'type': 'reply',
|
||||||
|
'bytes': line.split()[0],
|
||||||
|
'response_ip': line.split()[3],
|
||||||
|
'icmp_seq': line.split()[5],
|
||||||
|
'ttl': line.split()[7],
|
||||||
|
'time_ms': line.split()[9]
|
||||||
|
}
|
||||||
|
ping_responses.append(response)
|
||||||
|
continue
|
||||||
|
|
||||||
|
# identify duplicates in responses
|
||||||
|
if ping_responses:
|
||||||
|
seq_list = []
|
||||||
|
for reply in ping_responses:
|
||||||
|
seq_list.append(reply['icmp_seq'])
|
||||||
|
reply['duplicate'] = True if seq_list.count(reply['icmp_seq']) > 1 else False
|
||||||
|
|
||||||
|
raw_output['responses'] = ping_responses
|
||||||
|
|
||||||
|
return raw_output
|
||||||
|
|
||||||
|
|
||||||
|
def parse(data, raw=False, quiet=False):
|
||||||
|
"""
|
||||||
|
Main text parsing function
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
|
||||||
|
data: (string) text data to parse
|
||||||
|
raw: (boolean) output preprocessed JSON if True
|
||||||
|
quiet: (boolean) suppress warning messages if True
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Dictionary. Raw or processed structured data.
|
||||||
|
"""
|
||||||
|
if not quiet:
|
||||||
|
jc.utils.compatibility(__name__, info.compatible)
|
||||||
|
|
||||||
|
raw_output = {}
|
||||||
|
|
||||||
|
if jc.utils.has_data(data):
|
||||||
|
|
||||||
|
if 'time' in data.splitlines()[-2]:
|
||||||
|
raw_output = linux_parse(data)
|
||||||
|
else:
|
||||||
|
raw_output = bsd_parse(data)
|
||||||
|
|
||||||
|
if raw:
|
||||||
|
return raw_output
|
||||||
|
else:
|
||||||
|
return process(raw_output)
|
@ -84,7 +84,7 @@ import jc.parsers.universal
|
|||||||
|
|
||||||
|
|
||||||
class info():
|
class info():
|
||||||
version = '1.3'
|
version = '1.4'
|
||||||
description = 'route command parser'
|
description = 'route command parser'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
@ -182,10 +182,16 @@ def parse(data, raw=False, quiet=False):
|
|||||||
jc.utils.compatibility(__name__, info.compatible)
|
jc.utils.compatibility(__name__, info.compatible)
|
||||||
|
|
||||||
cleandata = data.splitlines()[1:]
|
cleandata = data.splitlines()[1:]
|
||||||
|
|
||||||
raw_output = []
|
raw_output = []
|
||||||
|
|
||||||
if jc.utils.has_data(data):
|
if jc.utils.has_data(data):
|
||||||
|
|
||||||
|
# fixup header row for ipv6
|
||||||
|
if ' Next Hop ' in cleandata[0]:
|
||||||
|
cleandata[0] = cleandata[0].replace(' If', ' Iface')
|
||||||
|
cleandata[0] = cleandata[0].replace(' Next Hop ', ' Next_Hop ').replace(' Flag ', ' Flags ').replace(' Met ', ' Metric ')
|
||||||
|
|
||||||
cleandata[0] = cleandata[0].lower()
|
cleandata[0] = cleandata[0].lower()
|
||||||
raw_output = jc.parsers.universal.simple_table_parse(cleandata)
|
raw_output = jc.parsers.universal.simple_table_parse(cleandata)
|
||||||
|
|
||||||
|
251
jc/parsers/tracepath.py
Normal file
251
jc/parsers/tracepath.py
Normal file
@ -0,0 +1,251 @@
|
|||||||
|
"""jc - JSON CLI output utility tracepath Parser
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
specify --tracepath as the first argument if the piped input is coming from tracepath
|
||||||
|
|
||||||
|
Compatibility:
|
||||||
|
|
||||||
|
'linux'
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
$ tracepath6 3ffe:2400:0:109::2 | jc --tracepath -p
|
||||||
|
{
|
||||||
|
"pmtu": 1480,
|
||||||
|
"forward_hops": 2,
|
||||||
|
"return_hops": 2,
|
||||||
|
"hops": [
|
||||||
|
{
|
||||||
|
"ttl": 1,
|
||||||
|
"guess": true,
|
||||||
|
"host": "[LOCALHOST]",
|
||||||
|
"reply_ms": null,
|
||||||
|
"pmtu": 1500,
|
||||||
|
"asymmetric_difference": null,
|
||||||
|
"reached": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ttl": 1,
|
||||||
|
"guess": false,
|
||||||
|
"host": "dust.inr.ac.ru",
|
||||||
|
"reply_ms": 0.411,
|
||||||
|
"pmtu": null,
|
||||||
|
"asymmetric_difference": null,
|
||||||
|
"reached": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ttl": 2,
|
||||||
|
"guess": false,
|
||||||
|
"host": "dust.inr.ac.ru",
|
||||||
|
"reply_ms": 0.39,
|
||||||
|
"pmtu": 1480,
|
||||||
|
"asymmetric_difference": 1,
|
||||||
|
"reached": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ttl": 2,
|
||||||
|
"guess": false,
|
||||||
|
"host": "3ffe:2400:0:109::2",
|
||||||
|
"reply_ms": 463.514,
|
||||||
|
"pmtu": null,
|
||||||
|
"asymmetric_difference": null,
|
||||||
|
"reached": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
$ tracepath6 3ffe:2400:0:109::2 | jc --tracepath -p -r
|
||||||
|
{
|
||||||
|
"pmtu": "1480",
|
||||||
|
"forward_hops": "2",
|
||||||
|
"return_hops": "2",
|
||||||
|
"hops": [
|
||||||
|
{
|
||||||
|
"ttl": "1",
|
||||||
|
"guess": true,
|
||||||
|
"host": "[LOCALHOST]",
|
||||||
|
"reply_ms": null,
|
||||||
|
"pmtu": "1500",
|
||||||
|
"asymmetric_difference": null,
|
||||||
|
"reached": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ttl": "1",
|
||||||
|
"guess": false,
|
||||||
|
"host": "dust.inr.ac.ru",
|
||||||
|
"reply_ms": "0.411",
|
||||||
|
"pmtu": null,
|
||||||
|
"asymmetric_difference": null,
|
||||||
|
"reached": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ttl": "2",
|
||||||
|
"guess": false,
|
||||||
|
"host": "dust.inr.ac.ru",
|
||||||
|
"reply_ms": "0.390",
|
||||||
|
"pmtu": "1480",
|
||||||
|
"asymmetric_difference": "1",
|
||||||
|
"reached": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ttl": "2",
|
||||||
|
"guess": false,
|
||||||
|
"host": "3ffe:2400:0:109::2",
|
||||||
|
"reply_ms": "463.514",
|
||||||
|
"pmtu": null,
|
||||||
|
"asymmetric_difference": null,
|
||||||
|
"reached": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
"""
|
||||||
|
import re
|
||||||
|
import jc.utils
|
||||||
|
|
||||||
|
|
||||||
|
class info():
|
||||||
|
version = '1.0'
|
||||||
|
description = 'tracepath command parser'
|
||||||
|
author = 'Kelly Brazil'
|
||||||
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
|
|
||||||
|
# compatible options: linux, darwin, cygwin, win32, aix, freebsd
|
||||||
|
compatible = ['linux']
|
||||||
|
magic_commands = ['tracepath', 'tracepath6']
|
||||||
|
|
||||||
|
|
||||||
|
__version__ = info.version
|
||||||
|
|
||||||
|
|
||||||
|
def process(proc_data):
|
||||||
|
"""
|
||||||
|
Final processing to conform to the schema.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
|
||||||
|
proc_data: (dictionary) raw structured data to process
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Dictionary. Structured data with the following schema:
|
||||||
|
|
||||||
|
{
|
||||||
|
"pmtu": integer,
|
||||||
|
"forward_hops": integer,
|
||||||
|
"return_hops": integer,
|
||||||
|
"hops": [
|
||||||
|
{
|
||||||
|
"ttl": integer,
|
||||||
|
"guess": boolean,
|
||||||
|
"host": string,
|
||||||
|
"reply_ms": float,
|
||||||
|
"pmtu": integer,
|
||||||
|
"asymmetric_difference": integer,
|
||||||
|
"reached": boolean
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
int_list = ['pmtu', 'forward_hops', 'return_hops', 'ttl', 'asymmetric_difference']
|
||||||
|
float_list = ['reply_ms']
|
||||||
|
|
||||||
|
for key, value in proc_data.items():
|
||||||
|
for item in int_list:
|
||||||
|
if key in int_list:
|
||||||
|
try:
|
||||||
|
proc_data[key] = int(proc_data[key])
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
proc_data[key] = None
|
||||||
|
|
||||||
|
for item in int_list:
|
||||||
|
if key in float_list:
|
||||||
|
try:
|
||||||
|
proc_data[key] = float(proc_data[key])
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
proc_data[key] = None
|
||||||
|
|
||||||
|
if 'hops' in proc_data:
|
||||||
|
for entry in proc_data['hops']:
|
||||||
|
for key in int_list:
|
||||||
|
if key in entry:
|
||||||
|
try:
|
||||||
|
entry[key] = int(entry[key])
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
entry[key] = None
|
||||||
|
|
||||||
|
for key in float_list:
|
||||||
|
if key in entry:
|
||||||
|
try:
|
||||||
|
entry[key] = float(entry[key])
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
entry[key] = None
|
||||||
|
|
||||||
|
return proc_data
|
||||||
|
|
||||||
|
|
||||||
|
def parse(data, raw=False, quiet=False):
|
||||||
|
"""
|
||||||
|
Main text parsing function
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
|
||||||
|
data: (string) text data to parse
|
||||||
|
raw: (boolean) output preprocessed JSON if True
|
||||||
|
quiet: (boolean) suppress warning messages if True
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Dictionary. Raw or processed structured data.
|
||||||
|
"""
|
||||||
|
if not quiet:
|
||||||
|
jc.utils.compatibility(__name__, info.compatible)
|
||||||
|
|
||||||
|
RE_TTL_HOST = re.compile(r'^\s?(?P<ttl>\d+)(?P<ttl_guess>\??):\s+(?P<host>(?:no reply|\S+))') # groups: ttl, ttl_guess, host
|
||||||
|
RE_PMTU = re.compile(r'\spmtu\s(?P<pmtu>[\d]+)') # group: pmtu
|
||||||
|
RE_REPLY_MS = re.compile(r'\s(?P<reply_ms>\d*\.\d*)ms') # group: reply_ms
|
||||||
|
RE_ASYMM = re.compile(r'\sasymm\s+(?P<asymm>[\d]+)') # group: asymm
|
||||||
|
RE_REACHED = re.compile(r'\sreached')
|
||||||
|
RE_SUMMARY = re.compile(r'\s+Resume:\s+pmtu\s+(?P<pmtu>\d+)(?:\s+hops\s+(?P<hops>\d+))?(?:\s+back\s+(?P<back>\d+))?') # groups: pmtu, hops, back
|
||||||
|
|
||||||
|
raw_output = {}
|
||||||
|
|
||||||
|
if jc.utils.has_data(data):
|
||||||
|
hops = []
|
||||||
|
|
||||||
|
for line in filter(None, data.splitlines()):
|
||||||
|
# grab hop information
|
||||||
|
ttl_host = re.search(RE_TTL_HOST, line)
|
||||||
|
pmtu = re.search(RE_PMTU, line)
|
||||||
|
reply_ms = re.search(RE_REPLY_MS, line)
|
||||||
|
asymm = re.search(RE_ASYMM, line)
|
||||||
|
reached = re.search(RE_REACHED, line)
|
||||||
|
summary = re.search(RE_SUMMARY, line)
|
||||||
|
|
||||||
|
if ttl_host:
|
||||||
|
hop = {
|
||||||
|
'ttl': ttl_host.group('ttl'),
|
||||||
|
'guess': bool(ttl_host.group('ttl_guess')),
|
||||||
|
'host': ttl_host.group('host') if ttl_host.group('host') != 'no reply' else None,
|
||||||
|
'reply_ms': reply_ms.group('reply_ms') if reply_ms else None,
|
||||||
|
'pmtu': pmtu.group('pmtu') if pmtu else None,
|
||||||
|
'asymmetric_difference': asymm.group('asymm') if asymm else None,
|
||||||
|
'reached': bool(reached)
|
||||||
|
}
|
||||||
|
|
||||||
|
hops.append(hop)
|
||||||
|
continue
|
||||||
|
|
||||||
|
elif summary:
|
||||||
|
raw_output = {
|
||||||
|
'pmtu': summary.group('pmtu') if summary.group('pmtu') else None,
|
||||||
|
'forward_hops': summary.group('hops') if summary.group('hops') else None,
|
||||||
|
'return_hops': summary.group('back') if summary.group('back') else None,
|
||||||
|
'hops': hops
|
||||||
|
}
|
||||||
|
|
||||||
|
if raw:
|
||||||
|
return raw_output
|
||||||
|
else:
|
||||||
|
return process(raw_output)
|
422
jc/parsers/traceroute.py
Normal file
422
jc/parsers/traceroute.py
Normal file
@ -0,0 +1,422 @@
|
|||||||
|
"""jc - JSON CLI output utility traceroute Parser
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
specify --traceroute as the first argument if the piped input is coming from traceroute
|
||||||
|
|
||||||
|
Note: on OSX and FreeBSD be sure to redirect STDERR to STDOUT since the header line is sent to STDERR
|
||||||
|
e.g. $ traceroute 8.8.8.8 2>&1 | jc --traceroute
|
||||||
|
|
||||||
|
Compatibility:
|
||||||
|
|
||||||
|
'linux', 'darwin', 'freebsd'
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
$ traceroute google.com | jc --traceroute -p
|
||||||
|
{
|
||||||
|
"destination_ip": "216.58.194.46",
|
||||||
|
"destination_name": "google.com",
|
||||||
|
"hops": [
|
||||||
|
{
|
||||||
|
"hop": 1,
|
||||||
|
"probes": [
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "216.230.231.141",
|
||||||
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
|
"rtt": 198.574
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "216.230.231.141",
|
||||||
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
|
"rtt": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "216.230.231.141",
|
||||||
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
|
"rtt": 198.65
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
...
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
$ traceroute google.com | jc --traceroute -p -r
|
||||||
|
{
|
||||||
|
"destination_ip": "216.58.194.46",
|
||||||
|
"destination_name": "google.com",
|
||||||
|
"hops": [
|
||||||
|
{
|
||||||
|
"hop": "1",
|
||||||
|
"probes": [
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "216.230.231.141",
|
||||||
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
|
"rtt": "198.574"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "216.230.231.141",
|
||||||
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
|
"rtt": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"annotation": null,
|
||||||
|
"asn": null,
|
||||||
|
"ip": "216.230.231.141",
|
||||||
|
"name": "216-230-231-141.static.houston.tx.oplink.net",
|
||||||
|
"rtt": "198.650"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
...
|
||||||
|
]
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
import re
|
||||||
|
from decimal import Decimal
|
||||||
|
import jc.utils
|
||||||
|
|
||||||
|
|
||||||
|
class info():
|
||||||
|
version = '1.0'
|
||||||
|
description = 'traceroute command parser'
|
||||||
|
author = 'Kelly Brazil'
|
||||||
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
|
details = 'Using the trparse library by Luis Benitez at https://github.com/lbenitez000/trparse'
|
||||||
|
|
||||||
|
# compatible options: linux, darwin, cygwin, win32, aix, freebsd
|
||||||
|
compatible = ['linux', 'darwin', 'freebsd']
|
||||||
|
magic_commands = ['traceroute', 'traceroute6']
|
||||||
|
|
||||||
|
|
||||||
|
__version__ = info.version
|
||||||
|
|
||||||
|
|
||||||
|
'''
|
||||||
|
Copyright (C) 2015 Luis Benitez
|
||||||
|
|
||||||
|
Parses the output of a traceroute execution into an AST (Abstract Syntax Tree).
|
||||||
|
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2014 Luis Benitez
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
'''
|
||||||
|
|
||||||
|
RE_HEADER = re.compile(r'(\S+)\s+\((\d+\.\d+\.\d+\.\d+|[0-9a-fA-F:]+)\)')
|
||||||
|
RE_PROBE_NAME_IP = re.compile(r'(\S+)\s+\((\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|[0-9a-fA-F:]+)\)+')
|
||||||
|
RE_PROBE_BSD_IPV6 = re.compile(r'\b(?:[A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}\b')
|
||||||
|
RE_HOP = re.compile(r'^\s*(\d+)?\s+(.+)$')
|
||||||
|
RE_PROBE_ASN = re.compile(r'\[AS(\d+)\]')
|
||||||
|
RE_PROBE_RTT_ANNOTATION = re.compile(r'(\d+\.?\d+)?\s+ms|(\s+\*\s+)\s*(!\S*)?')
|
||||||
|
|
||||||
|
|
||||||
|
class Traceroute(object):
|
||||||
|
def __init__(self, dest_name, dest_ip):
|
||||||
|
self.dest_name = dest_name
|
||||||
|
self.dest_ip = dest_ip
|
||||||
|
self.hops = []
|
||||||
|
|
||||||
|
def add_hop(self, hop):
|
||||||
|
self.hops.append(hop)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
text = "Traceroute for %s (%s)\n\n" % (self.dest_name, self.dest_ip)
|
||||||
|
for hop in self.hops:
|
||||||
|
text += str(hop)
|
||||||
|
return text
|
||||||
|
|
||||||
|
|
||||||
|
class Hop(object):
|
||||||
|
def __init__(self, idx):
|
||||||
|
self.idx = idx # Hop count, starting at 1 (usually)
|
||||||
|
self.probes = [] # Series of Probe instances
|
||||||
|
|
||||||
|
def add_probe(self, probe):
|
||||||
|
"""Adds a Probe instance to this hop's results."""
|
||||||
|
if self.probes:
|
||||||
|
probe_last = self.probes[-1]
|
||||||
|
if not probe.ip:
|
||||||
|
probe.ip = probe_last.ip
|
||||||
|
probe.name = probe_last.name
|
||||||
|
self.probes.append(probe)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
text = "{:>3d} ".format(self.idx)
|
||||||
|
text_len = len(text)
|
||||||
|
for n, probe in enumerate(self.probes):
|
||||||
|
text_probe = str(probe)
|
||||||
|
if n:
|
||||||
|
text += (text_len * " ") + text_probe
|
||||||
|
else:
|
||||||
|
text += text_probe
|
||||||
|
text += "\n"
|
||||||
|
return text
|
||||||
|
|
||||||
|
|
||||||
|
class Probe(object):
|
||||||
|
def __init__(self, name=None, ip=None, asn=None, rtt=None, annotation=None):
|
||||||
|
self.name = name
|
||||||
|
self.ip = ip
|
||||||
|
self.asn = asn # Autonomous System number
|
||||||
|
self.rtt = rtt # RTT in ms
|
||||||
|
self.annotation = annotation # Annotation, such as !H, !N, !X, etc
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
text = ""
|
||||||
|
if self.asn is not None:
|
||||||
|
text += "[AS{:d}] ".format(self.asn)
|
||||||
|
if self.rtt:
|
||||||
|
text += "{:s} ({:s}) {:1.3f} ms".format(self.name, self.ip, self.rtt)
|
||||||
|
else:
|
||||||
|
text = "*"
|
||||||
|
if self.annotation:
|
||||||
|
text += " {:s}".format(self.annotation)
|
||||||
|
text += "\n"
|
||||||
|
return text
|
||||||
|
|
||||||
|
|
||||||
|
def loads(data):
|
||||||
|
lines = data.splitlines()
|
||||||
|
|
||||||
|
# Get headers
|
||||||
|
match_dest = RE_HEADER.search(lines[0])
|
||||||
|
dest_name = match_dest.group(1)
|
||||||
|
dest_ip = match_dest.group(2)
|
||||||
|
|
||||||
|
# The Traceroute node is the root of the tree
|
||||||
|
traceroute = Traceroute(dest_name, dest_ip)
|
||||||
|
|
||||||
|
# Parse the remaining lines, they should be only hops/probes
|
||||||
|
for line in lines[1:]:
|
||||||
|
# Skip empty lines
|
||||||
|
if not line:
|
||||||
|
continue
|
||||||
|
|
||||||
|
hop_match = RE_HOP.match(line)
|
||||||
|
|
||||||
|
if hop_match.group(1):
|
||||||
|
hop_index = int(hop_match.group(1))
|
||||||
|
else:
|
||||||
|
hop_index = None
|
||||||
|
|
||||||
|
if hop_index is not None:
|
||||||
|
hop = Hop(hop_index)
|
||||||
|
traceroute.add_hop(hop)
|
||||||
|
|
||||||
|
hop_string = hop_match.group(2)
|
||||||
|
|
||||||
|
probe_asn_match = RE_PROBE_ASN.search(hop_string)
|
||||||
|
if probe_asn_match:
|
||||||
|
probe_asn = int(probe_asn_match.group(1))
|
||||||
|
else:
|
||||||
|
probe_asn = None
|
||||||
|
|
||||||
|
probe_name_ip_match = RE_PROBE_NAME_IP.search(hop_string)
|
||||||
|
probe_bsd_ipv6_match = RE_PROBE_BSD_IPV6.search(hop_string)
|
||||||
|
if probe_name_ip_match:
|
||||||
|
probe_name = probe_name_ip_match.group(1)
|
||||||
|
probe_ip = probe_name_ip_match.group(2)
|
||||||
|
elif probe_bsd_ipv6_match:
|
||||||
|
probe_name = None
|
||||||
|
probe_ip = probe_bsd_ipv6_match.group(0)
|
||||||
|
else:
|
||||||
|
probe_name = None
|
||||||
|
probe_ip = None
|
||||||
|
|
||||||
|
probe_rtt_annotations = RE_PROBE_RTT_ANNOTATION.findall(hop_string)
|
||||||
|
|
||||||
|
for probe_rtt_annotation in probe_rtt_annotations:
|
||||||
|
if probe_rtt_annotation[0]:
|
||||||
|
probe_rtt = Decimal(probe_rtt_annotation[0])
|
||||||
|
elif probe_rtt_annotation[1]:
|
||||||
|
probe_rtt = None
|
||||||
|
else:
|
||||||
|
message = f"Expected probe RTT or *. Got: '{probe_rtt_annotation[0]}'"
|
||||||
|
raise ParseError(message)
|
||||||
|
|
||||||
|
probe_annotation = probe_rtt_annotation[2] or None
|
||||||
|
|
||||||
|
probe = Probe(
|
||||||
|
name=probe_name,
|
||||||
|
ip=probe_ip,
|
||||||
|
asn=probe_asn,
|
||||||
|
rtt=probe_rtt,
|
||||||
|
annotation=probe_annotation
|
||||||
|
)
|
||||||
|
hop.add_probe(probe)
|
||||||
|
|
||||||
|
return traceroute
|
||||||
|
|
||||||
|
|
||||||
|
class ParseError(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
########################################################################################
|
||||||
|
|
||||||
|
def process(proc_data):
|
||||||
|
"""
|
||||||
|
Final processing to conform to the schema.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
|
||||||
|
proc_data: (dictionary) raw structured data to process
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Dictionary. Structured data with the following schema:
|
||||||
|
|
||||||
|
{
|
||||||
|
"destination_ip": string,
|
||||||
|
"destination_name": string,
|
||||||
|
"hops": [
|
||||||
|
{
|
||||||
|
"hop": integer,
|
||||||
|
"probes": [
|
||||||
|
{
|
||||||
|
"annotation": string,
|
||||||
|
"asn": integer,
|
||||||
|
"ip": string,
|
||||||
|
"name": string,
|
||||||
|
"rtt": float
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
int_list = ['hop', 'asn']
|
||||||
|
float_list = ['rtt']
|
||||||
|
|
||||||
|
if 'hops' in proc_data:
|
||||||
|
for entry in proc_data['hops']:
|
||||||
|
for key in int_list:
|
||||||
|
if key in entry:
|
||||||
|
try:
|
||||||
|
entry[key] = int(entry[key])
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
entry[key] = None
|
||||||
|
|
||||||
|
for key in float_list:
|
||||||
|
if key in entry:
|
||||||
|
try:
|
||||||
|
entry[key] = float(entry[key])
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
entry[key] = None
|
||||||
|
|
||||||
|
if 'probes' in entry:
|
||||||
|
for item in entry['probes']:
|
||||||
|
for key in int_list:
|
||||||
|
if key in item:
|
||||||
|
try:
|
||||||
|
item[key] = int(item[key])
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
item[key] = None
|
||||||
|
|
||||||
|
for key in float_list:
|
||||||
|
if key in item:
|
||||||
|
try:
|
||||||
|
item[key] = float(item[key])
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
item[key] = None
|
||||||
|
|
||||||
|
return proc_data
|
||||||
|
|
||||||
|
|
||||||
|
def parse(data, raw=False, quiet=False):
|
||||||
|
"""
|
||||||
|
Main text parsing function
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
|
||||||
|
data: (string) text data to parse
|
||||||
|
raw: (boolean) output preprocessed JSON if True
|
||||||
|
quiet: (boolean) suppress warning messages if True
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
Dictionary. Raw or processed structured data.
|
||||||
|
"""
|
||||||
|
if not quiet:
|
||||||
|
jc.utils.compatibility(__name__, info.compatible)
|
||||||
|
|
||||||
|
raw_output = {}
|
||||||
|
|
||||||
|
if jc.utils.has_data(data):
|
||||||
|
|
||||||
|
# remove any warning lines
|
||||||
|
new_data = []
|
||||||
|
for data_line in data.splitlines():
|
||||||
|
if 'traceroute: Warning: ' not in data_line and 'traceroute6: Warning: ' not in data_line:
|
||||||
|
new_data.append(data_line)
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
data = '\n'.join(new_data)
|
||||||
|
|
||||||
|
# check if header row exists, otherwise raise exception
|
||||||
|
if not data.splitlines()[0].startswith('traceroute to ') and not data.splitlines()[0].startswith('traceroute6 to '):
|
||||||
|
raise ParseError('Traceroute header line not found. Be sure to redirect STDERR to STDOUT on some operating systems.')
|
||||||
|
|
||||||
|
tr = loads(data)
|
||||||
|
hops = tr.hops
|
||||||
|
hops_list = []
|
||||||
|
|
||||||
|
if hops:
|
||||||
|
for hop in hops:
|
||||||
|
hop_obj = {}
|
||||||
|
hop_obj['hop'] = str(hop.idx)
|
||||||
|
probe_list = []
|
||||||
|
|
||||||
|
if hop.probes:
|
||||||
|
for probe in hop.probes:
|
||||||
|
probe_obj = {
|
||||||
|
'annotation': probe.annotation,
|
||||||
|
'asn': None if probe.asn is None else str(probe.asn),
|
||||||
|
'ip': probe.ip,
|
||||||
|
'name': probe.name,
|
||||||
|
'rtt': None if probe.rtt is None else str(probe.rtt)
|
||||||
|
}
|
||||||
|
probe_list.append(probe_obj)
|
||||||
|
|
||||||
|
hop_obj['probes'] = probe_list
|
||||||
|
hops_list.append(hop_obj)
|
||||||
|
|
||||||
|
raw_output = {
|
||||||
|
'destination_ip': tr.dest_ip,
|
||||||
|
'destination_name': tr.dest_name,
|
||||||
|
'hops': hops_list
|
||||||
|
}
|
||||||
|
|
||||||
|
if raw:
|
||||||
|
return raw_output
|
||||||
|
else:
|
||||||
|
return process(raw_output)
|
@ -30,7 +30,7 @@ import jc.utils
|
|||||||
|
|
||||||
|
|
||||||
class info():
|
class info():
|
||||||
version = '1.3'
|
version = '1.4'
|
||||||
description = 'uname -a command parser'
|
description = 'uname -a command parser'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
@ -43,6 +43,10 @@ class info():
|
|||||||
__version__ = info.version
|
__version__ = info.version
|
||||||
|
|
||||||
|
|
||||||
|
class ParseError(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def process(proc_data):
|
def process(proc_data):
|
||||||
"""
|
"""
|
||||||
Final processing to conform to the schema.
|
Final processing to conform to the schema.
|
||||||
@ -94,6 +98,10 @@ def parse(data, raw=False, quiet=False):
|
|||||||
# check for OSX output
|
# check for OSX output
|
||||||
if data.startswith('Darwin'):
|
if data.startswith('Darwin'):
|
||||||
parsed_line = data.split()
|
parsed_line = data.split()
|
||||||
|
|
||||||
|
if len(parsed_line) < 5:
|
||||||
|
raise ParseError('Could not parse uname output. Make sure to use "uname -a".')
|
||||||
|
|
||||||
raw_output['machine'] = parsed_line.pop(-1)
|
raw_output['machine'] = parsed_line.pop(-1)
|
||||||
raw_output['kernel_name'] = parsed_line.pop(0)
|
raw_output['kernel_name'] = parsed_line.pop(0)
|
||||||
raw_output['node_name'] = parsed_line.pop(0)
|
raw_output['node_name'] = parsed_line.pop(0)
|
||||||
@ -103,6 +111,10 @@ def parse(data, raw=False, quiet=False):
|
|||||||
# otherwise use linux parser
|
# otherwise use linux parser
|
||||||
else:
|
else:
|
||||||
parsed_line = data.split(maxsplit=3)
|
parsed_line = data.split(maxsplit=3)
|
||||||
|
|
||||||
|
if len(parsed_line) < 3:
|
||||||
|
raise ParseError('Could not parse uname output. Make sure to use "uname -a".')
|
||||||
|
|
||||||
raw_output['kernel_name'] = parsed_line.pop(0)
|
raw_output['kernel_name'] = parsed_line.pop(0)
|
||||||
raw_output['node_name'] = parsed_line.pop(0)
|
raw_output['node_name'] = parsed_line.pop(0)
|
||||||
raw_output['kernel_release'] = parsed_line.pop(0)
|
raw_output['kernel_release'] = parsed_line.pop(0)
|
||||||
|
16
man/jc.1
16
man/jc.1
@ -1,4 +1,4 @@
|
|||||||
.TH jc 1 2020-07-12 1.12.1 "JSON CLI output utility"
|
.TH jc 1 2020-07-12 1.13.0 "JSON CLI output utility"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
jc \- JSONifies the output of many CLI tools and file-types
|
jc \- JSONifies the output of many CLI tools and file-types
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -101,7 +101,7 @@ ifconfig command parser
|
|||||||
.TP
|
.TP
|
||||||
.B
|
.B
|
||||||
\fB--ini\fP
|
\fB--ini\fP
|
||||||
INI file parser
|
INI file parser. Also parses files/output containing simple key/value pairs
|
||||||
.TP
|
.TP
|
||||||
.B
|
.B
|
||||||
\fB--iptables\fP
|
\fB--iptables\fP
|
||||||
@ -148,6 +148,10 @@ ntpq \fB-p\fP command parser
|
|||||||
/etc/passwd file parser
|
/etc/passwd file parser
|
||||||
.TP
|
.TP
|
||||||
.B
|
.B
|
||||||
|
\fB--ping\fP
|
||||||
|
ping command parser
|
||||||
|
.TP
|
||||||
|
.B
|
||||||
\fB--pip-list\fP
|
\fB--pip-list\fP
|
||||||
pip list command parser
|
pip list command parser
|
||||||
.TP
|
.TP
|
||||||
@ -200,6 +204,14 @@ systemctl list-unit-files command parser
|
|||||||
timedatectl status command parser
|
timedatectl status command parser
|
||||||
.TP
|
.TP
|
||||||
.B
|
.B
|
||||||
|
\fB--tracepath\fP
|
||||||
|
tracepath command parser
|
||||||
|
.TP
|
||||||
|
.B
|
||||||
|
\fB--traceroute\fP
|
||||||
|
traceroute command parser
|
||||||
|
.TP
|
||||||
|
.B
|
||||||
\fB--uname\fP
|
\fB--uname\fP
|
||||||
uname \fB-a\fP command parser
|
uname \fB-a\fP command parser
|
||||||
.TP
|
.TP
|
||||||
|
2
setup.py
2
setup.py
@ -5,7 +5,7 @@ with open('README.md', 'r') as f:
|
|||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name='jc',
|
name='jc',
|
||||||
version='1.12.1',
|
version='1.13.0',
|
||||||
author='Kelly Brazil',
|
author='Kelly Brazil',
|
||||||
author_email='kellyjonbrazil@gmail.com',
|
author_email='kellyjonbrazil@gmail.com',
|
||||||
description='Converts the output of popular command-line tools and file-types to JSON.',
|
description='Converts the output of popular command-line tools and file-types to JSON.',
|
||||||
|
1
tests/fixtures/centos-7.7/ping-hostname-O-D-p-s.json
vendored
Normal file
1
tests/fixtures/centos-7.7/ping-hostname-O-D-p-s.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "151.101.189.67", "data_bytes": 1400, "pattern": "0xabcd", "destination": "turner-tls.map.fastly.net", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19146.0, "round_trip_ms_min": 28.96, "round_trip_ms_avg": 34.468, "round_trip_ms_max": 38.892, "round_trip_ms_stddev": 3.497, "responses": [{"type": "reply", "timestamp": 1594978465.914536, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 1, "ttl": 59, "time_ms": 31.4, "duplicate": false}, {"type": "reply", "timestamp": 1594978465.993009, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 2, "ttl": 59, "time_ms": 30.3, "duplicate": false}, {"type": "reply", "timestamp": 1594978467.010196, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 3, "ttl": 59, "time_ms": 32.0, "duplicate": false}, {"type": "reply", "timestamp": 1594978468.033743, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 4, "ttl": 59, "time_ms": 38.8, "duplicate": false}, {"type": "reply", "timestamp": 1594978469.051227, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 5, "ttl": 59, "time_ms": 38.0, "duplicate": false}, {"type": "reply", "timestamp": 1594978470.048764, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 6, "ttl": 59, "time_ms": 29.9, "duplicate": false}, {"type": "reply", "timestamp": 1594978471.051945, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 7, "ttl": 59, "time_ms": 28.9, "duplicate": false}, {"type": "reply", "timestamp": 1594978472.064206, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 8, "ttl": 59, "time_ms": 37.4, "duplicate": false}, {"type": "reply", "timestamp": 1594978473.062587, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 9, "ttl": 59, "time_ms": 31.5, "duplicate": false}, {"type": "reply", "timestamp": 1594978474.074343, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 10, "ttl": 59, "time_ms": 38.3, "duplicate": false}, {"type": "reply", "timestamp": 1594978475.079703, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 11, "ttl": 59, "time_ms": 38.8, "duplicate": false}, {"type": "reply", "timestamp": 1594978476.076383, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 12, "ttl": 59, "time_ms": 30.7, "duplicate": false}, {"type": "reply", "timestamp": 1594978477.084119, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 13, "ttl": 59, "time_ms": 30.7, "duplicate": false}, {"type": "reply", "timestamp": 1594978478.092207, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 14, "ttl": 59, "time_ms": 31.6, "duplicate": false}, {"type": "reply", "timestamp": 1594978479.104358, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 15, "ttl": 59, "time_ms": 37.7, "duplicate": false}, {"type": "reply", "timestamp": 1594978480.106907, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 16, "ttl": 59, "time_ms": 37.5, "duplicate": false}, {"type": "reply", "timestamp": 1594978481.11558, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 17, "ttl": 59, "time_ms": 37.3, "duplicate": false}, {"type": "reply", "timestamp": 1594978482.119872, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 18, "ttl": 59, "time_ms": 33.8, "duplicate": false}, {"type": "reply", "timestamp": 1594978483.131901, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 19, "ttl": 59, "time_ms": 37.0, "duplicate": false}, {"type": "reply", "timestamp": 1594978484.141117, "bytes": 1408, "response_ip": "151.101.189.67", "icmp_seq": 20, "ttl": 59, "time_ms": 36.9, "duplicate": false}]}
|
26
tests/fixtures/centos-7.7/ping-hostname-O-D-p-s.out
vendored
Normal file
26
tests/fixtures/centos-7.7/ping-hostname-O-D-p-s.out
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
PATTERN: 0xabcd
|
||||||
|
PING turner-tls.map.fastly.net (151.101.189.67) 1400(1428) bytes of data.
|
||||||
|
[1594978465.914536] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=1 ttl=59 time=31.4 ms
|
||||||
|
[1594978465.993009] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=2 ttl=59 time=30.3 ms
|
||||||
|
[1594978467.010196] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=3 ttl=59 time=32.0 ms
|
||||||
|
[1594978468.033743] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=4 ttl=59 time=38.8 ms
|
||||||
|
[1594978469.051227] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=5 ttl=59 time=38.0 ms
|
||||||
|
[1594978470.048764] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=6 ttl=59 time=29.9 ms
|
||||||
|
[1594978471.051945] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=7 ttl=59 time=28.9 ms
|
||||||
|
[1594978472.064206] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=8 ttl=59 time=37.4 ms
|
||||||
|
[1594978473.062587] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=9 ttl=59 time=31.5 ms
|
||||||
|
[1594978474.074343] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=10 ttl=59 time=38.3 ms
|
||||||
|
[1594978475.079703] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=11 ttl=59 time=38.8 ms
|
||||||
|
[1594978476.076383] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=12 ttl=59 time=30.7 ms
|
||||||
|
[1594978477.084119] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=13 ttl=59 time=30.7 ms
|
||||||
|
[1594978478.092207] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=14 ttl=59 time=31.6 ms
|
||||||
|
[1594978479.104358] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=15 ttl=59 time=37.7 ms
|
||||||
|
[1594978480.106907] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=16 ttl=59 time=37.5 ms
|
||||||
|
[1594978481.115580] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=17 ttl=59 time=37.3 ms
|
||||||
|
[1594978482.119872] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=18 ttl=59 time=33.8 ms
|
||||||
|
[1594978483.131901] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=19 ttl=59 time=37.0 ms
|
||||||
|
[1594978484.141117] 1408 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=20 ttl=59 time=36.9 ms
|
||||||
|
|
||||||
|
--- turner-tls.map.fastly.net ping statistics ---
|
||||||
|
20 packets transmitted, 20 received, 0% packet loss, time 19146ms
|
||||||
|
rtt min/avg/max/mdev = 28.960/34.468/38.892/3.497 ms
|
1
tests/fixtures/centos-7.7/ping-hostname-O-p.json
vendored
Normal file
1
tests/fixtures/centos-7.7/ping-hostname-O-p.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "151.101.129.67", "data_bytes": 56, "pattern": "0xabcd", "destination": "turner-tls.map.fastly.net", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19233.0, "round_trip_ms_min": 23.359, "round_trip_ms_avg": 28.495, "round_trip_ms_max": 33.979, "round_trip_ms_stddev": 4.081, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 1, "ttl": 59, "time_ms": 24.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 2, "ttl": 59, "time_ms": 23.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 3, "ttl": 59, "time_ms": 32.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 4, "ttl": 59, "time_ms": 32.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 5, "ttl": 59, "time_ms": 26.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 6, "ttl": 59, "time_ms": 24.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 7, "ttl": 59, "time_ms": 24.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 8, "ttl": 59, "time_ms": 33.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 9, "ttl": 59, "time_ms": 32.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 10, "ttl": 59, "time_ms": 31.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 11, "ttl": 59, "time_ms": 25.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 12, "ttl": 59, "time_ms": 33.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 13, "ttl": 59, "time_ms": 23.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 14, "ttl": 59, "time_ms": 23.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 15, "ttl": 59, "time_ms": 33.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 16, "ttl": 59, "time_ms": 24.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 17, "ttl": 59, "time_ms": 30.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 18, "ttl": 59, "time_ms": 24.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 19, "ttl": 59, "time_ms": 32.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 20, "ttl": 59, "time_ms": 31.0, "duplicate": false}]}
|
26
tests/fixtures/centos-7.7/ping-hostname-O-p.out
vendored
Normal file
26
tests/fixtures/centos-7.7/ping-hostname-O-p.out
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
PATTERN: 0xabcd
|
||||||
|
PING turner-tls.map.fastly.net (151.101.129.67) 56(84) bytes of data.
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=1 ttl=59 time=24.4 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=2 ttl=59 time=23.3 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=3 ttl=59 time=32.6 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=4 ttl=59 time=32.6 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=5 ttl=59 time=26.9 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=6 ttl=59 time=24.1 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=7 ttl=59 time=24.6 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=8 ttl=59 time=33.9 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=9 ttl=59 time=32.7 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=10 ttl=59 time=31.2 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=11 ttl=59 time=25.7 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=12 ttl=59 time=33.8 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=13 ttl=59 time=23.7 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=14 ttl=59 time=23.9 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=15 ttl=59 time=33.6 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=16 ttl=59 time=24.5 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=17 ttl=59 time=30.1 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=18 ttl=59 time=24.1 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=19 ttl=59 time=32.2 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=20 ttl=59 time=31.0 ms
|
||||||
|
|
||||||
|
--- turner-tls.map.fastly.net ping statistics ---
|
||||||
|
20 packets transmitted, 20 received, 0% packet loss, time 19233ms
|
||||||
|
rtt min/avg/max/mdev = 23.359/28.495/33.979/4.081 ms
|
1
tests/fixtures/centos-7.7/ping-hostname-O.json
vendored
Normal file
1
tests/fixtures/centos-7.7/ping-hostname-O.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "151.101.189.67", "data_bytes": 56, "pattern": null, "destination": "turner-tls.map.fastly.net", "packets_transmitted": 20, "packets_received": 19, "packet_loss_percent": 5.0, "duplicates": 0, "time_ms": 19125.0, "round_trip_ms_min": 27.656, "round_trip_ms_avg": 33.717, "round_trip_ms_max": 36.758, "round_trip_ms_stddev": 2.814, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 1, "ttl": 59, "time_ms": 29.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 2, "ttl": 59, "time_ms": 30.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 3, "ttl": 59, "time_ms": 35.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 4, "ttl": 59, "time_ms": 35.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 5, "ttl": 59, "time_ms": 34.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 6, "ttl": 59, "time_ms": 29.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 7, "ttl": 59, "time_ms": 27.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 8, "ttl": 59, "time_ms": 28.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 9, "ttl": 59, "time_ms": 35.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 10, "ttl": 59, "time_ms": 34.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 11, "ttl": 59, "time_ms": 35.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 12, "ttl": 59, "time_ms": 35.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 13, "ttl": 59, "time_ms": 34.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 14, "ttl": 59, "time_ms": 35.5, "duplicate": false}, {"type": "timeout", "timestamp": null, "icmp_seq": 15}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 16, "ttl": 59, "time_ms": 36.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 17, "ttl": 59, "time_ms": 34.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 18, "ttl": 59, "time_ms": 34.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 19, "ttl": 59, "time_ms": 36.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.189.67", "icmp_seq": 20, "ttl": 59, "time_ms": 34.3, "duplicate": false}]}
|
25
tests/fixtures/centos-7.7/ping-hostname-O.out
vendored
Normal file
25
tests/fixtures/centos-7.7/ping-hostname-O.out
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
PING turner-tls.map.fastly.net (151.101.189.67) 56(84) bytes of data.
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=1 ttl=59 time=29.6 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=2 ttl=59 time=30.1 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=3 ttl=59 time=35.5 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=4 ttl=59 time=35.5 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=5 ttl=59 time=34.9 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=6 ttl=59 time=29.9 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=7 ttl=59 time=27.6 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=8 ttl=59 time=28.6 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=9 ttl=59 time=35.2 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=10 ttl=59 time=34.4 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=11 ttl=59 time=35.9 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=12 ttl=59 time=35.8 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=13 ttl=59 time=34.4 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=14 ttl=59 time=35.5 ms
|
||||||
|
no answer yet for icmp_seq=15
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=16 ttl=59 time=36.6 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=17 ttl=59 time=34.6 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=18 ttl=59 time=34.6 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=19 ttl=59 time=36.7 ms
|
||||||
|
64 bytes from 151.101.189.67 (151.101.189.67): icmp_seq=20 ttl=59 time=34.3 ms
|
||||||
|
|
||||||
|
--- turner-tls.map.fastly.net ping statistics ---
|
||||||
|
20 packets transmitted, 19 received, 5% packet loss, time 19125ms
|
||||||
|
rtt min/avg/max/mdev = 27.656/33.717/36.758/2.814 ms
|
1
tests/fixtures/centos-7.7/ping-ip-O-D.json
vendored
Normal file
1
tests/fixtures/centos-7.7/ping-ip-O-D.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "127.0.0.1", "data_bytes": 56, "pattern": null, "destination": "127.0.0.1", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19081.0, "round_trip_ms_min": 0.041, "round_trip_ms_avg": 0.048, "round_trip_ms_max": 0.081, "round_trip_ms_stddev": 0.009, "responses": [{"type": "reply", "timestamp": 1595037214.261953, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.041, "duplicate": false}, {"type": "reply", "timestamp": 1595037215.264798, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.048, "duplicate": false}, {"type": "reply", "timestamp": 1595037216.272296, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 3, "ttl": 64, "time_ms": 0.047, "duplicate": false}, {"type": "reply", "timestamp": 1595037217.275851, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 4, "ttl": 64, "time_ms": 0.062, "duplicate": false}, {"type": "reply", "timestamp": 1595037218.284242, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 5, "ttl": 64, "time_ms": 0.045, "duplicate": false}, {"type": "reply", "timestamp": 1595037219.283712, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 6, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": 1595037220.290949, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 7, "ttl": 64, "time_ms": 0.046, "duplicate": false}, {"type": "reply", "timestamp": 1595037221.295962, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 8, "ttl": 64, "time_ms": 0.044, "duplicate": false}, {"type": "reply", "timestamp": 1595037222.30702, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 9, "ttl": 64, "time_ms": 0.048, "duplicate": false}, {"type": "reply", "timestamp": 1595037223.313919, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 10, "ttl": 64, "time_ms": 0.081, "duplicate": false}, {"type": "reply", "timestamp": 1595037224.313679, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 11, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": 1595037225.320748, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 12, "ttl": 64, "time_ms": 0.044, "duplicate": false}, {"type": "reply", "timestamp": 1595037226.324322, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 13, "ttl": 64, "time_ms": 0.045, "duplicate": false}, {"type": "reply", "timestamp": 1595037227.325835, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 14, "ttl": 64, "time_ms": 0.046, "duplicate": false}, {"type": "reply", "timestamp": 1595037228.327028, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 15, "ttl": 64, "time_ms": 0.046, "duplicate": false}, {"type": "reply", "timestamp": 1595037229.329891, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 16, "ttl": 64, "time_ms": 0.052, "duplicate": false}, {"type": "reply", "timestamp": 1595037230.333891, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 17, "ttl": 64, "time_ms": 0.044, "duplicate": false}, {"type": "reply", "timestamp": 1595037231.338137, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 18, "ttl": 64, "time_ms": 0.046, "duplicate": false}, {"type": "reply", "timestamp": 1595037232.340475, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 19, "ttl": 64, "time_ms": 0.048, "duplicate": false}, {"type": "reply", "timestamp": 1595037233.343058, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 20, "ttl": 64, "time_ms": 0.045, "duplicate": false}]}
|
25
tests/fixtures/centos-7.7/ping-ip-O-D.out
vendored
Normal file
25
tests/fixtures/centos-7.7/ping-ip-O-D.out
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
|
||||||
|
[1595037214.261953] 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.041 ms
|
||||||
|
[1595037215.264798] 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.048 ms
|
||||||
|
[1595037216.272296] 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.047 ms
|
||||||
|
[1595037217.275851] 64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.062 ms
|
||||||
|
[1595037218.284242] 64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.045 ms
|
||||||
|
[1595037219.283712] 64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.043 ms
|
||||||
|
[1595037220.290949] 64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.046 ms
|
||||||
|
[1595037221.295962] 64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.044 ms
|
||||||
|
[1595037222.307020] 64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.048 ms
|
||||||
|
[1595037223.313919] 64 bytes from 127.0.0.1: icmp_seq=10 ttl=64 time=0.081 ms
|
||||||
|
[1595037224.313679] 64 bytes from 127.0.0.1: icmp_seq=11 ttl=64 time=0.043 ms
|
||||||
|
[1595037225.320748] 64 bytes from 127.0.0.1: icmp_seq=12 ttl=64 time=0.044 ms
|
||||||
|
[1595037226.324322] 64 bytes from 127.0.0.1: icmp_seq=13 ttl=64 time=0.045 ms
|
||||||
|
[1595037227.325835] 64 bytes from 127.0.0.1: icmp_seq=14 ttl=64 time=0.046 ms
|
||||||
|
[1595037228.327028] 64 bytes from 127.0.0.1: icmp_seq=15 ttl=64 time=0.046 ms
|
||||||
|
[1595037229.329891] 64 bytes from 127.0.0.1: icmp_seq=16 ttl=64 time=0.052 ms
|
||||||
|
[1595037230.333891] 64 bytes from 127.0.0.1: icmp_seq=17 ttl=64 time=0.044 ms
|
||||||
|
[1595037231.338137] 64 bytes from 127.0.0.1: icmp_seq=18 ttl=64 time=0.046 ms
|
||||||
|
[1595037232.340475] 64 bytes from 127.0.0.1: icmp_seq=19 ttl=64 time=0.048 ms
|
||||||
|
[1595037233.343058] 64 bytes from 127.0.0.1: icmp_seq=20 ttl=64 time=0.045 ms
|
||||||
|
|
||||||
|
--- 127.0.0.1 ping statistics ---
|
||||||
|
20 packets transmitted, 20 received, 0% packet loss, time 19081ms
|
||||||
|
rtt min/avg/max/mdev = 0.041/0.048/0.081/0.009 ms
|
1
tests/fixtures/centos-7.7/ping-ip-O.json
vendored
Normal file
1
tests/fixtures/centos-7.7/ping-ip-O.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "127.0.0.1", "data_bytes": 56, "pattern": null, "destination": "127.0.0.1", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19070.0, "round_trip_ms_min": 0.038, "round_trip_ms_avg": 0.047, "round_trip_ms_max": 0.08, "round_trip_ms_stddev": 0.011, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.038, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 3, "ttl": 64, "time_ms": 0.044, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 4, "ttl": 64, "time_ms": 0.052, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 5, "ttl": 64, "time_ms": 0.08, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 6, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 7, "ttl": 64, "time_ms": 0.047, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 8, "ttl": 64, "time_ms": 0.04, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 9, "ttl": 64, "time_ms": 0.052, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 10, "ttl": 64, "time_ms": 0.044, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 11, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 12, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 13, "ttl": 64, "time_ms": 0.05, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 14, "ttl": 64, "time_ms": 0.045, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 15, "ttl": 64, "time_ms": 0.062, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 16, "ttl": 64, "time_ms": 0.046, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 17, "ttl": 64, "time_ms": 0.046, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 18, "ttl": 64, "time_ms": 0.045, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 19, "ttl": 64, "time_ms": 0.044, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 20, "ttl": 64, "time_ms": 0.044, "duplicate": false}]}
|
25
tests/fixtures/centos-7.7/ping-ip-O.out
vendored
Normal file
25
tests/fixtures/centos-7.7/ping-ip-O.out
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.038 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.043 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.044 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.052 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.080 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.043 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.047 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.040 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.052 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=10 ttl=64 time=0.044 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=11 ttl=64 time=0.043 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=12 ttl=64 time=0.043 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=13 ttl=64 time=0.050 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=14 ttl=64 time=0.045 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=15 ttl=64 time=0.062 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=16 ttl=64 time=0.046 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=17 ttl=64 time=0.046 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=18 ttl=64 time=0.045 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=19 ttl=64 time=0.044 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=20 ttl=64 time=0.044 ms
|
||||||
|
|
||||||
|
--- 127.0.0.1 ping statistics ---
|
||||||
|
20 packets transmitted, 20 received, 0% packet loss, time 19070ms
|
||||||
|
rtt min/avg/max/mdev = 0.038/0.047/0.080/0.011 ms
|
1
tests/fixtures/centos-7.7/ping-ip-dup.json
vendored
Normal file
1
tests/fixtures/centos-7.7/ping-ip-dup.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "192.168.1.255", "data_bytes": 56, "pattern": null, "destination": "192.168.1.255", "packets_transmitted": 2, "packets_received": 2, "packet_loss_percent": 0.0, "duplicates": 19, "time_ms": 1013.0, "round_trip_ms_min": 0.586, "round_trip_ms_avg": 504.26, "round_trip_ms_max": 1276.448, "round_trip_ms_stddev": 417.208, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.221", "icmp_seq": 1, "ttl": 64, "time_ms": 0.586, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.88", "icmp_seq": 1, "ttl": 64, "time_ms": 382.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.78", "icmp_seq": 1, "ttl": 128, "time_ms": 382.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.217", "icmp_seq": 1, "ttl": 255, "time_ms": 387.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.186", "icmp_seq": 1, "ttl": 64, "time_ms": 389.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.89", "icmp_seq": 1, "ttl": 64, "time_ms": 389.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.75", "icmp_seq": 1, "ttl": 64, "time_ms": 584.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.221", "icmp_seq": 2, "ttl": 64, "time_ms": 0.861, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.78", "icmp_seq": 2, "ttl": 128, "time_ms": 4.17, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.88", "icmp_seq": 2, "ttl": 64, "time_ms": 4.19, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.89", "icmp_seq": 2, "ttl": 64, "time_ms": 12.7, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.81", "icmp_seq": 1, "ttl": 64, "time_ms": 1029.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.72", "icmp_seq": 1, "ttl": 64, "time_ms": 1276.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.251", "icmp_seq": 1, "ttl": 64, "time_ms": 1276.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.251", "icmp_seq": 2, "ttl": 64, "time_ms": 262.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.72", "icmp_seq": 2, "ttl": 64, "time_ms": 263.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.246", "icmp_seq": 2, "ttl": 255, "time_ms": 263.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.217", "icmp_seq": 2, "ttl": 255, "time_ms": 919.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.186", "icmp_seq": 2, "ttl": 64, "time_ms": 919.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.75", "icmp_seq": 2, "ttl": 64, "time_ms": 919.0, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "192.168.1.81", "icmp_seq": 2, "ttl": 64, "time_ms": 919.0, "duplicate": true}]}
|
27
tests/fixtures/centos-7.7/ping-ip-dup.out
vendored
Normal file
27
tests/fixtures/centos-7.7/ping-ip-dup.out
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
WARNING: pinging broadcast address
|
||||||
|
PING 192.168.1.255 (192.168.1.255) 56(84) bytes of data.
|
||||||
|
64 bytes from 192.168.1.221: icmp_seq=1 ttl=64 time=0.586 ms
|
||||||
|
64 bytes from 192.168.1.88: icmp_seq=1 ttl=64 time=382 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.78: icmp_seq=1 ttl=128 time=382 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.217: icmp_seq=1 ttl=255 time=387 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.186: icmp_seq=1 ttl=64 time=389 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.89: icmp_seq=1 ttl=64 time=389 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.75: icmp_seq=1 ttl=64 time=584 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.221: icmp_seq=2 ttl=64 time=0.861 ms
|
||||||
|
64 bytes from 192.168.1.78: icmp_seq=2 ttl=128 time=4.17 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.88: icmp_seq=2 ttl=64 time=4.19 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.89: icmp_seq=2 ttl=64 time=12.7 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.81: icmp_seq=1 ttl=64 time=1029 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.72: icmp_seq=1 ttl=64 time=1276 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.251: icmp_seq=1 ttl=64 time=1276 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.251: icmp_seq=2 ttl=64 time=262 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.72: icmp_seq=2 ttl=64 time=263 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.246: icmp_seq=2 ttl=255 time=263 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.217: icmp_seq=2 ttl=255 time=919 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.186: icmp_seq=2 ttl=64 time=919 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.75: icmp_seq=2 ttl=64 time=919 ms (DUP!)
|
||||||
|
64 bytes from 192.168.1.81: icmp_seq=2 ttl=64 time=919 ms (DUP!)
|
||||||
|
|
||||||
|
--- 192.168.1.255 ping statistics ---
|
||||||
|
2 packets transmitted, 2 received, +19 duplicates, 0% packet loss, time 1013ms
|
||||||
|
rtt min/avg/max/mdev = 0.586/504.260/1276.448/417.208 ms, pipe 2
|
1
tests/fixtures/centos-7.7/ping6-hostname-O-D-p-s.json
vendored
Normal file
1
tests/fixtures/centos-7.7/ping6-hostname-O-D-p-s.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "2a04:4e42:2d::323", "data_bytes": 1400, "pattern": "0xabcd", "destination": "www.cnn.com", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19077.0, "round_trip_ms_min": 31.845, "round_trip_ms_avg": 39.274, "round_trip_ms_max": 43.243, "round_trip_ms_stddev": 3.522, "responses": [{"type": "reply", "timestamp": 1594978345.609669, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 1, "ttl": 59, "time_ms": 32.4, "duplicate": false}, {"type": "reply", "timestamp": 1594978346.58542, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 2, "ttl": 59, "time_ms": 39.9, "duplicate": false}, {"type": "reply", "timestamp": 1594978347.594128, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 3, "ttl": 59, "time_ms": 42.3, "duplicate": false}, {"type": "reply", "timestamp": 1594978348.595221, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 4, "ttl": 59, "time_ms": 40.2, "duplicate": false}, {"type": "reply", "timestamp": 1594978349.600372, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 5, "ttl": 59, "time_ms": 43.2, "duplicate": false}, {"type": "reply", "timestamp": 1594978350.590676, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 6, "ttl": 59, "time_ms": 31.8, "duplicate": false}, {"type": "reply", "timestamp": 1594978351.601527, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 7, "ttl": 59, "time_ms": 41.8, "duplicate": false}, {"type": "reply", "timestamp": 1594978352.604195, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 8, "ttl": 59, "time_ms": 41.7, "duplicate": false}, {"type": "reply", "timestamp": 1594978353.607212, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 9, "ttl": 59, "time_ms": 42.0, "duplicate": false}, {"type": "reply", "timestamp": 1594978354.610771, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 10, "ttl": 59, "time_ms": 40.7, "duplicate": false}, {"type": "reply", "timestamp": 1594978355.613729, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 11, "ttl": 59, "time_ms": 40.4, "duplicate": false}, {"type": "reply", "timestamp": 1594978356.611887, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 12, "ttl": 59, "time_ms": 32.6, "duplicate": false}, {"type": "reply", "timestamp": 1594978357.62481, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 13, "ttl": 59, "time_ms": 40.1, "duplicate": false}, {"type": "reply", "timestamp": 1594978358.629185, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 14, "ttl": 59, "time_ms": 42.0, "duplicate": false}, {"type": "reply", "timestamp": 1594978359.634854, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 15, "ttl": 59, "time_ms": 41.2, "duplicate": false}, {"type": "reply", "timestamp": 1594978360.638344, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 16, "ttl": 59, "time_ms": 40.6, "duplicate": false}, {"type": "reply", "timestamp": 1594978361.640968, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 17, "ttl": 59, "time_ms": 40.7, "duplicate": false}, {"type": "reply", "timestamp": 1594978362.645739, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 18, "ttl": 59, "time_ms": 39.9, "duplicate": false}, {"type": "reply", "timestamp": 1594978363.6467, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 19, "ttl": 59, "time_ms": 37.5, "duplicate": false}, {"type": "reply", "timestamp": 1594978364.650853, "bytes": 1408, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 20, "ttl": 59, "time_ms": 33.6, "duplicate": false}]}
|
26
tests/fixtures/centos-7.7/ping6-hostname-O-D-p-s.out
vendored
Normal file
26
tests/fixtures/centos-7.7/ping6-hostname-O-D-p-s.out
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
PATTERN: 0xabcd
|
||||||
|
PING www.cnn.com(2a04:4e42:2d::323 (2a04:4e42:2d::323)) 1400 data bytes
|
||||||
|
[1594978345.609669] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=1 ttl=59 time=32.4 ms
|
||||||
|
[1594978346.585420] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=2 ttl=59 time=39.9 ms
|
||||||
|
[1594978347.594128] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=3 ttl=59 time=42.3 ms
|
||||||
|
[1594978348.595221] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=4 ttl=59 time=40.2 ms
|
||||||
|
[1594978349.600372] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=5 ttl=59 time=43.2 ms
|
||||||
|
[1594978350.590676] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=6 ttl=59 time=31.8 ms
|
||||||
|
[1594978351.601527] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=7 ttl=59 time=41.8 ms
|
||||||
|
[1594978352.604195] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=8 ttl=59 time=41.7 ms
|
||||||
|
[1594978353.607212] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=9 ttl=59 time=42.0 ms
|
||||||
|
[1594978354.610771] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=10 ttl=59 time=40.7 ms
|
||||||
|
[1594978355.613729] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=11 ttl=59 time=40.4 ms
|
||||||
|
[1594978356.611887] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=12 ttl=59 time=32.6 ms
|
||||||
|
[1594978357.624810] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=13 ttl=59 time=40.1 ms
|
||||||
|
[1594978358.629185] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=14 ttl=59 time=42.0 ms
|
||||||
|
[1594978359.634854] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=15 ttl=59 time=41.2 ms
|
||||||
|
[1594978360.638344] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=16 ttl=59 time=40.6 ms
|
||||||
|
[1594978361.640968] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=17 ttl=59 time=40.7 ms
|
||||||
|
[1594978362.645739] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=18 ttl=59 time=39.9 ms
|
||||||
|
[1594978363.646700] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=19 ttl=59 time=37.5 ms
|
||||||
|
[1594978364.650853] 1408 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=20 ttl=59 time=33.6 ms
|
||||||
|
|
||||||
|
--- www.cnn.com ping statistics ---
|
||||||
|
20 packets transmitted, 20 received, 0% packet loss, time 19077ms
|
||||||
|
rtt min/avg/max/mdev = 31.845/39.274/43.243/3.522 ms
|
1
tests/fixtures/centos-7.7/ping6-hostname-O-p.json
vendored
Normal file
1
tests/fixtures/centos-7.7/ping6-hostname-O-p.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "2a04:4e42:2d::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "www.cnn.com", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19164.0, "round_trip_ms_min": 30.757, "round_trip_ms_avg": 37.455, "round_trip_ms_max": 42.652, "round_trip_ms_stddev": 3.338, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 1, "ttl": 59, "time_ms": 30.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 2, "ttl": 59, "time_ms": 39.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 3, "ttl": 59, "time_ms": 32.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 4, "ttl": 59, "time_ms": 38.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 5, "ttl": 59, "time_ms": 38.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 6, "ttl": 59, "time_ms": 42.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 7, "ttl": 59, "time_ms": 30.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 8, "ttl": 59, "time_ms": 39.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 9, "ttl": 59, "time_ms": 39.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 10, "ttl": 59, "time_ms": 38.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 11, "ttl": 59, "time_ms": 38.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 12, "ttl": 59, "time_ms": 38.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 13, "ttl": 59, "time_ms": 39.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 14, "ttl": 59, "time_ms": 37.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 15, "ttl": 59, "time_ms": 33.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 16, "ttl": 59, "time_ms": 39.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 17, "ttl": 59, "time_ms": 38.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 18, "ttl": 59, "time_ms": 41.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 19, "ttl": 59, "time_ms": 32.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:2d::323", "icmp_seq": 20, "ttl": 59, "time_ms": 38.4, "duplicate": false}]}
|
26
tests/fixtures/centos-7.7/ping6-hostname-O-p.out
vendored
Normal file
26
tests/fixtures/centos-7.7/ping6-hostname-O-p.out
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
PATTERN: 0xabcd
|
||||||
|
PING www.cnn.com(2a04:4e42:2d::323 (2a04:4e42:2d::323)) 56 data bytes
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=1 ttl=59 time=30.9 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=2 ttl=59 time=39.0 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=3 ttl=59 time=32.6 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=4 ttl=59 time=38.4 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=5 ttl=59 time=38.8 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=6 ttl=59 time=42.6 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=7 ttl=59 time=30.7 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=8 ttl=59 time=39.4 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=9 ttl=59 time=39.3 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=10 ttl=59 time=38.9 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=11 ttl=59 time=38.6 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=12 ttl=59 time=38.2 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=13 ttl=59 time=39.6 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=14 ttl=59 time=37.4 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=15 ttl=59 time=33.7 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=16 ttl=59 time=39.4 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=17 ttl=59 time=38.9 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=18 ttl=59 time=41.3 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=19 ttl=59 time=32.2 ms
|
||||||
|
64 bytes from 2a04:4e42:2d::323 (2a04:4e42:2d::323): icmp_seq=20 ttl=59 time=38.4 ms
|
||||||
|
|
||||||
|
--- www.cnn.com ping statistics ---
|
||||||
|
20 packets transmitted, 20 received, 0% packet loss, time 19164ms
|
||||||
|
rtt min/avg/max/mdev = 30.757/37.455/42.652/3.338 ms
|
1
tests/fixtures/centos-7.7/ping6-ip-O-D-p.json
vendored
Normal file
1
tests/fixtures/centos-7.7/ping6-ip-O-D-p.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "2a04:4e42:600::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "2a04:4e42:600::323", "packets_transmitted": 20, "packets_received": 19, "packet_loss_percent": 5.0, "duplicates": 0, "time_ms": 19074.0, "round_trip_ms_min": 28.15, "round_trip_ms_avg": 33.534, "round_trip_ms_max": 39.843, "round_trip_ms_stddev": 3.489, "responses": [{"type": "reply", "timestamp": 1594976827.240914, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 1, "ttl": 59, "time_ms": 28.7, "duplicate": false}, {"type": "reply", "timestamp": 1594976828.25493, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 2, "ttl": 59, "time_ms": 37.2, "duplicate": false}, {"type": "reply", "timestamp": 1594976829.252877, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 3, "ttl": 59, "time_ms": 29.7, "duplicate": false}, {"type": "reply", "timestamp": 1594976830.262654, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 4, "ttl": 59, "time_ms": 37.7, "duplicate": false}, {"type": "reply", "timestamp": 1594976831.265626, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 5, "ttl": 59, "time_ms": 34.8, "duplicate": false}, {"type": "reply", "timestamp": 1594976832.269834, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 6, "ttl": 59, "time_ms": 35.6, "duplicate": false}, {"type": "reply", "timestamp": 1594976833.268059, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 7, "ttl": 59, "time_ms": 28.4, "duplicate": false}, {"type": "reply", "timestamp": 1594976834.274292, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 8, "ttl": 59, "time_ms": 28.1, "duplicate": false}, {"type": "reply", "timestamp": 1594976835.287123, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 9, "ttl": 59, "time_ms": 34.9, "duplicate": false}, {"type": "reply", "timestamp": 1594976836.287707, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 10, "ttl": 59, "time_ms": 34.4, "duplicate": false}, {"type": "reply", "timestamp": 1594976837.290589, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 11, "ttl": 59, "time_ms": 35.2, "duplicate": false}, {"type": "reply", "timestamp": 1594976838.293514, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 12, "ttl": 59, "time_ms": 35.4, "duplicate": false}, {"type": "reply", "timestamp": 1594976839.290914, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 13, "ttl": 59, "time_ms": 29.8, "duplicate": false}, {"type": "reply", "timestamp": 1594976840.292897, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 14, "ttl": 59, "time_ms": 28.5, "duplicate": false}, {"type": "timeout", "timestamp": 1594976842.269238, "icmp_seq": 15}, {"type": "reply", "timestamp": 1594976842.30145, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 16, "ttl": 59, "time_ms": 31.8, "duplicate": false}, {"type": "reply", "timestamp": 1594976843.312998, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 17, "ttl": 59, "time_ms": 39.8, "duplicate": false}, {"type": "reply", "timestamp": 1594976844.314228, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 18, "ttl": 59, "time_ms": 35.7, "duplicate": false}, {"type": "reply", "timestamp": 1594976845.315518, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 19, "ttl": 59, "time_ms": 35.1, "duplicate": false}, {"type": "reply", "timestamp": 1594976846.321706, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 20, "ttl": 59, "time_ms": 35.4, "duplicate": false}]}
|
26
tests/fixtures/centos-7.7/ping6-ip-O-D-p.out
vendored
Normal file
26
tests/fixtures/centos-7.7/ping6-ip-O-D-p.out
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
PATTERN: 0xabcd
|
||||||
|
PING 2a04:4e42:600::323(2a04:4e42:600::323) 56 data bytes
|
||||||
|
[1594976827.240914] 64 bytes from 2a04:4e42:600::323: icmp_seq=1 ttl=59 time=28.7 ms
|
||||||
|
[1594976828.254930] 64 bytes from 2a04:4e42:600::323: icmp_seq=2 ttl=59 time=37.2 ms
|
||||||
|
[1594976829.252877] 64 bytes from 2a04:4e42:600::323: icmp_seq=3 ttl=59 time=29.7 ms
|
||||||
|
[1594976830.262654] 64 bytes from 2a04:4e42:600::323: icmp_seq=4 ttl=59 time=37.7 ms
|
||||||
|
[1594976831.265626] 64 bytes from 2a04:4e42:600::323: icmp_seq=5 ttl=59 time=34.8 ms
|
||||||
|
[1594976832.269834] 64 bytes from 2a04:4e42:600::323: icmp_seq=6 ttl=59 time=35.6 ms
|
||||||
|
[1594976833.268059] 64 bytes from 2a04:4e42:600::323: icmp_seq=7 ttl=59 time=28.4 ms
|
||||||
|
[1594976834.274292] 64 bytes from 2a04:4e42:600::323: icmp_seq=8 ttl=59 time=28.1 ms
|
||||||
|
[1594976835.287123] 64 bytes from 2a04:4e42:600::323: icmp_seq=9 ttl=59 time=34.9 ms
|
||||||
|
[1594976836.287707] 64 bytes from 2a04:4e42:600::323: icmp_seq=10 ttl=59 time=34.4 ms
|
||||||
|
[1594976837.290589] 64 bytes from 2a04:4e42:600::323: icmp_seq=11 ttl=59 time=35.2 ms
|
||||||
|
[1594976838.293514] 64 bytes from 2a04:4e42:600::323: icmp_seq=12 ttl=59 time=35.4 ms
|
||||||
|
[1594976839.290914] 64 bytes from 2a04:4e42:600::323: icmp_seq=13 ttl=59 time=29.8 ms
|
||||||
|
[1594976840.292897] 64 bytes from 2a04:4e42:600::323: icmp_seq=14 ttl=59 time=28.5 ms
|
||||||
|
[1594976842.269238] no answer yet for icmp_seq=15
|
||||||
|
[1594976842.301450] 64 bytes from 2a04:4e42:600::323: icmp_seq=16 ttl=59 time=31.8 ms
|
||||||
|
[1594976843.312998] 64 bytes from 2a04:4e42:600::323: icmp_seq=17 ttl=59 time=39.8 ms
|
||||||
|
[1594976844.314228] 64 bytes from 2a04:4e42:600::323: icmp_seq=18 ttl=59 time=35.7 ms
|
||||||
|
[1594976845.315518] 64 bytes from 2a04:4e42:600::323: icmp_seq=19 ttl=59 time=35.1 ms
|
||||||
|
[1594976846.321706] 64 bytes from 2a04:4e42:600::323: icmp_seq=20 ttl=59 time=35.4 ms
|
||||||
|
|
||||||
|
--- 2a04:4e42:600::323 ping statistics ---
|
||||||
|
20 packets transmitted, 19 received, 5% packet loss, time 19074ms
|
||||||
|
rtt min/avg/max/mdev = 28.150/33.534/39.843/3.489 ms
|
1
tests/fixtures/centos-7.7/ping6-ip-O-p.json
vendored
Normal file
1
tests/fixtures/centos-7.7/ping6-ip-O-p.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "2a04:4e42:600::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "2a04:4e42:600::323", "packets_transmitted": 20, "packets_received": 19, "packet_loss_percent": 5.0, "duplicates": 0, "time_ms": 19067.0, "round_trip_ms_min": 27.064, "round_trip_ms_avg": 33.626, "round_trip_ms_max": 38.146, "round_trip_ms_stddev": 3.803, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 1, "ttl": 59, "time_ms": 27.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 2, "ttl": 59, "time_ms": 28.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 3, "ttl": 59, "time_ms": 36.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 4, "ttl": 59, "time_ms": 28.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 5, "ttl": 59, "time_ms": 35.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 6, "ttl": 59, "time_ms": 34.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 7, "ttl": 59, "time_ms": 30.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 8, "ttl": 59, "time_ms": 28.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 9, "ttl": 59, "time_ms": 36.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 10, "ttl": 59, "time_ms": 36.3, "duplicate": false}, {"type": "timeout", "timestamp": null, "icmp_seq": 11}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 12, "ttl": 59, "time_ms": 37.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 13, "ttl": 59, "time_ms": 30.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 14, "ttl": 59, "time_ms": 36.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 15, "ttl": 59, "time_ms": 35.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 16, "ttl": 59, "time_ms": 36.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 17, "ttl": 59, "time_ms": 37.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 18, "ttl": 59, "time_ms": 36.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 19, "ttl": 59, "time_ms": 27.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 20, "ttl": 59, "time_ms": 38.1, "duplicate": false}]}
|
26
tests/fixtures/centos-7.7/ping6-ip-O-p.out
vendored
Normal file
26
tests/fixtures/centos-7.7/ping6-ip-O-p.out
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
PATTERN: 0xabcd
|
||||||
|
PING 2a04:4e42:600::323(2a04:4e42:600::323) 56 data bytes
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=1 ttl=59 time=27.9 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=2 ttl=59 time=28.4 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=3 ttl=59 time=36.0 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=4 ttl=59 time=28.5 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=5 ttl=59 time=35.8 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=6 ttl=59 time=34.4 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=7 ttl=59 time=30.7 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=8 ttl=59 time=28.5 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=9 ttl=59 time=36.5 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=10 ttl=59 time=36.3 ms
|
||||||
|
no answer yet for icmp_seq=11
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=12 ttl=59 time=37.4 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=13 ttl=59 time=30.7 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=14 ttl=59 time=36.5 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=15 ttl=59 time=35.4 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=16 ttl=59 time=36.3 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=17 ttl=59 time=37.5 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=18 ttl=59 time=36.2 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=19 ttl=59 time=27.0 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=20 ttl=59 time=38.1 ms
|
||||||
|
|
||||||
|
--- 2a04:4e42:600::323 ping statistics ---
|
||||||
|
20 packets transmitted, 19 received, 5% packet loss, time 19067ms
|
||||||
|
rtt min/avg/max/mdev = 27.064/33.626/38.146/3.803 ms
|
1
tests/fixtures/centos-7.7/ping6-ip-dup.json
vendored
Normal file
1
tests/fixtures/centos-7.7/ping6-ip-dup.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "ff02::1%ens33", "data_bytes": 56, "pattern": null, "destination": "ff02::1%ens33", "packets_transmitted": 5, "packets_received": 5, "packet_loss_percent": 0.0, "duplicates": 4, "time_ms": 4017.0, "round_trip_ms_min": 0.245, "round_trip_ms_avg": 4.726, "round_trip_ms_max": 12.568, "round_trip_ms_stddev": 5.395, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::c48:5896:526d:81ba%ens33", "icmp_seq": 1, "ttl": 64, "time_ms": 0.245, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::feae:34ff:fea1:3a80%ens33", "icmp_seq": 1, "ttl": 64, "time_ms": 3.65, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::c48:5896:526d:81ba%ens33", "icmp_seq": 2, "ttl": 64, "time_ms": 0.329, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::feae:34ff:fea1:3a80%ens33", "icmp_seq": 2, "ttl": 64, "time_ms": 11.7, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::c48:5896:526d:81ba%ens33", "icmp_seq": 3, "ttl": 64, "time_ms": 0.592, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::feae:34ff:fea1:3a80%ens33", "icmp_seq": 3, "ttl": 64, "time_ms": 12.3, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::c48:5896:526d:81ba%ens33", "icmp_seq": 4, "ttl": 64, "time_ms": 0.51, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::feae:34ff:fea1:3a80%ens33", "icmp_seq": 4, "ttl": 64, "time_ms": 12.5, "duplicate": true}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "fe80::c48:5896:526d:81ba%ens33", "icmp_seq": 5, "ttl": 64, "time_ms": 0.538, "duplicate": false}]}
|
14
tests/fixtures/centos-7.7/ping6-ip-dup.out
vendored
Normal file
14
tests/fixtures/centos-7.7/ping6-ip-dup.out
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
PING ff02::1%ens33(ff02::1%ens33) 56 data bytes
|
||||||
|
64 bytes from fe80::c48:5896:526d:81ba%ens33: icmp_seq=1 ttl=64 time=0.245 ms
|
||||||
|
64 bytes from fe80::feae:34ff:fea1:3a80%ens33: icmp_seq=1 ttl=64 time=3.65 ms (DUP!)
|
||||||
|
64 bytes from fe80::c48:5896:526d:81ba%ens33: icmp_seq=2 ttl=64 time=0.329 ms
|
||||||
|
64 bytes from fe80::feae:34ff:fea1:3a80%ens33: icmp_seq=2 ttl=64 time=11.7 ms (DUP!)
|
||||||
|
64 bytes from fe80::c48:5896:526d:81ba%ens33: icmp_seq=3 ttl=64 time=0.592 ms
|
||||||
|
64 bytes from fe80::feae:34ff:fea1:3a80%ens33: icmp_seq=3 ttl=64 time=12.3 ms (DUP!)
|
||||||
|
64 bytes from fe80::c48:5896:526d:81ba%ens33: icmp_seq=4 ttl=64 time=0.510 ms
|
||||||
|
64 bytes from fe80::feae:34ff:fea1:3a80%ens33: icmp_seq=4 ttl=64 time=12.5 ms (DUP!)
|
||||||
|
64 bytes from fe80::c48:5896:526d:81ba%ens33: icmp_seq=5 ttl=64 time=0.538 ms
|
||||||
|
|
||||||
|
--- ff02::1%ens33 ping statistics ---
|
||||||
|
5 packets transmitted, 5 received, +4 duplicates, 0% packet loss, time 4017ms
|
||||||
|
rtt min/avg/max/mdev = 0.245/4.726/12.568/5.395 ms
|
1
tests/fixtures/centos-7.7/tracepath.json
vendored
Normal file
1
tests/fixtures/centos-7.7/tracepath.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"pmtu": 1500, "forward_hops": null, "return_hops": null, "hops": [{"ttl": 1, "guess": true, "host": "[LOCALHOST]", "reply_ms": null, "pmtu": 1500, "asymmetric_difference": null, "reached": false}, {"ttl": 1, "guess": false, "host": "dsldevice.attlocal.net", "reply_ms": 4.063, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 1, "guess": false, "host": "dsldevice.attlocal.net", "reply_ms": 6.368, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 2, "guess": false, "host": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "reply_ms": 24.092, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 3, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 4, "guess": false, "host": "12.242.117.16", "reply_ms": 161.527, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 5, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 6, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 3, "guess": false, "host": "71.148.149.0", "reply_ms": 12000.559, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 3, "guess": false, "host": "71.148.149.0", "reply_ms": 11967.523, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 3, "guess": false, "host": "71.148.149.0", "reply_ms": 11829.634, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 10, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 11, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 12, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 13, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 14, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 15, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 16, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 17, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 18, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 19, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 20, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 21, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 22, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 23, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 24, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 25, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 26, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 27, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 28, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 29, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 30, "guess": false, "host": null, "reply_ms": null, "pmtu": null, "asymmetric_difference": null, "reached": false}]}
|
34
tests/fixtures/centos-7.7/tracepath.out
vendored
Normal file
34
tests/fixtures/centos-7.7/tracepath.out
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
1?: [LOCALHOST] pmtu 1500
|
||||||
|
1: dsldevice.attlocal.net 4.063ms
|
||||||
|
1: dsldevice.attlocal.net 6.368ms
|
||||||
|
2: 76-220-24-1.lightspeed.sntcca.sbcglobal.net 24.092ms
|
||||||
|
3: no reply
|
||||||
|
4: 12.242.117.16 161.527ms
|
||||||
|
5: no reply
|
||||||
|
6: no reply
|
||||||
|
3: 71.148.149.0 12000.559ms
|
||||||
|
3: 71.148.149.0 11967.523ms
|
||||||
|
3: 71.148.149.0 11829.634ms
|
||||||
|
10: no reply
|
||||||
|
11: no reply
|
||||||
|
12: no reply
|
||||||
|
13: no reply
|
||||||
|
14: no reply
|
||||||
|
15: no reply
|
||||||
|
16: no reply
|
||||||
|
17: no reply
|
||||||
|
18: no reply
|
||||||
|
19: no reply
|
||||||
|
20: no reply
|
||||||
|
21: no reply
|
||||||
|
22: no reply
|
||||||
|
23: no reply
|
||||||
|
24: no reply
|
||||||
|
25: no reply
|
||||||
|
26: no reply
|
||||||
|
27: no reply
|
||||||
|
28: no reply
|
||||||
|
29: no reply
|
||||||
|
30: no reply
|
||||||
|
Too many hops: pmtu 1500
|
||||||
|
Resume: pmtu 1500
|
1
tests/fixtures/centos-7.7/tracepath6.json
vendored
Normal file
1
tests/fixtures/centos-7.7/tracepath6.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"pmtu": 1480, "forward_hops": 2, "return_hops": 2, "hops": [{"ttl": 1, "guess": true, "host": "[LOCALHOST]", "reply_ms": null, "pmtu": 1500, "asymmetric_difference": null, "reached": false}, {"ttl": 1, "guess": false, "host": "dust.inr.ac.ru", "reply_ms": 0.411, "pmtu": null, "asymmetric_difference": null, "reached": false}, {"ttl": 2, "guess": false, "host": "dust.inr.ac.ru", "reply_ms": 0.39, "pmtu": 1480, "asymmetric_difference": 1, "reached": false}, {"ttl": 2, "guess": false, "host": "3ffe:2400:0:109::2", "reply_ms": 463.514, "pmtu": null, "asymmetric_difference": null, "reached": true}]}
|
5
tests/fixtures/centos-7.7/tracepath6.out
vendored
Normal file
5
tests/fixtures/centos-7.7/tracepath6.out
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
1?: [LOCALHOST] pmtu 1500
|
||||||
|
1: dust.inr.ac.ru 0.411ms
|
||||||
|
2: dust.inr.ac.ru asymm 1 0.390ms pmtu 1480
|
||||||
|
2: 3ffe:2400:0:109::2 463.514ms reached
|
||||||
|
Resume: pmtu 1480 hops 2 back 2
|
1
tests/fixtures/centos-7.7/traceroute.json
vendored
Normal file
1
tests/fixtures/centos-7.7/traceroute.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "151.101.197.67", "destination_name": "www.cnn.com", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice.attlocal.net", "rtt": 4.024}, {"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice.attlocal.net", "rtt": 3.683}, {"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice.attlocal.net", "rtt": 3.706}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 24.038}, {"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 23.911}, {"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 23.724}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 4, "probes": [{"annotation": null, "asn": null, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 42.273}, {"annotation": null, "asn": null, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 42.213}, {"annotation": null, "asn": null, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 42.083}]}, {"hop": 5, "probes": [{"annotation": null, "asn": null, "ip": "12.122.2.77", "name": "12.122.2.77", "rtt": 36.789}, {"annotation": null, "asn": null, "ip": "12.122.2.77", "name": "12.122.2.77", "rtt": 43.691}, {"annotation": null, "asn": null, "ip": "12.122.2.77", "name": "12.122.2.77", "rtt": 36.597}]}, {"hop": 6, "probes": [{"annotation": null, "asn": null, "ip": "12.122.2.94", "name": "sd2ca21crs.ip.att.net", "rtt": 41.587}, {"annotation": null, "asn": null, "ip": "12.122.2.94", "name": "sd2ca21crs.ip.att.net", "rtt": 40.24}, {"annotation": null, "asn": null, "ip": "12.122.2.94", "name": "sd2ca21crs.ip.att.net", "rtt": 44.659}]}, {"hop": 7, "probes": [{"annotation": null, "asn": null, "ip": "12.123.215.161", "name": "12.123.215.161", "rtt": 37.858}, {"annotation": null, "asn": null, "ip": "12.123.215.161", "name": "12.123.215.161", "rtt": 37.321}, {"annotation": null, "asn": null, "ip": "12.123.215.161", "name": "12.123.215.161", "rtt": 37.092}]}, {"hop": 8, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 9, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 10, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 11, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 12, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 13, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 14, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 15, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 16, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 17, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 18, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 19, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 20, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 21, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 22, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 23, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 24, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 25, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 26, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 27, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 28, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 29, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 30, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}]}
|
32
tests/fixtures/centos-7.7/traceroute.out
vendored
Normal file
32
tests/fixtures/centos-7.7/traceroute.out
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
traceroute to www.cnn.com (151.101.197.67), 30 hops max, 60 byte packets
|
||||||
|
1 dsldevice.attlocal.net (192.168.1.254) 4.024 ms 3.683 ms 3.706 ms
|
||||||
|
2 76-220-24-1.lightspeed.sntcca.sbcglobal.net (76.220.24.1) 24.038 ms 23.911 ms 23.724 ms
|
||||||
|
3 * * *
|
||||||
|
4 12.122.149.186 (12.122.149.186) 42.273 ms 42.213 ms 42.083 ms
|
||||||
|
5 12.122.2.77 (12.122.2.77) 36.789 ms 43.691 ms 36.597 ms
|
||||||
|
6 sd2ca21crs.ip.att.net (12.122.2.94) 41.587 ms 40.240 ms 44.659 ms
|
||||||
|
7 12.123.215.161 (12.123.215.161) 37.858 ms 37.321 ms 37.092 ms
|
||||||
|
8 * * *
|
||||||
|
9 * * *
|
||||||
|
10 * * *
|
||||||
|
11 * * *
|
||||||
|
12 * * *
|
||||||
|
13 * * *
|
||||||
|
14 * * *
|
||||||
|
15 * * *
|
||||||
|
16 * * *
|
||||||
|
17 * * *
|
||||||
|
18 * * *
|
||||||
|
19 * * *
|
||||||
|
20 * * *
|
||||||
|
21 * * *
|
||||||
|
22 * * *
|
||||||
|
23 * * *
|
||||||
|
24 * * *
|
||||||
|
25 * * *
|
||||||
|
26 * * *
|
||||||
|
27 * * *
|
||||||
|
28 * * *
|
||||||
|
29 * * *
|
||||||
|
30 * * *
|
||||||
|
|
28
tests/fixtures/create_fixtures.sh
vendored
28
tests/fixtures/create_fixtures.sh
vendored
@ -101,3 +101,31 @@ sudo lastb > lastb.out
|
|||||||
|
|
||||||
cat /etc/group > group.out
|
cat /etc/group > group.out
|
||||||
sudo cat /etc/gshadow > gshadow.out
|
sudo cat /etc/gshadow > gshadow.out
|
||||||
|
|
||||||
|
# linux:
|
||||||
|
ping -4 www.cnn.com -c 20 -O > ping-hostname-O.out
|
||||||
|
ping -4 www.cnn.com -c 20 -O -p abcd > ping-hostname-O-p.out
|
||||||
|
ping -4 www.cnn.com -c 20 -O -D -p abcd -s 1400 > ping-hostname-O-D-p-s.out
|
||||||
|
ping 127.0.0.1 -c 20 -O > ping-ip-O.out
|
||||||
|
ping 127.0.0.1 -c 20 -O -D > ping-ip-O-D.out
|
||||||
|
ping6 2a04:4e42:600::323 -c 20 -O -p abcd > ping6-ip-O-p.out
|
||||||
|
ping6 2a04:4e42:600::323 -c 20 -O -D -p abcd > ping6-ip-O-D-p.out
|
||||||
|
ping6 www.cnn.com -c 20 -O -D -p abcd -s 1400 > ping6-hostname-O-D-p-s.out
|
||||||
|
ping6 www.cnn.com -c 20 -O -D -p abcd > ping6-hostname-O-D-p.out
|
||||||
|
ping6 www.cnn.com -c 20 -O -p abcd > ping6-hostname-O-p.out
|
||||||
|
|
||||||
|
# osx/bsd:
|
||||||
|
ping -c 3 -s 40 127.0.0.1 > ping-ip-s.out
|
||||||
|
ping -c 3 -s 40 localhost > ping-hostname-s.out
|
||||||
|
ping -c 3 -p ff 127.0.0.1 > ping-ip-p.out
|
||||||
|
ping -c 3 127.0.0.1 > ping-ip.out
|
||||||
|
ping -c 3 -p ff cnn.com > ping-hostname-p.out
|
||||||
|
ping -c 3 cnn.com > ping-hostname.out
|
||||||
|
ping6 -c 3 -s 40 localhost > ping6-hostname-s.out
|
||||||
|
ping6 -c 3 -s 40 ::1 > ping6-ip-s.out
|
||||||
|
ping6 -c 3 -p ff ::1 > ping6-ip-p.out
|
||||||
|
ping6 -c 3 ::1 > ping6-ip.out
|
||||||
|
ping6 -c 3 -p ff localhost > ping6-hostname-p.out
|
||||||
|
ping6 -c 3 localhost > ping6-hostname.out
|
||||||
|
|
||||||
|
|
||||||
|
1
tests/fixtures/fedora32/ping-hostname-O-D-p-s.json
vendored
Normal file
1
tests/fixtures/fedora32/ping-hostname-O-D-p-s.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "151.101.129.67", "data_bytes": 1400, "pattern": "0xabcd", "destination": "turner-tls.map.fastly.net", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19040.0, "round_trip_ms_min": 25.934, "round_trip_ms_avg": 43.176, "round_trip_ms_max": 149.271, "round_trip_ms_stddev": 26.937, "responses": [{"type": "reply", "timestamp": 1595191335.548399, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 1, "ttl": 59, "time_ms": 46.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191336.134174, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 2, "ttl": 59, "time_ms": 61.5, "duplicate": false}, {"type": "reply", "timestamp": 1595191337.101575, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 3, "ttl": 59, "time_ms": 26.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191338.108023, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 4, "ttl": 59, "time_ms": 30.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191339.229213, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 5, "ttl": 59, "time_ms": 149.0, "duplicate": false}, {"type": "reply", "timestamp": 1595191340.114026, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 6, "ttl": 59, "time_ms": 32.4, "duplicate": false}, {"type": "reply", "timestamp": 1595191341.122628, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 7, "ttl": 59, "time_ms": 37.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191342.110785, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 8, "ttl": 59, "time_ms": 26.0, "duplicate": false}, {"type": "reply", "timestamp": 1595191343.118652, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 9, "ttl": 59, "time_ms": 32.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191344.1303, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 10, "ttl": 59, "time_ms": 43.4, "duplicate": false}, {"type": "reply", "timestamp": 1595191345.162284, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 11, "ttl": 59, "time_ms": 71.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191346.123086, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 12, "ttl": 59, "time_ms": 31.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191347.127689, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 13, "ttl": 59, "time_ms": 33.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191348.142817, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 14, "ttl": 59, "time_ms": 45.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191349.125383, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 15, "ttl": 59, "time_ms": 25.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191350.136294, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 16, "ttl": 59, "time_ms": 34.0, "duplicate": false}, {"type": "reply", "timestamp": 1595191351.135889, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 17, "ttl": 59, "time_ms": 31.2, "duplicate": false}, {"type": "reply", "timestamp": 1595191352.134199, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 18, "ttl": 59, "time_ms": 26.2, "duplicate": false}, {"type": "reply", "timestamp": 1595191353.147391, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 19, "ttl": 59, "time_ms": 38.5, "duplicate": false}, {"type": "reply", "timestamp": 1595191354.15064, "bytes": 1408, "response_ip": "151.101.129.67", "icmp_seq": 20, "ttl": 59, "time_ms": 39.5, "duplicate": false}]}
|
26
tests/fixtures/fedora32/ping-hostname-O-D-p-s.out
vendored
Normal file
26
tests/fixtures/fedora32/ping-hostname-O-D-p-s.out
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
PATTERN: 0xabcd
|
||||||
|
PING turner-tls.map.fastly.net (151.101.129.67) 1400(1428) bytes of data.
|
||||||
|
[1595191335.548399] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=1 ttl=59 time=46.1 ms
|
||||||
|
[1595191336.134174] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=2 ttl=59 time=61.5 ms
|
||||||
|
[1595191337.101575] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=3 ttl=59 time=26.3 ms
|
||||||
|
[1595191338.108023] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=4 ttl=59 time=30.9 ms
|
||||||
|
[1595191339.229213] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=5 ttl=59 time=149 ms
|
||||||
|
[1595191340.114026] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=6 ttl=59 time=32.4 ms
|
||||||
|
[1595191341.122628] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=7 ttl=59 time=37.9 ms
|
||||||
|
[1595191342.110785] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=8 ttl=59 time=26.0 ms
|
||||||
|
[1595191343.118652] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=9 ttl=59 time=32.3 ms
|
||||||
|
[1595191344.130300] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=10 ttl=59 time=43.4 ms
|
||||||
|
[1595191345.162284] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=11 ttl=59 time=71.9 ms
|
||||||
|
[1595191346.123086] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=12 ttl=59 time=31.1 ms
|
||||||
|
[1595191347.127689] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=13 ttl=59 time=33.6 ms
|
||||||
|
[1595191348.142817] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=14 ttl=59 time=45.6 ms
|
||||||
|
[1595191349.125383] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=15 ttl=59 time=25.9 ms
|
||||||
|
[1595191350.136294] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=16 ttl=59 time=34.0 ms
|
||||||
|
[1595191351.135889] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=17 ttl=59 time=31.2 ms
|
||||||
|
[1595191352.134199] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=18 ttl=59 time=26.2 ms
|
||||||
|
[1595191353.147391] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=19 ttl=59 time=38.5 ms
|
||||||
|
[1595191354.150640] 1408 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=20 ttl=59 time=39.5 ms
|
||||||
|
|
||||||
|
--- turner-tls.map.fastly.net ping statistics ---
|
||||||
|
20 packets transmitted, 20 received, 0% packet loss, time 19040ms
|
||||||
|
rtt min/avg/max/mdev = 25.934/43.176/149.271/26.937 ms
|
1
tests/fixtures/fedora32/ping-hostname-O-p.json
vendored
Normal file
1
tests/fixtures/fedora32/ping-hostname-O-p.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "151.101.197.67", "data_bytes": 56, "pattern": "0xabcd", "destination": "turner-tls.map.fastly.net", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19026.0, "round_trip_ms_min": 37.406, "round_trip_ms_avg": 44.894, "round_trip_ms_max": 57.881, "round_trip_ms_stddev": 6.101, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 1, "ttl": 56, "time_ms": 38.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 2, "ttl": 56, "time_ms": 38.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 3, "ttl": 56, "time_ms": 39.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 4, "ttl": 56, "time_ms": 49.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 5, "ttl": 56, "time_ms": 47.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 6, "ttl": 56, "time_ms": 48.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 7, "ttl": 56, "time_ms": 53.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 8, "ttl": 56, "time_ms": 47.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 9, "ttl": 56, "time_ms": 47.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 10, "ttl": 56, "time_ms": 51.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 11, "ttl": 56, "time_ms": 55.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 12, "ttl": 56, "time_ms": 40.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 13, "ttl": 56, "time_ms": 39.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 14, "ttl": 56, "time_ms": 40.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 15, "ttl": 56, "time_ms": 41.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 16, "ttl": 56, "time_ms": 57.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 17, "ttl": 56, "time_ms": 45.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 18, "ttl": 56, "time_ms": 39.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 19, "ttl": 56, "time_ms": 37.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.197.67", "icmp_seq": 20, "ttl": 56, "time_ms": 40.4, "duplicate": false}]}
|
26
tests/fixtures/fedora32/ping-hostname-O-p.out
vendored
Normal file
26
tests/fixtures/fedora32/ping-hostname-O-p.out
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
PATTERN: 0xabcd
|
||||||
|
PING turner-tls.map.fastly.net (151.101.197.67) 56(84) bytes of data.
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=1 ttl=56 time=38.2 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=2 ttl=56 time=38.5 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=3 ttl=56 time=39.3 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=4 ttl=56 time=49.2 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=5 ttl=56 time=47.4 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=6 ttl=56 time=48.2 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=7 ttl=56 time=53.4 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=8 ttl=56 time=47.1 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=9 ttl=56 time=47.3 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=10 ttl=56 time=51.8 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=11 ttl=56 time=55.1 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=12 ttl=56 time=40.6 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=13 ttl=56 time=39.5 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=14 ttl=56 time=40.1 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=15 ttl=56 time=41.4 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=16 ttl=56 time=57.9 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=17 ttl=56 time=45.7 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=18 ttl=56 time=39.3 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=19 ttl=56 time=37.4 ms
|
||||||
|
64 bytes from 151.101.197.67 (151.101.197.67): icmp_seq=20 ttl=56 time=40.4 ms
|
||||||
|
|
||||||
|
--- turner-tls.map.fastly.net ping statistics ---
|
||||||
|
20 packets transmitted, 20 received, 0% packet loss, time 19026ms
|
||||||
|
rtt min/avg/max/mdev = 37.406/44.894/57.881/6.101 ms
|
1
tests/fixtures/fedora32/ping-hostname-O.json
vendored
Normal file
1
tests/fixtures/fedora32/ping-hostname-O.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "151.101.129.67", "data_bytes": 56, "pattern": null, "destination": "turner-tls.map.fastly.net", "packets_transmitted": 20, "packets_received": 19, "packet_loss_percent": 5.0, "duplicates": 0, "time_ms": 19075.0, "round_trip_ms_min": 24.317, "round_trip_ms_avg": 61.577, "round_trip_ms_max": 274.537, "round_trip_ms_stddev": 69.94, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 1, "ttl": 59, "time_ms": 27.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 2, "ttl": 59, "time_ms": 31.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 3, "ttl": 59, "time_ms": 25.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 4, "ttl": 59, "time_ms": 65.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 5, "ttl": 59, "time_ms": 32.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 6, "ttl": 59, "time_ms": 32.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 7, "ttl": 59, "time_ms": 156.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 8, "ttl": 59, "time_ms": 216.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 9, "ttl": 59, "time_ms": 275.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 10, "ttl": 59, "time_ms": 25.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 11, "ttl": 59, "time_ms": 29.5, "duplicate": false}, {"type": "timeout", "timestamp": null, "icmp_seq": 12}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 13, "ttl": 59, "time_ms": 25.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 14, "ttl": 59, "time_ms": 33.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 15, "ttl": 59, "time_ms": 24.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 16, "ttl": 59, "time_ms": 35.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 17, "ttl": 59, "time_ms": 24.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 18, "ttl": 59, "time_ms": 34.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 19, "ttl": 59, "time_ms": 30.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "151.101.129.67", "icmp_seq": 20, "ttl": 59, "time_ms": 45.8, "duplicate": false}]}
|
25
tests/fixtures/fedora32/ping-hostname-O.out
vendored
Normal file
25
tests/fixtures/fedora32/ping-hostname-O.out
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
PING turner-tls.map.fastly.net (151.101.129.67) 56(84) bytes of data.
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=1 ttl=59 time=27.5 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=2 ttl=59 time=31.5 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=3 ttl=59 time=25.5 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=4 ttl=59 time=65.1 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=5 ttl=59 time=32.4 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=6 ttl=59 time=32.2 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=7 ttl=59 time=156 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=8 ttl=59 time=216 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=9 ttl=59 time=275 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=10 ttl=59 time=25.7 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=11 ttl=59 time=29.5 ms
|
||||||
|
no answer yet for icmp_seq=12
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=13 ttl=59 time=25.9 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=14 ttl=59 time=33.0 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=15 ttl=59 time=24.3 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=16 ttl=59 time=35.8 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=17 ttl=59 time=24.8 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=18 ttl=59 time=34.0 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=19 ttl=59 time=30.7 ms
|
||||||
|
64 bytes from 151.101.129.67 (151.101.129.67): icmp_seq=20 ttl=59 time=45.8 ms
|
||||||
|
|
||||||
|
--- turner-tls.map.fastly.net ping statistics ---
|
||||||
|
20 packets transmitted, 19 received, 5% packet loss, time 19075ms
|
||||||
|
rtt min/avg/max/mdev = 24.317/61.577/274.537/69.940 ms
|
1
tests/fixtures/fedora32/ping-ip-O-D.json
vendored
Normal file
1
tests/fixtures/fedora32/ping-ip-O-D.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "127.0.0.1", "data_bytes": 56, "pattern": null, "destination": "127.0.0.1", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19450.0, "round_trip_ms_min": 0.043, "round_trip_ms_avg": 0.086, "round_trip_ms_max": 0.135, "round_trip_ms_stddev": 0.016, "responses": [{"type": "reply", "timestamp": 1595191373.643436, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": 1595191374.662543, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.083, "duplicate": false}, {"type": "reply", "timestamp": 1595191375.685291, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 3, "ttl": 64, "time_ms": 0.091, "duplicate": false}, {"type": "reply", "timestamp": 1595191376.709678, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 4, "ttl": 64, "time_ms": 0.092, "duplicate": false}, {"type": "reply", "timestamp": 1595191377.734105, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 5, "ttl": 64, "time_ms": 0.09, "duplicate": false}, {"type": "reply", "timestamp": 1595191378.758107, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 6, "ttl": 64, "time_ms": 0.089, "duplicate": false}, {"type": "reply", "timestamp": 1595191379.781215, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 7, "ttl": 64, "time_ms": 0.087, "duplicate": false}, {"type": "reply", "timestamp": 1595191380.80601, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 8, "ttl": 64, "time_ms": 0.092, "duplicate": false}, {"type": "reply", "timestamp": 1595191381.829806, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 9, "ttl": 64, "time_ms": 0.088, "duplicate": false}, {"type": "reply", "timestamp": 1595191382.853166, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 10, "ttl": 64, "time_ms": 0.135, "duplicate": false}, {"type": "reply", "timestamp": 1595191383.876966, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 11, "ttl": 64, "time_ms": 0.101, "duplicate": false}, {"type": "reply", "timestamp": 1595191384.900636, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 12, "ttl": 64, "time_ms": 0.084, "duplicate": false}, {"type": "reply", "timestamp": 1595191385.925055, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 13, "ttl": 64, "time_ms": 0.071, "duplicate": false}, {"type": "reply", "timestamp": 1595191386.94986, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 14, "ttl": 64, "time_ms": 0.087, "duplicate": false}, {"type": "reply", "timestamp": 1595191387.973041, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 15, "ttl": 64, "time_ms": 0.087, "duplicate": false}, {"type": "reply", "timestamp": 1595191388.997049, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 16, "ttl": 64, "time_ms": 0.073, "duplicate": false}, {"type": "reply", "timestamp": 1595191390.021265, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 17, "ttl": 64, "time_ms": 0.074, "duplicate": false}, {"type": "reply", "timestamp": 1595191391.044904, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 18, "ttl": 64, "time_ms": 0.089, "duplicate": false}, {"type": "reply", "timestamp": 1595191392.069285, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 19, "ttl": 64, "time_ms": 0.09, "duplicate": false}, {"type": "reply", "timestamp": 1595191393.093307, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 20, "ttl": 64, "time_ms": 0.084, "duplicate": false}]}
|
25
tests/fixtures/fedora32/ping-ip-O-D.out
vendored
Normal file
25
tests/fixtures/fedora32/ping-ip-O-D.out
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
|
||||||
|
[1595191373.643436] 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.043 ms
|
||||||
|
[1595191374.662543] 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.083 ms
|
||||||
|
[1595191375.685291] 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.091 ms
|
||||||
|
[1595191376.709678] 64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.092 ms
|
||||||
|
[1595191377.734105] 64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.090 ms
|
||||||
|
[1595191378.758107] 64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.089 ms
|
||||||
|
[1595191379.781215] 64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.087 ms
|
||||||
|
[1595191380.806010] 64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.092 ms
|
||||||
|
[1595191381.829806] 64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.088 ms
|
||||||
|
[1595191382.853166] 64 bytes from 127.0.0.1: icmp_seq=10 ttl=64 time=0.135 ms
|
||||||
|
[1595191383.876966] 64 bytes from 127.0.0.1: icmp_seq=11 ttl=64 time=0.101 ms
|
||||||
|
[1595191384.900636] 64 bytes from 127.0.0.1: icmp_seq=12 ttl=64 time=0.084 ms
|
||||||
|
[1595191385.925055] 64 bytes from 127.0.0.1: icmp_seq=13 ttl=64 time=0.071 ms
|
||||||
|
[1595191386.949860] 64 bytes from 127.0.0.1: icmp_seq=14 ttl=64 time=0.087 ms
|
||||||
|
[1595191387.973041] 64 bytes from 127.0.0.1: icmp_seq=15 ttl=64 time=0.087 ms
|
||||||
|
[1595191388.997049] 64 bytes from 127.0.0.1: icmp_seq=16 ttl=64 time=0.073 ms
|
||||||
|
[1595191390.021265] 64 bytes from 127.0.0.1: icmp_seq=17 ttl=64 time=0.074 ms
|
||||||
|
[1595191391.044904] 64 bytes from 127.0.0.1: icmp_seq=18 ttl=64 time=0.089 ms
|
||||||
|
[1595191392.069285] 64 bytes from 127.0.0.1: icmp_seq=19 ttl=64 time=0.090 ms
|
||||||
|
[1595191393.093307] 64 bytes from 127.0.0.1: icmp_seq=20 ttl=64 time=0.084 ms
|
||||||
|
|
||||||
|
--- 127.0.0.1 ping statistics ---
|
||||||
|
20 packets transmitted, 20 received, 0% packet loss, time 19450ms
|
||||||
|
rtt min/avg/max/mdev = 0.043/0.086/0.135/0.016 ms
|
1
tests/fixtures/fedora32/ping-ip-O.json
vendored
Normal file
1
tests/fixtures/fedora32/ping-ip-O.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "127.0.0.1", "data_bytes": 56, "pattern": null, "destination": "127.0.0.1", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19480.0, "round_trip_ms_min": 0.043, "round_trip_ms_avg": 0.093, "round_trip_ms_max": 0.16, "round_trip_ms_stddev": 0.025, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.043, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.07, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 3, "ttl": 64, "time_ms": 0.09, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 4, "ttl": 64, "time_ms": 0.093, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 5, "ttl": 64, "time_ms": 0.078, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 6, "ttl": 64, "time_ms": 0.16, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 7, "ttl": 64, "time_ms": 0.089, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 8, "ttl": 64, "time_ms": 0.155, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 9, "ttl": 64, "time_ms": 0.084, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 10, "ttl": 64, "time_ms": 0.111, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 11, "ttl": 64, "time_ms": 0.079, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 12, "ttl": 64, "time_ms": 0.103, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 13, "ttl": 64, "time_ms": 0.105, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 14, "ttl": 64, "time_ms": 0.087, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 15, "ttl": 64, "time_ms": 0.081, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 16, "ttl": 64, "time_ms": 0.089, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 17, "ttl": 64, "time_ms": 0.09, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 18, "ttl": 64, "time_ms": 0.089, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 19, "ttl": 64, "time_ms": 0.09, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 20, "ttl": 64, "time_ms": 0.092, "duplicate": false}]}
|
25
tests/fixtures/fedora32/ping-ip-O.out
vendored
Normal file
25
tests/fixtures/fedora32/ping-ip-O.out
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.043 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.070 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.090 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.093 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.078 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.160 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.089 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.155 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.084 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=10 ttl=64 time=0.111 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=11 ttl=64 time=0.079 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=12 ttl=64 time=0.103 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=13 ttl=64 time=0.105 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=14 ttl=64 time=0.087 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=15 ttl=64 time=0.081 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=16 ttl=64 time=0.089 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=17 ttl=64 time=0.090 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=18 ttl=64 time=0.089 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=19 ttl=64 time=0.090 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=20 ttl=64 time=0.092 ms
|
||||||
|
|
||||||
|
--- 127.0.0.1 ping statistics ---
|
||||||
|
20 packets transmitted, 20 received, 0% packet loss, time 19480ms
|
||||||
|
rtt min/avg/max/mdev = 0.043/0.093/0.160/0.025 ms
|
1
tests/fixtures/fedora32/ping6-hostname-O-D-p-s.json
vendored
Normal file
1
tests/fixtures/fedora32/ping6-hostname-O-D-p-s.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "2a04:4e42:200::323", "data_bytes": 1400, "pattern": "0xabcd", "destination": "www.cnn.com", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19042.0, "round_trip_ms_min": 30.757, "round_trip_ms_avg": 37.536, "round_trip_ms_max": 59.021, "round_trip_ms_stddev": 5.967, "responses": [{"type": "reply", "timestamp": 1595191433.391154, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 1, "ttl": 59, "time_ms": 34.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191434.063086, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 2, "ttl": 59, "time_ms": 37.2, "duplicate": false}, {"type": "reply", "timestamp": 1595191435.071905, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 3, "ttl": 59, "time_ms": 44.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191436.067128, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 4, "ttl": 59, "time_ms": 37.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191437.06455, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 5, "ttl": 59, "time_ms": 32.2, "duplicate": false}, {"type": "reply", "timestamp": 1595191438.06541, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 6, "ttl": 59, "time_ms": 30.8, "duplicate": false}, {"type": "reply", "timestamp": 1595191439.076718, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 7, "ttl": 59, "time_ms": 40.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191440.076357, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 8, "ttl": 59, "time_ms": 38.2, "duplicate": false}, {"type": "reply", "timestamp": 1595191441.079078, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 9, "ttl": 59, "time_ms": 39.0, "duplicate": false}, {"type": "reply", "timestamp": 1595191442.077537, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 10, "ttl": 59, "time_ms": 34.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191443.104345, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 11, "ttl": 59, "time_ms": 59.0, "duplicate": false}, {"type": "reply", "timestamp": 1595191444.083741, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 12, "ttl": 59, "time_ms": 36.8, "duplicate": false}, {"type": "reply", "timestamp": 1595191445.086748, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 13, "ttl": 59, "time_ms": 37.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191446.088958, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 14, "ttl": 59, "time_ms": 37.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191447.086122, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 15, "ttl": 59, "time_ms": 30.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191448.088312, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 16, "ttl": 59, "time_ms": 30.8, "duplicate": false}, {"type": "reply", "timestamp": 1595191449.098353, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 17, "ttl": 59, "time_ms": 38.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191450.09959, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 18, "ttl": 59, "time_ms": 38.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191451.10105, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 19, "ttl": 59, "time_ms": 37.8, "duplicate": false}, {"type": "reply", "timestamp": 1595191452.100239, "bytes": 1408, "response_ip": "2a04:4e42:200::323", "icmp_seq": 20, "ttl": 59, "time_ms": 35.0, "duplicate": false}]}
|
26
tests/fixtures/fedora32/ping6-hostname-O-D-p-s.out
vendored
Normal file
26
tests/fixtures/fedora32/ping6-hostname-O-D-p-s.out
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
PATTERN: 0xabcd
|
||||||
|
PING www.cnn.com(2a04:4e42:200::323 (2a04:4e42:200::323)) 1400 data bytes
|
||||||
|
[1595191433.391154] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=1 ttl=59 time=34.6 ms
|
||||||
|
[1595191434.063086] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=2 ttl=59 time=37.2 ms
|
||||||
|
[1595191435.071905] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=3 ttl=59 time=44.3 ms
|
||||||
|
[1595191436.067128] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=4 ttl=59 time=37.3 ms
|
||||||
|
[1595191437.064550] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=5 ttl=59 time=32.2 ms
|
||||||
|
[1595191438.065410] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=6 ttl=59 time=30.8 ms
|
||||||
|
[1595191439.076718] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=7 ttl=59 time=40.6 ms
|
||||||
|
[1595191440.076357] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=8 ttl=59 time=38.2 ms
|
||||||
|
[1595191441.079078] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=9 ttl=59 time=39.0 ms
|
||||||
|
[1595191442.077537] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=10 ttl=59 time=34.3 ms
|
||||||
|
[1595191443.104345] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=11 ttl=59 time=59.0 ms
|
||||||
|
[1595191444.083741] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=12 ttl=59 time=36.8 ms
|
||||||
|
[1595191445.086748] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=13 ttl=59 time=37.6 ms
|
||||||
|
[1595191446.088958] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=14 ttl=59 time=37.3 ms
|
||||||
|
[1595191447.086122] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=15 ttl=59 time=30.9 ms
|
||||||
|
[1595191448.088312] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=16 ttl=59 time=30.8 ms
|
||||||
|
[1595191449.098353] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=17 ttl=59 time=38.9 ms
|
||||||
|
[1595191450.099590] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=18 ttl=59 time=38.1 ms
|
||||||
|
[1595191451.101050] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=19 ttl=59 time=37.8 ms
|
||||||
|
[1595191452.100239] 1408 bytes from 2a04:4e42:200::323 (2a04:4e42:200::323): icmp_seq=20 ttl=59 time=35.0 ms
|
||||||
|
|
||||||
|
--- www.cnn.com ping statistics ---
|
||||||
|
20 packets transmitted, 20 received, 0% packet loss, time 19042ms
|
||||||
|
rtt min/avg/max/mdev = 30.757/37.536/59.021/5.967 ms
|
1
tests/fixtures/fedora32/ping6-hostname-O-D-p.json
vendored
Normal file
1
tests/fixtures/fedora32/ping6-hostname-O-D-p.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "2a04:4e42:2e::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "www.cnn.com", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19043.0, "round_trip_ms_min": 38.533, "round_trip_ms_avg": 44.877, "round_trip_ms_max": 51.366, "round_trip_ms_stddev": 3.83, "responses": [{"type": "reply", "timestamp": 1595191452.2553, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 1, "ttl": 56, "time_ms": 39.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191453.229184, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 2, "ttl": 56, "time_ms": 47.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191454.229065, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 3, "ttl": 56, "time_ms": 46.4, "duplicate": false}, {"type": "reply", "timestamp": 1595191455.230571, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 4, "ttl": 56, "time_ms": 45.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191456.233811, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 5, "ttl": 56, "time_ms": 45.7, "duplicate": false}, {"type": "reply", "timestamp": 1595191457.228052, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 6, "ttl": 56, "time_ms": 38.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191458.228764, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 7, "ttl": 56, "time_ms": 39.0, "duplicate": false}, {"type": "reply", "timestamp": 1595191459.243633, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 8, "ttl": 56, "time_ms": 51.4, "duplicate": false}, {"type": "reply", "timestamp": 1595191460.243509, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 9, "ttl": 56, "time_ms": 49.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191461.242713, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 10, "ttl": 56, "time_ms": 46.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191462.246016, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 11, "ttl": 56, "time_ms": 47.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191463.240552, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 12, "ttl": 56, "time_ms": 38.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191464.248594, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 13, "ttl": 56, "time_ms": 44.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191465.254128, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 14, "ttl": 56, "time_ms": 48.8, "duplicate": false}, {"type": "reply", "timestamp": 1595191466.253777, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 15, "ttl": 56, "time_ms": 45.2, "duplicate": false}, {"type": "reply", "timestamp": 1595191467.259039, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 16, "ttl": 56, "time_ms": 47.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191468.252991, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 17, "ttl": 56, "time_ms": 38.5, "duplicate": false}, {"type": "reply", "timestamp": 1595191469.263167, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 18, "ttl": 56, "time_ms": 47.0, "duplicate": false}, {"type": "reply", "timestamp": 1595191470.264838, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 19, "ttl": 56, "time_ms": 46.3, "duplicate": false}, {"type": "reply", "timestamp": 1595191471.266951, "bytes": 64, "response_ip": "2a04:4e42:2e::323", "icmp_seq": 20, "ttl": 56, "time_ms": 45.4, "duplicate": false}]}
|
26
tests/fixtures/fedora32/ping6-hostname-O-D-p.out
vendored
Normal file
26
tests/fixtures/fedora32/ping6-hostname-O-D-p.out
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
PATTERN: 0xabcd
|
||||||
|
PING www.cnn.com(2a04:4e42:2e::323 (2a04:4e42:2e::323)) 56 data bytes
|
||||||
|
[1595191452.255300] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=1 ttl=56 time=39.1 ms
|
||||||
|
[1595191453.229184] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=2 ttl=56 time=47.9 ms
|
||||||
|
[1595191454.229065] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=3 ttl=56 time=46.4 ms
|
||||||
|
[1595191455.230571] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=4 ttl=56 time=45.1 ms
|
||||||
|
[1595191456.233811] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=5 ttl=56 time=45.7 ms
|
||||||
|
[1595191457.228052] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=6 ttl=56 time=38.9 ms
|
||||||
|
[1595191458.228764] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=7 ttl=56 time=39.0 ms
|
||||||
|
[1595191459.243633] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=8 ttl=56 time=51.4 ms
|
||||||
|
[1595191460.243509] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=9 ttl=56 time=49.1 ms
|
||||||
|
[1595191461.242713] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=10 ttl=56 time=46.6 ms
|
||||||
|
[1595191462.246016] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=11 ttl=56 time=47.1 ms
|
||||||
|
[1595191463.240552] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=12 ttl=56 time=38.6 ms
|
||||||
|
[1595191464.248594] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=13 ttl=56 time=44.3 ms
|
||||||
|
[1595191465.254128] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=14 ttl=56 time=48.8 ms
|
||||||
|
[1595191466.253777] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=15 ttl=56 time=45.2 ms
|
||||||
|
[1595191467.259039] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=16 ttl=56 time=47.3 ms
|
||||||
|
[1595191468.252991] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=17 ttl=56 time=38.5 ms
|
||||||
|
[1595191469.263167] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=18 ttl=56 time=47.0 ms
|
||||||
|
[1595191470.264838] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=19 ttl=56 time=46.3 ms
|
||||||
|
[1595191471.266951] 64 bytes from 2a04:4e42:2e::323 (2a04:4e42:2e::323): icmp_seq=20 ttl=56 time=45.4 ms
|
||||||
|
|
||||||
|
--- www.cnn.com ping statistics ---
|
||||||
|
20 packets transmitted, 20 received, 0% packet loss, time 19043ms
|
||||||
|
rtt min/avg/max/mdev = 38.533/44.877/51.366/3.830 ms
|
1
tests/fixtures/fedora32/ping6-hostname-O-p.json
vendored
Normal file
1
tests/fixtures/fedora32/ping6-hostname-O-p.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "2a04:4e42:400::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "www.cnn.com", "packets_transmitted": 20, "packets_received": 19, "packet_loss_percent": 5.0, "duplicates": 0, "time_ms": 19049.0, "round_trip_ms_min": 23.598, "round_trip_ms_avg": 65.877, "round_trip_ms_max": 281.064, "round_trip_ms_stddev": 72.64, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 1, "ttl": 59, "time_ms": 24.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 2, "ttl": 59, "time_ms": 30.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 3, "ttl": 59, "time_ms": 23.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 4, "ttl": 59, "time_ms": 35.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 5, "ttl": 59, "time_ms": 32.3, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 6, "ttl": 59, "time_ms": 32.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 7, "ttl": 59, "time_ms": 26.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 8, "ttl": 59, "time_ms": 31.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 9, "ttl": 59, "time_ms": 33.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 10, "ttl": 59, "time_ms": 32.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 11, "ttl": 59, "time_ms": 31.0, "duplicate": false}, {"type": "timeout", "timestamp": null, "icmp_seq": 12}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 13, "ttl": 59, "time_ms": 31.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 14, "ttl": 59, "time_ms": 112.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 15, "ttl": 59, "time_ms": 162.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 16, "ttl": 59, "time_ms": 223.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 17, "ttl": 59, "time_ms": 281.0, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 18, "ttl": 59, "time_ms": 33.4, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 19, "ttl": 59, "time_ms": 32.7, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:400::323", "icmp_seq": 20, "ttl": 59, "time_ms": 42.3, "duplicate": false}]}
|
26
tests/fixtures/fedora32/ping6-hostname-O-p.out
vendored
Normal file
26
tests/fixtures/fedora32/ping6-hostname-O-p.out
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
PATTERN: 0xabcd
|
||||||
|
PING www.cnn.com(2a04:4e42:400::323 (2a04:4e42:400::323)) 56 data bytes
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=1 ttl=59 time=24.0 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=2 ttl=59 time=30.5 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=3 ttl=59 time=23.6 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=4 ttl=59 time=35.8 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=5 ttl=59 time=32.3 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=6 ttl=59 time=32.4 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=7 ttl=59 time=26.5 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=8 ttl=59 time=31.1 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=9 ttl=59 time=33.9 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=10 ttl=59 time=32.5 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=11 ttl=59 time=31.0 ms
|
||||||
|
no answer yet for icmp_seq=12
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=13 ttl=59 time=31.9 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=14 ttl=59 time=112 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=15 ttl=59 time=162 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=16 ttl=59 time=223 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=17 ttl=59 time=281 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=18 ttl=59 time=33.4 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=19 ttl=59 time=32.7 ms
|
||||||
|
64 bytes from 2a04:4e42:400::323 (2a04:4e42:400::323): icmp_seq=20 ttl=59 time=42.3 ms
|
||||||
|
|
||||||
|
--- www.cnn.com ping statistics ---
|
||||||
|
20 packets transmitted, 19 received, 5% packet loss, time 19049ms
|
||||||
|
rtt min/avg/max/mdev = 23.598/65.877/281.064/72.640 ms
|
1
tests/fixtures/fedora32/ping6-ip-O-D-p.json
vendored
Normal file
1
tests/fixtures/fedora32/ping6-ip-O-D-p.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "2a04:4e42:600::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "2a04:4e42:600::323", "packets_transmitted": 20, "packets_received": 20, "packet_loss_percent": 0.0, "duplicates": 0, "time_ms": 19042.0, "round_trip_ms_min": 27.88, "round_trip_ms_avg": 45.072, "round_trip_ms_max": 148.38, "round_trip_ms_stddev": 27.078, "responses": [{"type": "reply", "timestamp": 1595191413.333769, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 1, "ttl": 59, "time_ms": 34.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191414.342973, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 2, "ttl": 59, "time_ms": 41.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191415.332214, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 3, "ttl": 59, "time_ms": 28.8, "duplicate": false}, {"type": "reply", "timestamp": 1595191416.342603, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 4, "ttl": 59, "time_ms": 36.8, "duplicate": false}, {"type": "reply", "timestamp": 1595191417.344996, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 5, "ttl": 59, "time_ms": 37.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191418.348619, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 6, "ttl": 59, "time_ms": 37.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191419.357154, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 7, "ttl": 59, "time_ms": 44.4, "duplicate": false}, {"type": "reply", "timestamp": 1595191420.350087, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 8, "ttl": 59, "time_ms": 35.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191421.346691, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 9, "ttl": 59, "time_ms": 29.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191422.355843, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 10, "ttl": 59, "time_ms": 37.4, "duplicate": false}, {"type": "reply", "timestamp": 1595191423.397934, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 11, "ttl": 59, "time_ms": 76.7, "duplicate": false}, {"type": "reply", "timestamp": 1595191424.470798, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 12, "ttl": 59, "time_ms": 148.0, "duplicate": false}, {"type": "reply", "timestamp": 1595191425.358652, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 13, "ttl": 59, "time_ms": 33.6, "duplicate": false}, {"type": "reply", "timestamp": 1595191426.404587, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 14, "ttl": 59, "time_ms": 77.2, "duplicate": false}, {"type": "reply", "timestamp": 1595191427.359785, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 15, "ttl": 59, "time_ms": 29.7, "duplicate": false}, {"type": "reply", "timestamp": 1595191428.367539, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 16, "ttl": 59, "time_ms": 34.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191429.372551, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 17, "ttl": 59, "time_ms": 37.2, "duplicate": false}, {"type": "reply", "timestamp": 1595191430.364571, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 18, "ttl": 59, "time_ms": 27.9, "duplicate": false}, {"type": "reply", "timestamp": 1595191431.375232, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 19, "ttl": 59, "time_ms": 37.1, "duplicate": false}, {"type": "reply", "timestamp": 1595191432.375802, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 20, "ttl": 59, "time_ms": 34.3, "duplicate": false}]}
|
26
tests/fixtures/fedora32/ping6-ip-O-D-p.out
vendored
Normal file
26
tests/fixtures/fedora32/ping6-ip-O-D-p.out
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
PATTERN: 0xabcd
|
||||||
|
PING 2a04:4e42:600::323(2a04:4e42:600::323) 56 data bytes
|
||||||
|
[1595191413.333769] 64 bytes from 2a04:4e42:600::323: icmp_seq=1 ttl=59 time=34.6 ms
|
||||||
|
[1595191414.342973] 64 bytes from 2a04:4e42:600::323: icmp_seq=2 ttl=59 time=41.9 ms
|
||||||
|
[1595191415.332214] 64 bytes from 2a04:4e42:600::323: icmp_seq=3 ttl=59 time=28.8 ms
|
||||||
|
[1595191416.342603] 64 bytes from 2a04:4e42:600::323: icmp_seq=4 ttl=59 time=36.8 ms
|
||||||
|
[1595191417.344996] 64 bytes from 2a04:4e42:600::323: icmp_seq=5 ttl=59 time=37.6 ms
|
||||||
|
[1595191418.348619] 64 bytes from 2a04:4e42:600::323: icmp_seq=6 ttl=59 time=37.9 ms
|
||||||
|
[1595191419.357154] 64 bytes from 2a04:4e42:600::323: icmp_seq=7 ttl=59 time=44.4 ms
|
||||||
|
[1595191420.350087] 64 bytes from 2a04:4e42:600::323: icmp_seq=8 ttl=59 time=35.1 ms
|
||||||
|
[1595191421.346691] 64 bytes from 2a04:4e42:600::323: icmp_seq=9 ttl=59 time=29.9 ms
|
||||||
|
[1595191422.355843] 64 bytes from 2a04:4e42:600::323: icmp_seq=10 ttl=59 time=37.4 ms
|
||||||
|
[1595191423.397934] 64 bytes from 2a04:4e42:600::323: icmp_seq=11 ttl=59 time=76.7 ms
|
||||||
|
[1595191424.470798] 64 bytes from 2a04:4e42:600::323: icmp_seq=12 ttl=59 time=148 ms
|
||||||
|
[1595191425.358652] 64 bytes from 2a04:4e42:600::323: icmp_seq=13 ttl=59 time=33.6 ms
|
||||||
|
[1595191426.404587] 64 bytes from 2a04:4e42:600::323: icmp_seq=14 ttl=59 time=77.2 ms
|
||||||
|
[1595191427.359785] 64 bytes from 2a04:4e42:600::323: icmp_seq=15 ttl=59 time=29.7 ms
|
||||||
|
[1595191428.367539] 64 bytes from 2a04:4e42:600::323: icmp_seq=16 ttl=59 time=34.9 ms
|
||||||
|
[1595191429.372551] 64 bytes from 2a04:4e42:600::323: icmp_seq=17 ttl=59 time=37.2 ms
|
||||||
|
[1595191430.364571] 64 bytes from 2a04:4e42:600::323: icmp_seq=18 ttl=59 time=27.9 ms
|
||||||
|
[1595191431.375232] 64 bytes from 2a04:4e42:600::323: icmp_seq=19 ttl=59 time=37.1 ms
|
||||||
|
[1595191432.375802] 64 bytes from 2a04:4e42:600::323: icmp_seq=20 ttl=59 time=34.3 ms
|
||||||
|
|
||||||
|
--- 2a04:4e42:600::323 ping statistics ---
|
||||||
|
20 packets transmitted, 20 received, 0% packet loss, time 19042ms
|
||||||
|
rtt min/avg/max/mdev = 27.880/45.072/148.380/27.078 ms
|
1
tests/fixtures/fedora32/ping6-ip-O-p.json
vendored
Normal file
1
tests/fixtures/fedora32/ping6-ip-O-p.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "2a04:4e42:600::323", "data_bytes": 56, "pattern": "0xabcd", "destination": "2a04:4e42:600::323", "packets_transmitted": 20, "packets_received": 17, "packet_loss_percent": 15.0, "duplicates": 0, "time_ms": 19193.0, "round_trip_ms_min": 26.566, "round_trip_ms_avg": 33.623, "round_trip_ms_max": 43.945, "round_trip_ms_stddev": 5.029, "responses": [{"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 1, "ttl": 59, "time_ms": 34.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 2, "ttl": 59, "time_ms": 36.6, "duplicate": false}, {"type": "timeout", "timestamp": null, "icmp_seq": 3}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 4, "ttl": 59, "time_ms": 28.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 5, "ttl": 59, "time_ms": 36.8, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 6, "ttl": 59, "time_ms": 28.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 7, "ttl": 59, "time_ms": 39.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 8, "ttl": 59, "time_ms": 28.2, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 9, "ttl": 59, "time_ms": 28.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 10, "ttl": 59, "time_ms": 36.5, "duplicate": false}, {"type": "timeout", "timestamp": null, "icmp_seq": 11}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 12, "ttl": 59, "time_ms": 33.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 13, "ttl": 59, "time_ms": 28.1, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 14, "ttl": 59, "time_ms": 27.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 15, "ttl": 59, "time_ms": 36.0, "duplicate": false}, {"type": "timeout", "timestamp": null, "icmp_seq": 16}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 17, "ttl": 59, "time_ms": 26.6, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 18, "ttl": 59, "time_ms": 38.5, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 19, "ttl": 59, "time_ms": 43.9, "duplicate": false}, {"type": "reply", "timestamp": null, "bytes": 64, "response_ip": "2a04:4e42:600::323", "icmp_seq": 20, "ttl": 59, "time_ms": 37.9, "duplicate": false}]}
|
26
tests/fixtures/fedora32/ping6-ip-O-p.out
vendored
Normal file
26
tests/fixtures/fedora32/ping6-ip-O-p.out
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
PATTERN: 0xabcd
|
||||||
|
PING 2a04:4e42:600::323(2a04:4e42:600::323) 56 data bytes
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=1 ttl=59 time=34.9 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=2 ttl=59 time=36.6 ms
|
||||||
|
no answer yet for icmp_seq=3
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=4 ttl=59 time=28.9 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=5 ttl=59 time=36.8 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=6 ttl=59 time=28.9 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=7 ttl=59 time=39.5 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=8 ttl=59 time=28.2 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=9 ttl=59 time=28.9 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=10 ttl=59 time=36.5 ms
|
||||||
|
no answer yet for icmp_seq=11
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=12 ttl=59 time=33.9 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=13 ttl=59 time=28.1 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=14 ttl=59 time=27.6 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=15 ttl=59 time=36.0 ms
|
||||||
|
no answer yet for icmp_seq=16
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=17 ttl=59 time=26.6 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=18 ttl=59 time=38.5 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=19 ttl=59 time=43.9 ms
|
||||||
|
64 bytes from 2a04:4e42:600::323: icmp_seq=20 ttl=59 time=37.9 ms
|
||||||
|
|
||||||
|
--- 2a04:4e42:600::323 ping statistics ---
|
||||||
|
20 packets transmitted, 17 received, 15% packet loss, time 19193ms
|
||||||
|
rtt min/avg/max/mdev = 26.566/33.623/43.945/5.029 ms
|
1
tests/fixtures/freebsd12/ping-hostname-p.json
vendored
Normal file
1
tests/fixtures/freebsd12/ping-hostname-p.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "151.101.1.67", "data_bytes": 56, "pattern": "0xff", "destination": "cnn.com", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 28.389, "round_trip_ms_avg": 31.745, "round_trip_ms_max": 34.505, "round_trip_ms_stddev": 2.532, "responses": [{"type": "reply", "bytes": 64, "response_ip": "151.101.1.67", "icmp_seq": 0, "ttl": 59, "time_ms": 32.34, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "151.101.1.67", "icmp_seq": 1, "ttl": 59, "time_ms": 34.505, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "151.101.1.67", "icmp_seq": 2, "ttl": 59, "time_ms": 28.389, "duplicate": false}]}
|
9
tests/fixtures/freebsd12/ping-hostname-p.out
vendored
Normal file
9
tests/fixtures/freebsd12/ping-hostname-p.out
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
PATTERN: 0xff
|
||||||
|
PING cnn.com (151.101.1.67): 56 data bytes
|
||||||
|
64 bytes from 151.101.1.67: icmp_seq=0 ttl=59 time=32.340 ms
|
||||||
|
64 bytes from 151.101.1.67: icmp_seq=1 ttl=59 time=34.505 ms
|
||||||
|
64 bytes from 151.101.1.67: icmp_seq=2 ttl=59 time=28.389 ms
|
||||||
|
|
||||||
|
--- cnn.com ping statistics ---
|
||||||
|
3 packets transmitted, 3 packets received, 0.0% packet loss
|
||||||
|
round-trip min/avg/max/stddev = 28.389/31.745/34.505/2.532 ms
|
1
tests/fixtures/freebsd12/ping-hostname-s.json
vendored
Normal file
1
tests/fixtures/freebsd12/ping-hostname-s.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "127.0.0.1", "data_bytes": 40, "pattern": null, "destination": "localhost", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.022, "round_trip_ms_avg": 0.03, "round_trip_ms_max": 0.038, "round_trip_ms_stddev": 0.006, "responses": [{"type": "reply", "bytes": 48, "response_ip": "127.0.0.1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.022, "duplicate": false}, {"type": "reply", "bytes": 48, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.038, "duplicate": false}, {"type": "reply", "bytes": 48, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.03, "duplicate": false}]}
|
8
tests/fixtures/freebsd12/ping-hostname-s.out
vendored
Normal file
8
tests/fixtures/freebsd12/ping-hostname-s.out
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
PING localhost (127.0.0.1): 40 data bytes
|
||||||
|
48 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.022 ms
|
||||||
|
48 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.038 ms
|
||||||
|
48 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.030 ms
|
||||||
|
|
||||||
|
--- localhost ping statistics ---
|
||||||
|
3 packets transmitted, 3 packets received, 0.0% packet loss
|
||||||
|
round-trip min/avg/max/stddev = 0.022/0.030/0.038/0.006 ms
|
1
tests/fixtures/freebsd12/ping-hostname.json
vendored
Normal file
1
tests/fixtures/freebsd12/ping-hostname.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "151.101.65.67", "data_bytes": 56, "pattern": null, "destination": "cnn.com", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 27.01, "round_trip_ms_avg": 33.831, "round_trip_ms_max": 42.506, "round_trip_ms_stddev": 6.461, "responses": [{"type": "reply", "bytes": 64, "response_ip": "151.101.65.67", "icmp_seq": 0, "ttl": 59, "time_ms": 27.01, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "151.101.65.67", "icmp_seq": 1, "ttl": 59, "time_ms": 31.978, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "151.101.65.67", "icmp_seq": 2, "ttl": 59, "time_ms": 42.506, "duplicate": false}]}
|
8
tests/fixtures/freebsd12/ping-hostname.out
vendored
Normal file
8
tests/fixtures/freebsd12/ping-hostname.out
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
PING cnn.com (151.101.65.67): 56 data bytes
|
||||||
|
64 bytes from 151.101.65.67: icmp_seq=0 ttl=59 time=27.010 ms
|
||||||
|
64 bytes from 151.101.65.67: icmp_seq=1 ttl=59 time=31.978 ms
|
||||||
|
64 bytes from 151.101.65.67: icmp_seq=2 ttl=59 time=42.506 ms
|
||||||
|
|
||||||
|
--- cnn.com ping statistics ---
|
||||||
|
3 packets transmitted, 3 packets received, 0.0% packet loss
|
||||||
|
round-trip min/avg/max/stddev = 27.010/33.831/42.506/6.461 ms
|
1
tests/fixtures/freebsd12/ping-ip-p.json
vendored
Normal file
1
tests/fixtures/freebsd12/ping-ip-p.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "127.0.0.1", "data_bytes": 56, "pattern": "0xff", "destination": "127.0.0.1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.034, "round_trip_ms_avg": 0.037, "round_trip_ms_max": 0.042, "round_trip_ms_stddev": 0.003, "responses": [{"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.036, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.042, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.034, "duplicate": false}]}
|
9
tests/fixtures/freebsd12/ping-ip-p.out
vendored
Normal file
9
tests/fixtures/freebsd12/ping-ip-p.out
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
PATTERN: 0xff
|
||||||
|
PING 127.0.0.1 (127.0.0.1): 56 data bytes
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.036 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.042 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.034 ms
|
||||||
|
|
||||||
|
--- 127.0.0.1 ping statistics ---
|
||||||
|
3 packets transmitted, 3 packets received, 0.0% packet loss
|
||||||
|
round-trip min/avg/max/stddev = 0.034/0.037/0.042/0.003 ms
|
1
tests/fixtures/freebsd12/ping-ip-s.json
vendored
Normal file
1
tests/fixtures/freebsd12/ping-ip-s.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "127.0.0.1", "data_bytes": 40, "pattern": null, "destination": "127.0.0.1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.024, "round_trip_ms_avg": 0.032, "round_trip_ms_max": 0.036, "round_trip_ms_stddev": 0.006, "responses": [{"type": "reply", "bytes": 48, "response_ip": "127.0.0.1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.024, "duplicate": false}, {"type": "reply", "bytes": 48, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.036, "duplicate": false}, {"type": "reply", "bytes": 48, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.036, "duplicate": false}]}
|
8
tests/fixtures/freebsd12/ping-ip-s.out
vendored
Normal file
8
tests/fixtures/freebsd12/ping-ip-s.out
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
PING 127.0.0.1 (127.0.0.1): 40 data bytes
|
||||||
|
48 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.024 ms
|
||||||
|
48 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.036 ms
|
||||||
|
48 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.036 ms
|
||||||
|
|
||||||
|
--- 127.0.0.1 ping statistics ---
|
||||||
|
3 packets transmitted, 3 packets received, 0.0% packet loss
|
||||||
|
round-trip min/avg/max/stddev = 0.024/0.032/0.036/0.006 ms
|
1
tests/fixtures/freebsd12/ping-ip.json
vendored
Normal file
1
tests/fixtures/freebsd12/ping-ip.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "127.0.0.1", "data_bytes": 56, "pattern": null, "destination": "127.0.0.1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.022, "round_trip_ms_avg": 0.033, "round_trip_ms_max": 0.041, "round_trip_ms_stddev": 0.008, "responses": [{"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.022, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.036, "duplicate": false}, {"type": "reply", "bytes": 64, "response_ip": "127.0.0.1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.041, "duplicate": false}]}
|
8
tests/fixtures/freebsd12/ping-ip.out
vendored
Normal file
8
tests/fixtures/freebsd12/ping-ip.out
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
PING 127.0.0.1 (127.0.0.1): 56 data bytes
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.022 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.036 ms
|
||||||
|
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.041 ms
|
||||||
|
|
||||||
|
--- 127.0.0.1 ping statistics ---
|
||||||
|
3 packets transmitted, 3 packets received, 0.0% packet loss
|
||||||
|
round-trip min/avg/max/stddev = 0.022/0.033/0.041/0.008 ms
|
1
tests/fixtures/freebsd12/ping6-hostname-p.json
vendored
Normal file
1
tests/fixtures/freebsd12/ping6-hostname-p.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"source_ip": "::1", "destination_ip": "::1", "data_bytes": 56, "pattern": "0xff", "destination": "localhost", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.036, "round_trip_ms_avg": 0.045, "round_trip_ms_max": 0.051, "round_trip_ms_stddev": 0.007, "responses": [{"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.036, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.051, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.048, "duplicate": false}]}
|
9
tests/fixtures/freebsd12/ping6-hostname-p.out
vendored
Normal file
9
tests/fixtures/freebsd12/ping6-hostname-p.out
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
PATTERN: 0xff
|
||||||
|
PING6(56=40+8+8 bytes) ::1 --> ::1
|
||||||
|
16 bytes from ::1, icmp_seq=0 hlim=64 time=0.036 ms
|
||||||
|
16 bytes from ::1, icmp_seq=1 hlim=64 time=0.051 ms
|
||||||
|
16 bytes from ::1, icmp_seq=2 hlim=64 time=0.048 ms
|
||||||
|
|
||||||
|
--- localhost ping6 statistics ---
|
||||||
|
3 packets transmitted, 3 packets received, 0.0% packet loss
|
||||||
|
round-trip min/avg/max/std-dev = 0.036/0.045/0.051/0.007 ms
|
1
tests/fixtures/freebsd12/ping6-hostname-s.json
vendored
Normal file
1
tests/fixtures/freebsd12/ping6-hostname-s.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"source_ip": "::1", "destination_ip": "::1", "data_bytes": 88, "pattern": null, "destination": "localhost", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.035, "round_trip_ms_avg": 0.056, "round_trip_ms_max": 0.082, "round_trip_ms_stddev": 0.019, "responses": [{"type": "reply", "bytes": 48, "response_ip": "::1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.035, "duplicate": false}, {"type": "reply", "bytes": 48, "response_ip": "::1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.082, "duplicate": false}, {"type": "reply", "bytes": 48, "response_ip": "::1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.051, "duplicate": false}]}
|
8
tests/fixtures/freebsd12/ping6-hostname-s.out
vendored
Normal file
8
tests/fixtures/freebsd12/ping6-hostname-s.out
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
PING6(88=40+8+40 bytes) ::1 --> ::1
|
||||||
|
48 bytes from ::1, icmp_seq=0 hlim=64 time=0.035 ms
|
||||||
|
48 bytes from ::1, icmp_seq=1 hlim=64 time=0.082 ms
|
||||||
|
48 bytes from ::1, icmp_seq=2 hlim=64 time=0.051 ms
|
||||||
|
|
||||||
|
--- localhost ping6 statistics ---
|
||||||
|
3 packets transmitted, 3 packets received, 0.0% packet loss
|
||||||
|
round-trip min/avg/max/std-dev = 0.035/0.056/0.082/0.019 ms
|
1
tests/fixtures/freebsd12/ping6-hostname.json
vendored
Normal file
1
tests/fixtures/freebsd12/ping6-hostname.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"source_ip": "::1", "destination_ip": "::1", "data_bytes": 56, "pattern": null, "destination": "localhost", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.036, "round_trip_ms_avg": 0.042, "round_trip_ms_max": 0.048, "round_trip_ms_stddev": 0.005, "responses": [{"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.036, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.041, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.048, "duplicate": false}]}
|
8
tests/fixtures/freebsd12/ping6-hostname.out
vendored
Normal file
8
tests/fixtures/freebsd12/ping6-hostname.out
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
PING6(56=40+8+8 bytes) ::1 --> ::1
|
||||||
|
16 bytes from ::1, icmp_seq=0 hlim=64 time=0.036 ms
|
||||||
|
16 bytes from ::1, icmp_seq=1 hlim=64 time=0.041 ms
|
||||||
|
16 bytes from ::1, icmp_seq=2 hlim=64 time=0.048 ms
|
||||||
|
|
||||||
|
--- localhost ping6 statistics ---
|
||||||
|
3 packets transmitted, 3 packets received, 0.0% packet loss
|
||||||
|
round-trip min/avg/max/std-dev = 0.036/0.042/0.048/0.005 ms
|
1
tests/fixtures/freebsd12/ping6-ip-p.json
vendored
Normal file
1
tests/fixtures/freebsd12/ping6-ip-p.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"source_ip": "::1", "destination_ip": "::1", "data_bytes": 56, "pattern": "0xff", "destination": "::1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.036, "round_trip_ms_avg": 0.045, "round_trip_ms_max": 0.054, "round_trip_ms_stddev": 0.007, "responses": [{"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.036, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.054, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.045, "duplicate": false}]}
|
9
tests/fixtures/freebsd12/ping6-ip-p.out
vendored
Normal file
9
tests/fixtures/freebsd12/ping6-ip-p.out
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
PATTERN: 0xff
|
||||||
|
PING6(56=40+8+8 bytes) ::1 --> ::1
|
||||||
|
16 bytes from ::1, icmp_seq=0 hlim=64 time=0.036 ms
|
||||||
|
16 bytes from ::1, icmp_seq=1 hlim=64 time=0.054 ms
|
||||||
|
16 bytes from ::1, icmp_seq=2 hlim=64 time=0.045 ms
|
||||||
|
|
||||||
|
--- ::1 ping6 statistics ---
|
||||||
|
3 packets transmitted, 3 packets received, 0.0% packet loss
|
||||||
|
round-trip min/avg/max/std-dev = 0.036/0.045/0.054/0.007 ms
|
1
tests/fixtures/freebsd12/ping6-ip-s.json
vendored
Normal file
1
tests/fixtures/freebsd12/ping6-ip-s.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"source_ip": "::1", "destination_ip": "::1", "data_bytes": 88, "pattern": null, "destination": "::1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.036, "round_trip_ms_avg": 0.058, "round_trip_ms_max": 0.088, "round_trip_ms_stddev": 0.022, "responses": [{"type": "reply", "bytes": 48, "response_ip": "::1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.036, "duplicate": false}, {"type": "reply", "bytes": 48, "response_ip": "::1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.088, "duplicate": false}, {"type": "reply", "bytes": 48, "response_ip": "::1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.049, "duplicate": false}]}
|
8
tests/fixtures/freebsd12/ping6-ip-s.out
vendored
Normal file
8
tests/fixtures/freebsd12/ping6-ip-s.out
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
PING6(88=40+8+40 bytes) ::1 --> ::1
|
||||||
|
48 bytes from ::1, icmp_seq=0 hlim=64 time=0.036 ms
|
||||||
|
48 bytes from ::1, icmp_seq=1 hlim=64 time=0.088 ms
|
||||||
|
48 bytes from ::1, icmp_seq=2 hlim=64 time=0.049 ms
|
||||||
|
|
||||||
|
--- ::1 ping6 statistics ---
|
||||||
|
3 packets transmitted, 3 packets received, 0.0% packet loss
|
||||||
|
round-trip min/avg/max/std-dev = 0.036/0.058/0.088/0.022 ms
|
1
tests/fixtures/freebsd12/ping6-ip.json
vendored
Normal file
1
tests/fixtures/freebsd12/ping6-ip.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"source_ip": "::1", "destination_ip": "::1", "data_bytes": 56, "pattern": null, "destination": "::1", "packets_transmitted": 3, "packets_received": 3, "packet_loss_percent": 0.0, "duplicates": 0, "round_trip_ms_min": 0.034, "round_trip_ms_avg": 0.044, "round_trip_ms_max": 0.053, "round_trip_ms_stddev": 0.008, "responses": [{"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 0, "ttl": 64, "time_ms": 0.034, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 1, "ttl": 64, "time_ms": 0.053, "duplicate": false}, {"type": "reply", "bytes": 16, "response_ip": "::1", "icmp_seq": 2, "ttl": 64, "time_ms": 0.045, "duplicate": false}]}
|
8
tests/fixtures/freebsd12/ping6-ip.out
vendored
Normal file
8
tests/fixtures/freebsd12/ping6-ip.out
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
PING6(56=40+8+8 bytes) ::1 --> ::1
|
||||||
|
16 bytes from ::1, icmp_seq=0 hlim=64 time=0.034 ms
|
||||||
|
16 bytes from ::1, icmp_seq=1 hlim=64 time=0.053 ms
|
||||||
|
16 bytes from ::1, icmp_seq=2 hlim=64 time=0.045 ms
|
||||||
|
|
||||||
|
--- ::1 ping6 statistics ---
|
||||||
|
3 packets transmitted, 3 packets received, 0.0% packet loss
|
||||||
|
round-trip min/avg/max/std-dev = 0.034/0.044/0.053/0.008 ms
|
1
tests/fixtures/freebsd12/traceroute.json
vendored
Normal file
1
tests/fixtures/freebsd12/traceroute.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "8.8.8.8", "destination_name": "8.8.8.8", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice.attlocal.net", "rtt": 3.263}, {"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice.attlocal.net", "rtt": 4.146}, {"annotation": null, "asn": null, "ip": "192.168.1.254", "name": "dsldevice.attlocal.net", "rtt": 4.273}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 20.839}, {"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 23.434}, {"annotation": null, "asn": null, "ip": "76.220.24.1", "name": "76-220-24-1.lightspeed.sntcca.sbcglobal.net", "rtt": 22.032}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 4, "probes": [{"annotation": null, "asn": null, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 33.17}, {"annotation": null, "asn": null, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 26.593}, {"annotation": null, "asn": null, "ip": "12.122.149.186", "name": "12.122.149.186", "rtt": 32.851}]}, {"hop": 5, "probes": [{"annotation": null, "asn": null, "ip": "12.122.3.70", "name": "sffca22crs.ip.att.net", "rtt": 26.045}, {"annotation": null, "asn": null, "ip": "12.122.3.70", "name": "sffca22crs.ip.att.net", "rtt": 29.235}, {"annotation": null, "asn": null, "ip": "12.122.3.70", "name": "sffca22crs.ip.att.net", "rtt": 28.28}]}, {"hop": 6, "probes": [{"annotation": null, "asn": null, "ip": "12.122.163.61", "name": "12.122.163.61", "rtt": 25.3}, {"annotation": null, "asn": null, "ip": "12.122.163.61", "name": "12.122.163.61", "rtt": 24.156}, {"annotation": null, "asn": null, "ip": "12.122.163.61", "name": "12.122.163.61", "rtt": 24.849}]}, {"hop": 7, "probes": [{"annotation": null, "asn": null, "ip": "12.255.10.226", "name": "12.255.10.226", "rtt": 25.375}, {"annotation": null, "asn": null, "ip": "12.255.10.224", "name": "12.255.10.224", "rtt": 24.011}, {"annotation": null, "asn": null, "ip": "12.255.10.224", "name": "12.255.10.224", "rtt": 25.322}]}, {"hop": 8, "probes": [{"annotation": null, "asn": null, "ip": "108.170.243.1", "name": "108.170.243.1", "rtt": 29.376}]}, {"hop": 9, "probes": [{"annotation": null, "asn": null, "ip": "8.8.8.8", "name": "dns.google", "rtt": 23.228}, {"annotation": null, "asn": null, "ip": "209.85.252.251", "name": "209.85.252.251", "rtt": 24.548}, {"annotation": null, "asn": null, "ip": "108.170.237.23", "name": "108.170.237.23", "rtt": 24.332}]}]}
|
14
tests/fixtures/freebsd12/traceroute.out
vendored
Normal file
14
tests/fixtures/freebsd12/traceroute.out
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
traceroute to 8.8.8.8 (8.8.8.8), 64 hops max, 40 byte packets
|
||||||
|
1 dsldevice.attlocal.net (192.168.1.254) 3.263 ms 4.146 ms 4.273 ms
|
||||||
|
2 76-220-24-1.lightspeed.sntcca.sbcglobal.net (76.220.24.1) 20.839 ms 23.434 ms 22.032 ms
|
||||||
|
3 * * *
|
||||||
|
4 12.122.149.186 (12.122.149.186) 33.170 ms 26.593 ms 32.851 ms
|
||||||
|
5 sffca22crs.ip.att.net (12.122.3.70) 26.045 ms 29.235 ms 28.280 ms
|
||||||
|
6 12.122.163.61 (12.122.163.61) 25.300 ms 24.156 ms 24.849 ms
|
||||||
|
7 12.255.10.226 (12.255.10.226) 25.375 ms
|
||||||
|
12.255.10.224 (12.255.10.224) 24.011 ms 25.322 ms
|
||||||
|
8 * 108.170.243.1 (108.170.243.1) 29.376 ms *
|
||||||
|
9 dns.google (8.8.8.8) 23.228 ms
|
||||||
|
209.85.252.251 (209.85.252.251) 24.548 ms
|
||||||
|
108.170.237.23 (108.170.237.23) 24.332 ms
|
||||||
|
|
1
tests/fixtures/freebsd12/traceroute6.json
vendored
Normal file
1
tests/fixtures/freebsd12/traceroute6.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "2a04:4e42::323", "destination_name": "turner-tls.map.fastly.net", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": "2001:506:6000:11b:71:156:212:143", "name": null, "rtt": 27.603}, {"annotation": null, "asn": null, "ip": "2001:506:6000:11b:71:156:212:143", "name": null, "rtt": 28.659}, {"annotation": null, "asn": null, "ip": "2001:506:6000:11b:71:156:212:143", "name": null, "rtt": 33.235}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 4, "probes": [{"annotation": null, "asn": null, "ip": "2001:1890:ff:ff08:12:242:117:16", "name": null, "rtt": 36.731}, {"annotation": null, "asn": null, "ip": "2001:1890:ff:ff08:12:242:117:16", "name": null, "rtt": 28.875}, {"annotation": null, "asn": null, "ip": "2001:1890:ff:ff08:12:242:117:16", "name": null, "rtt": 28.959}]}, {"hop": 5, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 6, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 7, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 8, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 9, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 10, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 11, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 12, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 13, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 14, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 15, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 16, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 17, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 18, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 19, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 20, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 21, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 22, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 23, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 24, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 25, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 26, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 27, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 28, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 29, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 30, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 31, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}]}
|
34
tests/fixtures/freebsd12/traceroute6.out
vendored
Normal file
34
tests/fixtures/freebsd12/traceroute6.out
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
traceroute6: Warning: turner-tls.map.fastly.net has multiple addresses; using 2a04:4e42::323
|
||||||
|
traceroute6 to turner-tls.map.fastly.net (2a04:4e42::323) from 2600:1700:bab0:d40:250:56ff:fe26:c5b4, 64 hops max, 20 byte packets
|
||||||
|
1 * * *
|
||||||
|
2 2001:506:6000:11b:71:156:212:143 27.603 ms 28.659 ms 33.235 ms
|
||||||
|
3 * * *
|
||||||
|
4 2001:1890:ff:ff08:12:242:117:16 36.731 ms 28.875 ms 28.959 ms
|
||||||
|
5 * * *
|
||||||
|
6 * * *
|
||||||
|
7 * * *
|
||||||
|
8 * * *
|
||||||
|
9 * * *
|
||||||
|
10 * * *
|
||||||
|
11 * * *
|
||||||
|
12 * * *
|
||||||
|
13 * * *
|
||||||
|
14 * * *
|
||||||
|
15 * * *
|
||||||
|
16 * * *
|
||||||
|
17 * * *
|
||||||
|
18 * * *
|
||||||
|
19 * * *
|
||||||
|
20 * * *
|
||||||
|
21 * * *
|
||||||
|
22 * * *
|
||||||
|
23 * * *
|
||||||
|
24 * * *
|
||||||
|
25 * * *
|
||||||
|
26 * * *
|
||||||
|
27 * * *
|
||||||
|
28 * * *
|
||||||
|
29 * * *
|
||||||
|
30 * * *
|
||||||
|
31 * * *
|
||||||
|
|
1
tests/fixtures/generic/keyvalue-ifcfg.json
vendored
Normal file
1
tests/fixtures/generic/keyvalue-ifcfg.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"type": "Ethernet", "proxy_method": "none", "browser_only": "no", "bootproto": "dhcp", "defroute": "yes", "ipv4_failure_fatal": "no", "ipv6init": "yes", "ipv6_autoconf": "yes", "ipv6_defroute": "yes", "ipv6_failure_fatal": "no", "ipv6_addr_gen_mode": "stable-privacy", "name": "ens33", "uuid": "d92ece08-9e02-47d5-b2d2-92c80e155744", "device": "ens33", "onboot": "yes", "value_with_spaces": "this value includes spaces", "value_with_quotes_inside": "this value \"has quotation marks\" inside", "value_with_quotes_inside2": "\"this value\" has quotations at the beginning but not the end", "value_with_quotes_inside3": "this value has quotation marks \"at the end\""}
|
19
tests/fixtures/generic/keyvalue-ifcfg.txt
vendored
Normal file
19
tests/fixtures/generic/keyvalue-ifcfg.txt
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
TYPE="Ethernet"
|
||||||
|
PROXY_METHOD="none"
|
||||||
|
BROWSER_ONLY="no"
|
||||||
|
BOOTPROTO="dhcp"
|
||||||
|
DEFROUTE="yes"
|
||||||
|
IPV4_FAILURE_FATAL="no"
|
||||||
|
IPV6INIT="yes"
|
||||||
|
IPV6_AUTOCONF="yes"
|
||||||
|
IPV6_DEFROUTE="yes"
|
||||||
|
IPV6_FAILURE_FATAL="no"
|
||||||
|
IPV6_ADDR_GEN_MODE="stable-privacy"
|
||||||
|
NAME="ens33"
|
||||||
|
UUID="d92ece08-9e02-47d5-b2d2-92c80e155744"
|
||||||
|
DEVICE="ens33"
|
||||||
|
ONBOOT="yes"
|
||||||
|
value_with_spaces: this value includes spaces
|
||||||
|
value_with_quotes_inside = this value "has quotation marks" inside
|
||||||
|
value_with_quotes_inside2 = "this value" has quotations at the beginning but not the end
|
||||||
|
value_with_quotes_inside3 : this value has quotation marks "at the end"
|
1
tests/fixtures/generic/keyvalue.json
vendored
Normal file
1
tests/fixtures/generic/keyvalue.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"value1": "hello", "value2": "true", "no_value": "", "value4": "3.14", "value5": "42"}
|
5
tests/fixtures/generic/keyvalue.txt
vendored
Normal file
5
tests/fixtures/generic/keyvalue.txt
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
value1 = hello
|
||||||
|
value2 = true
|
||||||
|
no_value
|
||||||
|
value4 = 3.14
|
||||||
|
value5: 42
|
1
tests/fixtures/generic/traceroute1.json
vendored
Normal file
1
tests/fixtures/generic/traceroute1.json
vendored
Normal file
File diff suppressed because one or more lines are too long
16
tests/fixtures/generic/traceroute1.out
vendored
Normal file
16
tests/fixtures/generic/traceroute1.out
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
traceroute to http://google.es (173.207.22.152), 30 hops max, 60 byte packets
|
||||||
|
1 131.240.100.12 (131.240.100.12) [AS1739] 0.676 ms !P 0.763 ms ! 0.910 ms !<500>
|
||||||
|
2 http://tut1-fw-vlan558.av.tut.fi (131.232.1.26) [AS1739] 0.266 ms 0.404 ms 0.493 ms
|
||||||
|
3 http://surf-gw-vlan557.av.tut.fi (131.232.1.20) [AS1739] 0.967 ms 0.961 ms 1.085 ms
|
||||||
|
4 http://funet-tut6-rtr-xe-0-0-0.cc.tut.fi (130.230.1.237) [AS1739] 1.096 ms 1.086 ms 1.049 ms
|
||||||
|
5 http://hameenlinna2-et-0-0-0-1.ip.funet.fi (86.50.255.220) [AS1741] 3.810 ms 3.845 ms 3.820 ms
|
||||||
|
6 http://hameenlinna1-et-0-0-1-1.ip.funet.fi (86.50.255.224) [AS1741] 29.055 ms 29.013 ms 28.977 ms
|
||||||
|
7 http://espoo2-et-0-1-2-1.ip.funet.fi (86.50.255.223) [AS1741] 3.468 ms 8.007 ms 7.890 ms
|
||||||
|
8 http://espoo1-et-0-1-7-1.ip.funet.fi (86.50.255.232) [AS1741] 13.498 ms 13.307 ms 13.399 ms
|
||||||
|
9 http://fi-csc2.nordu.net (109.105.102.168) [AS2603] 3.250 ms 3.268 ms 3.236 ms
|
||||||
|
10 http://se-fre.nordu.net (109.105.97.93) [AS2603] 9.418 ms 9.410 ms 9.369 ms
|
||||||
|
11 http://se-kst2.nordu.net (109.105.97.27) [AS2603] 9.617 ms 9.594 ms 9.603 ms
|
||||||
|
12 http://as15169-10g-sk1.sthix.net (192.121.80.47) [*] 10.010 ms 72.14.196.42 (72.14.196.42) [AS15169] 9.182 ms 44.983 ms
|
||||||
|
13 108.170.254.49 (108.170.254.49) [AS15169] 10.852 ms 108.170.254.33 (108.170.254.33) [AS15169] 11.185 ms 108.170.254.49 (108.170.254.49) [AS15169] 10.876 ms
|
||||||
|
14 209.85.242.11 (209.85.242.11) [AS15169] 10.192 ms 10.471 ms 10.502 ms
|
||||||
|
15 http://arn11s03-in-f3.1e100.net (172.217.21.163) [AS15169] 9.652 ms 9.664 ms 9.777 ms
|
1
tests/fixtures/generic/traceroute2.json
vendored
Normal file
1
tests/fixtures/generic/traceroute2.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"destination_ip": "216.58.194.46", "destination_name": "google.com", "hops": [{"hop": 1, "probes": [{"annotation": null, "asn": null, "ip": "216.230.231.141", "name": "216-230-231-141.static.houston.tx.oplink.net", "rtt": 198.574}, {"annotation": null, "asn": null, "ip": "216.230.231.141", "name": "216-230-231-141.static.houston.tx.oplink.net", "rtt": null}, {"annotation": null, "asn": null, "ip": "216.230.231.141", "name": "216-230-231-141.static.houston.tx.oplink.net", "rtt": 198.65}]}, {"hop": 2, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 3, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 4, "probes": [{"annotation": null, "asn": null, "ip": "72.14.242.34", "name": "72.14.242.34", "rtt": 4.932}, {"annotation": null, "asn": null, "ip": "72.14.242.34", "name": "72.14.242.34", "rtt": 4.945}, {"annotation": null, "asn": null, "ip": "72.14.242.34", "name": "72.14.242.34", "rtt": 4.951}]}, {"hop": 5, "probes": [{"annotation": null, "asn": null, "ip": null, "name": null, "rtt": null}]}, {"hop": 6, "probes": [{"annotation": null, "asn": null, "ip": "108.170.230.116", "name": "108.170.230.116", "rtt": 4.687}, {"annotation": null, "asn": null, "ip": "108.170.230.116", "name": "108.170.230.116", "rtt": 4.798}, {"annotation": null, "asn": null, "ip": "108.170.230.116", "name": "108.170.230.116", "rtt": 4.688}]}, {"hop": 7, "probes": [{"annotation": null, "asn": null, "ip": "108.170.252.130", "name": "108.170.252.130", "rtt": 4.825}, {"annotation": null, "asn": null, "ip": "108.170.252.130", "name": "108.170.252.130", "rtt": 4.844}, {"annotation": null, "asn": null, "ip": "108.170.252.130", "name": "108.170.252.130", "rtt": 4.797}]}, {"hop": 8, "probes": [{"annotation": null, "asn": null, "ip": "108.170.233.117", "name": "108.170.233.117", "rtt": 5.386}, {"annotation": null, "asn": null, "ip": "108.170.233.117", "name": "108.170.233.117", "rtt": 5.288}, {"annotation": null, "asn": null, "ip": "108.170.233.117", "name": "108.170.233.117", "rtt": 5.324}]}, {"hop": 9, "probes": [{"annotation": null, "asn": null, "ip": "216.239.63.250", "name": "216.239.63.250", "rtt": 5.305}, {"annotation": null, "asn": null, "ip": "216.239.63.250", "name": "216.239.63.250", "rtt": 5.369}, {"annotation": null, "asn": null, "ip": "216.239.63.250", "name": "216.239.63.250", "rtt": 5.406}]}, {"hop": 10, "probes": [{"annotation": null, "asn": null, "ip": "108.170.240.129", "name": "108.170.240.129", "rtt": 6.005}, {"annotation": null, "asn": null, "ip": "108.170.240.129", "name": "108.170.240.129", "rtt": 5.93}, {"annotation": null, "asn": null, "ip": "108.170.240.129", "name": "108.170.240.129", "rtt": 5.983}]}, {"hop": 11, "probes": [{"annotation": null, "asn": null, "ip": "209.85.242.53", "name": "209.85.242.53", "rtt": 4.973}, {"annotation": null, "asn": null, "ip": "209.85.242.53", "name": "209.85.242.53", "rtt": 4.973}, {"annotation": null, "asn": null, "ip": "209.85.242.53", "name": "209.85.242.53", "rtt": 4.979}]}, {"hop": 12, "probes": [{"annotation": null, "asn": null, "ip": "216.58.194.46", "name": "dfw25s12-in-f46.1e100.net", "rtt": 4.871}, {"annotation": null, "asn": null, "ip": "216.58.194.46", "name": "dfw25s12-in-f46.1e100.net", "rtt": 4.884}, {"annotation": null, "asn": null, "ip": "216.58.194.46", "name": "dfw25s12-in-f46.1e100.net", "rtt": 4.863}]}]}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user