From 71b4db50c85fbeb3b7a7546af1fe9f0f00d735ea Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 12 Mar 2005 04:39:25 +0000 Subject: [PATCH] fillin net_connection queue metrics --- src/os/linux/linux_sigar.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/os/linux/linux_sigar.c b/src/os/linux/linux_sigar.c index 6aa2f69d..937a70d1 100644 --- a/src/os/linux/linux_sigar.c +++ b/src/os/linux/linux_sigar.c @@ -1586,9 +1586,17 @@ static int proc_net_read(net_conn_getter_t *getter, /* SIGAR_TCP_* currently matches TCP_* in linux/tcp.h */ sscanf(ptr, "%2x", &conn.state); + ptr = sigar_skip_token(ptr); + SIGAR_SKIP_SPACE(ptr); + + conn.send_queue = hex2int(ptr); + ptr += 9; /* tx + ':' */; + conn.receive_queue = hex2int(ptr); + ptr += 8; + SIGAR_SKIP_SPACE(ptr); + + ptr = sigar_skip_multiple_token(ptr, 2); /* tr:tm->when retrnsmt */ - /* XXX rx/tx queue info would be useful */ - ptr = sigar_skip_multiple_token(ptr, 4); conn.uid = sigar_strtoul(ptr); ptr = sigar_skip_token(ptr);