summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/if.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-07-29 22:34:15 +0000
committerdg <dg@FreeBSD.org>1995-07-29 22:34:15 +0000
commitd07d67048ecfd869ae329f73245a968f13f85372 (patch)
tree20ed2bb57a4c73bef45184ea2a93cc77f2408e8f /usr.bin/netstat/if.c
parent4c0fc42609cbd3648dc9c01c1ac3cf34d5ae1b20 (diff)
downloadFreeBSD-src-d07d67048ecfd869ae329f73245a968f13f85372.zip
FreeBSD-src-d07d67048ecfd869ae329f73245a968f13f85372.tar.gz
Output statistics as unsigned in the -w section.
Look at error return of kread() and stop on error. Fix warning in kread() to not output "kvm_read:" twice. Killed PCB cache misses stat as we no longer have it.
Diffstat (limited to 'usr.bin/netstat/if.c')
-rw-r--r--usr.bin/netstat/if.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c
index b656681..f625740 100644
--- a/usr.bin/netstat/if.c
+++ b/usr.bin/netstat/if.c
@@ -340,19 +340,19 @@ loop:
continue;
}
if (ip == interesting) {
- printf("%8d %5d ",
+ printf("%8u %5u ",
ifnet.if_ipackets - ip->ift_ip,
ifnet.if_ierrors - ip->ift_ie);
if (bflag)
- printf("%10d ", ifnet.if_ibytes - ip->ift_ib);
- printf("%8d %5d ",
+ printf("%10u ", ifnet.if_ibytes - ip->ift_ib);
+ printf("%8u %5u ",
ifnet.if_opackets - ip->ift_op,
ifnet.if_oerrors - ip->ift_oe);
if (bflag)
- printf("%10d ", ifnet.if_obytes - ip->ift_ob);
- printf("%5d", ifnet.if_collisions - ip->ift_co);
+ printf("%10u ", ifnet.if_obytes - ip->ift_ob);
+ printf("%5u", ifnet.if_collisions - ip->ift_co);
if (dflag)
- printf(" %5d",
+ printf(" %5u",
ifnet.if_snd.ifq_drops - ip->ift_dr);
}
ip->ift_ip = ifnet.if_ipackets;
@@ -374,19 +374,19 @@ loop:
off = (u_long) ifnet.if_next;
}
if (lastif - iftot > 0) {
- printf(" %8d %5d",
+ printf(" %8u %5u",
sum->ift_ip - total->ift_ip,
sum->ift_ie - total->ift_ie);
if (bflag)
- printf(" %10d", sum->ift_ib - total->ift_ib);
- printf(" %8d %5d",
+ printf(" %10u", sum->ift_ib - total->ift_ib);
+ printf(" %8u %5u",
sum->ift_op - total->ift_op,
sum->ift_oe - total->ift_oe);
if (bflag)
- printf(" %10d", sum->ift_ob - total->ift_ob);
- printf(" %5d", sum->ift_co - total->ift_co);
+ printf(" %10u", sum->ift_ob - total->ift_ob);
+ printf(" %5u", sum->ift_co - total->ift_co);
if (dflag)
- printf(" %5d", sum->ift_dr - total->ift_dr);
+ printf(" %5u", sum->ift_dr - total->ift_dr);
}
*total = *sum;
putchar('\n');
OpenPOWER on IntegriCloud