Command Line Magic on Nostr: Use ip's stats (-s) and json output (-j) options with the jq command to parse the ...
Use ip's stats (-s) and json output (-j) options with the jq command to parse the received byte count on your wireguard wg0 interface:
ip -s -j addr show dev wg0 | jq '.[].stats64.rx.bytes'
Published at
2023-11-08 17:43:04Event JSON
{
"id": "6a024c56b8b7ea08dc45de42cd1a4e428c46f949f7dc2c8cf6046da21a11985c",
"pubkey": "f5f1075f3fad1755cef1ef9024d53eafd24ea460383319ffb9949f3b6a3cde1a",
"created_at": 1699465384,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/users/climagic/statuses/111376163436311476",
"activitypub"
]
],
"content": "Use ip's stats (-s) and json output (-j) options with the jq command to parse the received byte count on your wireguard wg0 interface:\n\nip -s -j addr show dev wg0 | jq '.[].stats64.rx.bytes'",
"sig": "b1139e4e88961121ed4c1f3a6f428b90daa17d6dd8938e19dc512fbe2ca83b05c6c78289377f1231e65364e0b3c48e092523fe2cb7716ecc31daeebf65165e6a"
}