SCCS-vsn: usr.bin/netstat/mbuf.c 4.4
-static char sccsid[] = "@(#)mbuf.c 4.3 82/12/06";
+static char sccsid[] = "@(#)mbuf.c 4.4 82/12/09";
#endif
#include <sys/param.h>
#endif
#include <sys/param.h>
printf("mbstat: symbol not in namelist\n");
return;
}
printf("mbstat: symbol not in namelist\n");
return;
}
- printf("memory utilization:\n");
klseek(kmem, mbaddr, 0);
if (read(kmem, &mbstat, sizeof (mbstat)) != sizeof (mbstat)) {
printf("mbstat: bad read\n");
return;
}
klseek(kmem, mbaddr, 0);
if (read(kmem, &mbstat, sizeof (mbstat)) != sizeof (mbstat)) {
printf("mbstat: bad read\n");
return;
}
- printf("\t%d/%d mbufs in use\n", mbstat.m_mbufs - mbstat.m_mbfree,
+ printf("%d/%d mbufs in use\n", mbstat.m_mbufs - mbstat.m_mbfree,
- printf("\t%d/%d mapped pages in use\n",
+ printf("%d/%d mapped pages in use\n",
mbstat.m_clusters - mbstat.m_clfree, mbstat.m_clusters);
mbstat.m_clusters - mbstat.m_clfree, mbstat.m_clusters);
- printf("\t%d requests for memory denied\n", mbstat.m_drops);
+ printf("%d requests for memory denied\n", mbstat.m_drops);
totmem = mbstat.m_mbufs * MSIZE + mbstat.m_clusters * CLBYTES;
totfree = mbstat.m_mbfree * MSIZE + mbstat.m_clusters * CLBYTES;
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",
+ printf("%dKbytes allocated to network (%d%% in use)\n",
totmem / 1024, (totmem - totfree) * 100 / totmem);
}
totmem / 1024, (totmem - totfree) * 100 / totmem);
}