Need to measure pairwire (ip based) bandwidth used over time when using TC
1
vote
0
answers
24
views
I need to measure the datarates of packets between multiple servers. I need pairwise bandwidths between the servers (if possible even the ports), not the overall datarate per interface on each server.
**Example output**
| Timestamp | Server A to B | Server B to A | Server A to C | Server C to A |
| -------- | -------------- | -------------- | -------------- | -------------- |
| 0 | 1 | 2 | 1 | 5 |
| 1 | 5 | 3 | 7 | 1 |
**What I tried or thought of**
1. tcpdump - I was capturing all the packets and looking at
ip.len
for getting the datarates. It worked quite well till I started testing along with TC.
Turns out tcpdump captures packets at a lower layer than TC. So, the bandwidths I measure using this can't see the limit set by TC.
2. netstat - I tried using this by grep
ing the output and look at Recv-Q
and Send-Q
columns. But later I found out that it reports the bytes that have been received and are buffered, waiting for the local process that is using this connection to read and consume them. I won't be able to use them to get bandwidth being used.
3. iftop - Amazing GUI and has all the things I need. But no way to get the output in a good way to process. Might also overwhelm the storage because of the amount of extra text it stores along with.
4. bwm-ng - Gives overall datarate per interface on each server but not pairwise.
Please let me know if there are any other ways to achieve what I need.
Thanks in advance for your help.
Asked by Pramodh Rachuri
(11 rep)
Sep 20, 2022, 06:33 AM
Last activity: Sep 21, 2022, 03:57 PM
Last activity: Sep 21, 2022, 03:57 PM