Show rate per path

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2018-04-18 16:37:20 +00:00
parent 1736b6e043
commit a5f634ee28
2 changed files with 13 additions and 9 deletions

View File

@@ -48,14 +48,16 @@ gt_path_status(int fd)
}
printf("path %s\n"
" bind: %s port %"PRIu16"\n"
" public: %s port %"PRIu16"\n"
" peer: %s port %"PRIu16"\n"
" mtu: %zu bytes\n"
" rtt: %.3f ms\n"
" rttvar: %.3f ms\n"
" output: %"PRIu64" packets\n"
" input: %"PRIu64" packets\n",
" bind: %s port %"PRIu16"\n"
" public: %s port %"PRIu16"\n"
" peer: %s port %"PRIu16"\n"
" mtu: %zu bytes\n"
" rtt: %.3f ms\n"
" rttvar: %.3f ms\n"
" upload: %"PRIu64" bytes/s\n"
" download: %"PRIu64" bytes/s\n"
" output: %"PRIu64" packets\n"
" input: %"PRIu64" packets\n",
statestr,
bindstr[0] ? bindstr : "-",
gt_get_port((struct sockaddr *)&res.path_status.local_addr),
@@ -66,6 +68,8 @@ gt_path_status(int fd)
res.path_status.mtu.ok,
res.path_status.rtt/(double)1e3,
res.path_status.rttvar/(double)1e3,
res.path_status.r_rate,
res.path_status.recv.rate,
res.path_status.send.total,
res.path_status.recv.total);
} while (res.ret == EAGAIN);