bogus mbuf calculations
authorMike Karels <karels@ucbvax.Berkeley.EDU>
Sat, 17 Nov 1984 09:40:54 +0000 (01:40 -0800)
committerMike Karels <karels@ucbvax.Berkeley.EDU>
Sat, 17 Nov 1984 09:40:54 +0000 (01:40 -0800)
SCCS-vsn: usr.bin/netstat/mbuf.c 4.7

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

index 7a22818..7db5c33 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)mbuf.c     4.6 84/10/05";
+static char sccsid[] = "@(#)mbuf.c     4.7 84/11/16";
 #endif
 
 #include <sys/param.h>
 #endif
 
 #include <sys/param.h>
@@ -59,8 +59,8 @@ mbpr(mbaddr)
                        (mbstat.m_mbufs - mbstat.m_mtypes[MT_FREE]) - totmbufs);
        printf("%d/%d mapped pages in use\n",
                mbstat.m_clusters - mbstat.m_clfree, mbstat.m_clusters);
                        (mbstat.m_mbufs - mbstat.m_mtypes[MT_FREE]) - totmbufs);
        printf("%d/%d mapped pages in use\n",
                mbstat.m_clusters - mbstat.m_clfree, mbstat.m_clusters);
-       totmem = totmbufs * MSIZE + mbstat.m_clusters * CLBYTES;
-       totfree = mbstat.m_mtypes[MT_FREE]*MSIZE + mbstat.m_clusters * CLBYTES;
+       totmem = mbstat.m_mbufs * MSIZE + mbstat.m_clusters * CLBYTES;
+       totfree = mbstat.m_mtypes[MT_FREE]*MSIZE + mbstat.m_clfree * CLBYTES;
        printf("%d Kbytes allocated to network (%d%% in use)\n",
                totmem / 1024, (totmem - totfree) * 100 / totmem);
        printf("%d requests for memory denied\n", mbstat.m_drops);
        printf("%d Kbytes allocated to network (%d%% in use)\n",
                totmem / 1024, (totmem - totfree) * 100 / totmem);
        printf("%d requests for memory denied\n", mbstat.m_drops);