=/^G show total bytes now; document may not always work
[unix-history] / usr / src / usr.bin / netstat / mbuf.c
index 5869df3..f8889f0 100644 (file)
@@ -1,12 +1,23 @@
 /*
 /*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+ * Copyright (c) 1983, 1988 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)mbuf.c     5.3 (Berkeley) %G%";
-#endif not lint
+static char sccsid[] = "@(#)mbuf.c     5.6 (Berkeley) %G%";
+#endif /* not lint */
 
 #include <stdio.h>
 #include <sys/param.h>
 
 #include <stdio.h>
 #include <sys/param.h>
@@ -30,7 +41,6 @@ static struct mbtypes {
        { MT_ATABLE,    "address resolution tables" },
        { MT_FTABLE,    "fragment reassembly queue headers" },
        { MT_SONAME,    "socket names and addresses" },
        { MT_ATABLE,    "address resolution tables" },
        { MT_FTABLE,    "fragment reassembly queue headers" },
        { MT_SONAME,    "socket names and addresses" },
-       { MT_ZOMBIE,    "zombie process information" },
        { MT_SOOPTS,    "socket options" },
        { MT_RIGHTS,    "access rights" },
        { MT_IFADDR,    "interface addresses" }, 
        { MT_SOOPTS,    "socket options" },
        { MT_RIGHTS,    "access rights" },
        { MT_IFADDR,    "interface addresses" }, 
@@ -85,9 +95,7 @@ mbpr(mbaddr)
                        (mbstat.m_mbufs - mbstat.m_mtypes[MT_FREE]) - totmbufs);
        printf("%u/%u mapped pages in use\n",
                mbstat.m_clusters - mbstat.m_clfree, mbstat.m_clusters);
                        (mbstat.m_mbufs - mbstat.m_mtypes[MT_FREE]) - totmbufs);
        printf("%u/%u mapped pages in use\n",
                mbstat.m_clusters - mbstat.m_clfree, mbstat.m_clusters);
-       printf("%u interface pages allocated\n", mbstat.m_space);
-       totmem = mbstat.m_mbufs * MSIZE + mbstat.m_clusters * CLBYTES +
-           mbstat.m_space * CLBYTES;
+       totmem = mbstat.m_mbufs * MSIZE + mbstat.m_clusters * CLBYTES;
        totfree = mbstat.m_mtypes[MT_FREE]*MSIZE + mbstat.m_clfree * CLBYTES;
        printf("%u Kbytes allocated to network (%d%% in use)\n",
                totmem / 1024, (totmem - totfree) * 100 / totmem);
        totfree = mbstat.m_mtypes[MT_FREE]*MSIZE + mbstat.m_clfree * CLBYTES;
        printf("%u Kbytes allocated to network (%d%% in use)\n",
                totmem / 1024, (totmem - totfree) * 100 / totmem);