mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
add ping and traceroute examples
This commit is contained in:
131
README.md
131
README.md
@ -159,6 +159,7 @@ 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
|
- `--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
|
||||||
@ -1912,6 +1913,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
|
||||||
@ -1931,7 +1985,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
|
||||||
@ -2424,6 +2477,82 @@ timedatectl | jc --timedatectl -p # or: jc -p timedatectl
|
|||||||
"dst_active": true
|
"dst_active": 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
|
||||||
|
Reference in New Issue
Block a user