aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/auxstats
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2007-04-14 14:59:27 +0000
committerrsc <devnull@localhost>2007-04-14 14:59:27 +0000
commitc7a10afd388ab71a93d018269b1fecb0af8facbd (patch)
treeeada0ae03ae86cbcf8277a0509e76b5e378c520c /src/cmd/auxstats
parentcaccd753fda0b79a7267ba593a4f0b5ac05f8940 (diff)
downloadplan9port-c7a10afd388ab71a93d018269b1fecb0af8facbd.tar.gz
plan9port-c7a10afd388ab71a93d018269b1fecb0af8facbd.tar.bz2
plan9port-c7a10afd388ab71a93d018269b1fecb0af8facbd.zip
xnet (Jeff Sickel)
Diffstat (limited to 'src/cmd/auxstats')
-rw-r--r--src/cmd/auxstats/Darwin.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/cmd/auxstats/Darwin.c b/src/cmd/auxstats/Darwin.c
index ccddcf6c..b92f682e 100644
--- a/src/cmd/auxstats/Darwin.c
+++ b/src/cmd/auxstats/Darwin.c
@@ -293,22 +293,22 @@ void
xnet(int first)
{
uint n;
- uvlong err, in, inb, out, outb;
+ ulong err, in, inb, out, outb;
n = sample.net_ifaces;
- in = sample.net_ipackets;
- out = sample.net_opackets;
- inb = sample.net_ibytes;
- outb = sample.net_obytes;
- err = sample.net_errors;
+ in = sample.net_ipackets - sample.p_net_ipackets;
+ out = sample.net_opackets - sample.p_net_opackets;
+ inb = sample.net_ibytes - sample.p_net_ibytes;
+ outb = sample.net_obytes - sample.p_net_obytes;
+ err = sample.net_errors - sample.p_net_errors;
- Bprint(&bout, "etherb %llud %d\n", inb+outb, n*1000000);
- Bprint(&bout, "ether %llud %d\n", in+out, n*1000);
- Bprint(&bout, "ethererr %llud %d\n", err, n*1000);
- Bprint(&bout, "etherin %llud %d\n", in, n*1000);
- Bprint(&bout, "etherout %llud %d\n", out, n*1000);
- Bprint(&bout, "etherinb %llud %d\n", inb, n*1000);
- Bprint(&bout, "etheroutb %llud %d\n", outb, n*1000);
+ Bprint(&bout, "etherb %lud %d\n", inb+outb, n*1000000);
+ Bprint(&bout, "ether %lud %d\n", in+out, n*1000);
+ Bprint(&bout, "ethererr %lud %d\n", err, n*1000);
+ Bprint(&bout, "etherin %lud %d\n", in, n*1000);
+ Bprint(&bout, "etherout %lud %d\n", out, n*1000);
+ Bprint(&bout, "etherinb %lud %d\n", inb, n*1000);
+ Bprint(&bout, "etheroutb %lud %d\n", outb, n*1000);
}
int