1 #ifndef lint 2 static char sccsid[] = "@(#)mbuf.c 4.1 82/08/25"; 3 #endif 4 5 #include <sys/types.h> 6 #include <sys/mbuf.h> 7 8 struct mbstat mbstat; 9 extern int kmem; 10 11 /* 12 * Print mbuf statistics. 13 */ 14 mbpr(mbaddr) 15 off_t mbaddr; 16 { 17 if (mbaddr == 0) { 18 printf("mbstat: symbol not in namelist\n"); 19 return; 20 } 21 printf("mbufs:"); 22 klseek(kmem, mbaddr, 0); 23 if (read(kmem, &mbstat, sizeof (mbstat)) == sizeof (mbstat)) 24 printf( 25 " mbufs %d mbfree %d clusters %d clfree %d drops %d\n", 26 mbstat.m_mbufs, mbstat.m_mbfree, 27 mbstat.m_clusters, mbstat.m_clfree, mbstat.m_drops); 28 } 29