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

2
mud

Submodule mud updated: 1f25f12e4a...a7044db87c

View File

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