mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-10-08 23:22:21 +02:00
* feat(iftop): add iftop-scanning this is not even an MVP, but I would like it to exist to allow per client json aggregation also, a future use is a stream response * fix typos and test first regex * add more iftop fun * Update iftop.py * add tests and json Signed-off-by: Ron Green <11993626+georgettica@users.noreply.github.com> * feat: make work and add tests Signed-off-by: Ron Green <11993626+georgettica@users.noreply.github.com> * add completion * change schema for query looping * fix: tests * fix review comments * feat: add byte parsing * add no-port to options * remove completion and format dep Signed-off-by: Ron Green <11993626+georgettica@users.noreply.github.com> * Update setup.py * Update iftop.py --------- Signed-off-by: Ron Green <11993626+georgettica@users.noreply.github.com> Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
236 lines
6.3 KiB
JSON
236 lines
6.3 KiB
JSON
[
|
|
{
|
|
"device": "enp0s3",
|
|
"ip_address": "10.10.15.129",
|
|
"mac_address": "08:00:27:c0:4a:4f",
|
|
"total_send_rate": {
|
|
"last_2s": 23200000,
|
|
"last_10s": 23200000,
|
|
"last_40s": 23200000
|
|
},
|
|
"total_receive_rate": {
|
|
"last_2s": 5650000,
|
|
"last_10s": 5650000,
|
|
"last_40s": 5650000
|
|
},
|
|
"total_send_and_receive_rate": {
|
|
"last_2s": 28800000,
|
|
"last_10s": 28800000,
|
|
"last_40s": 28800000
|
|
},
|
|
"peak_rate": {
|
|
"last_2s": 23200000,
|
|
"last_10s": 5650000,
|
|
"last_40s": 28800000
|
|
},
|
|
"cumulative_rate": {
|
|
"last_2s": 5790000,
|
|
"last_10s": 1410000,
|
|
"last_40s": 7200000
|
|
},
|
|
"clients": [
|
|
{
|
|
"index": 1,
|
|
"connections": [
|
|
{
|
|
"host_name": "ubuntu-2004-clean-01",
|
|
"host_port": "33222",
|
|
"last_2s": 4720,
|
|
"last_10s": 4720,
|
|
"last_40s": 4720,
|
|
"cumulative": 1180,
|
|
"direction": "send"
|
|
},
|
|
{
|
|
"host_name": "10.10.15.72",
|
|
"host_port": "https",
|
|
"last_2s": 1990000,
|
|
"last_10s": 1990000,
|
|
"last_40s": 1990000,
|
|
"cumulative": 508000,
|
|
"direction": "receive"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"index": 2,
|
|
"connections": [
|
|
{
|
|
"host_name": "ubuntu-2004-clean-01",
|
|
"host_port": "https",
|
|
"last_2s": 1980000,
|
|
"last_10s": 1980000,
|
|
"last_40s": 1980000,
|
|
"cumulative": 507000,
|
|
"direction": "send"
|
|
},
|
|
{
|
|
"host_name": "10.10.15.73",
|
|
"host_port": "34562",
|
|
"last_2s": 3170,
|
|
"last_10s": 3170,
|
|
"last_40s": 3170,
|
|
"cumulative": 811,
|
|
"direction": "receive"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"device": "enp0s3",
|
|
"ip_address": "10.10.15.129",
|
|
"mac_address": "08:00:27:c0:4a:4f",
|
|
"total_send_rate": {
|
|
"last_2s": 23200000,
|
|
"last_10s": 23200000,
|
|
"last_40s": 23200000
|
|
},
|
|
"total_receive_rate": {
|
|
"last_2s": 5650000,
|
|
"last_10s": 5650000,
|
|
"last_40s": 5650000
|
|
},
|
|
"total_send_and_receive_rate": {
|
|
"last_2s": 28800000,
|
|
"last_10s": 28800000,
|
|
"last_40s": 28800000
|
|
},
|
|
"peak_rate": {
|
|
"last_2s": 23200000,
|
|
"last_10s": 5650000,
|
|
"last_40s": 28800000
|
|
},
|
|
"cumulative_rate": {
|
|
"last_2s": 5790000,
|
|
"last_10s": 1410000,
|
|
"last_40s": 7200000
|
|
},
|
|
"clients": [
|
|
{
|
|
"index": 1,
|
|
"connections": [
|
|
{
|
|
"host_name": "ubuntu-2004-clean-01",
|
|
"host_port": "33222",
|
|
"last_2s": 4720,
|
|
"last_10s": 4720,
|
|
"last_40s": 4720,
|
|
"cumulative": 1180,
|
|
"direction": "send"
|
|
},
|
|
{
|
|
"host_name": "10.10.15.72",
|
|
"host_port": "https",
|
|
"last_2s": 1990000,
|
|
"last_10s": 1990000,
|
|
"last_40s": 1990000,
|
|
"cumulative": 508000,
|
|
"direction": "receive"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"index": 2,
|
|
"connections": [
|
|
{
|
|
"host_name": "ubuntu-2004-clean-01",
|
|
"host_port": "https",
|
|
"last_2s": 1980000,
|
|
"last_10s": 1980000,
|
|
"last_40s": 1980000,
|
|
"cumulative": 507000,
|
|
"direction": "send"
|
|
},
|
|
{
|
|
"host_name": "10.10.15.73",
|
|
"host_port": "34562",
|
|
"last_2s": 3170,
|
|
"last_10s": 3170,
|
|
"last_40s": 3170,
|
|
"cumulative": 811,
|
|
"direction": "receive"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"device": "enp0s3",
|
|
"ip_address": "10.10.15.129",
|
|
"mac_address": "08:00:27:c0:4a:4f",
|
|
"total_send_rate": {
|
|
"last_2s": 23200000,
|
|
"last_10s": 23200000,
|
|
"last_40s": 23200000
|
|
},
|
|
"total_receive_rate": {
|
|
"last_2s": 5650000,
|
|
"last_10s": 5650000,
|
|
"last_40s": 5650000
|
|
},
|
|
"total_send_and_receive_rate": {
|
|
"last_2s": 28800000,
|
|
"last_10s": 28800000,
|
|
"last_40s": 28800000
|
|
},
|
|
"peak_rate": {
|
|
"last_2s": 23200000,
|
|
"last_10s": 5650000,
|
|
"last_40s": 28800000
|
|
},
|
|
"cumulative_rate": {
|
|
"last_2s": 5790000,
|
|
"last_10s": 1410000,
|
|
"last_40s": 7200000
|
|
},
|
|
"clients": [
|
|
{
|
|
"index": 1,
|
|
"connections": [
|
|
{
|
|
"host_name": "ubuntu-2004-clean-01",
|
|
"host_port": "33222",
|
|
"last_2s": 4720,
|
|
"last_10s": 4720,
|
|
"last_40s": 4720,
|
|
"cumulative": 1180,
|
|
"direction": "send"
|
|
},
|
|
{
|
|
"host_name": "10.10.15.72",
|
|
"host_port": "https",
|
|
"last_2s": 1990000,
|
|
"last_10s": 1990000,
|
|
"last_40s": 1990000,
|
|
"cumulative": 508000,
|
|
"direction": "receive"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"index": 2,
|
|
"connections": [
|
|
{
|
|
"host_name": "ubuntu-2004-clean-01",
|
|
"host_port": "https",
|
|
"last_2s": 1980000,
|
|
"last_10s": 1980000,
|
|
"last_40s": 1980000,
|
|
"cumulative": 507000,
|
|
"direction": "send"
|
|
},
|
|
{
|
|
"host_name": "10.10.15.73",
|
|
"host_port": "34562",
|
|
"last_2s": 3170,
|
|
"last_10s": 3170,
|
|
"last_40s": 3170,
|
|
"cumulative": 811,
|
|
"direction": "receive"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
] |