messed up % calculation (should also round probably)
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Tue, 7 Dec 1982 12:43:56 +0000 (04:43 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Tue, 7 Dec 1982 12:43:56 +0000 (04:43 -0800)
SCCS-vsn: usr.bin/netstat/mbuf.c 4.3

usr/src/usr.bin/netstat/mbuf.c

index ee430bc..df20790 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)mbuf.c     4.2 82/12/05";
+static char sccsid[] = "@(#)mbuf.c     4.3 82/12/06";
 #endif
 
 #include <sys/param.h>
 #endif
 
 #include <sys/param.h>
@@ -34,6 +34,5 @@ mbpr(mbaddr)
        totmem = mbstat.m_mbufs * MSIZE + mbstat.m_clusters * CLBYTES;
        totfree = mbstat.m_mbfree * MSIZE + mbstat.m_clusters * CLBYTES;
        printf("\t%dKbytes allocated to network (%d%% in use)\n",
        totmem = mbstat.m_mbufs * MSIZE + mbstat.m_clusters * CLBYTES;
        totfree = mbstat.m_mbfree * MSIZE + mbstat.m_clusters * CLBYTES;
        printf("\t%dKbytes allocated to network (%d%% in use)\n",
-               totmem / 1024,
-               (totmem - totfree + totmem - 1) / totmem);
+               totmem / 1024, (totmem - totfree) * 100 / totmem);
 }
 }