Date: Tue, 15 Apr 1997 18:48:45 +0400 (MSD) From: bag@sinbin.demos.su (Alex G. Bulushev) To: mishania@demos.su Cc: hackers@freebsd.org Subject: Re: mbuf clusters problem in 2.2.1R Message-ID: <199704151448.SAA17603@sinbin.demos.su> In-Reply-To: <199704141643.UAA22556@skraldespand.demos.su> from "Mikhail A. Sokolov" at Apr 14, 97 08:43:55 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> now output of "netstat -m" 11 Apr 13:07 (4 min before crash) > > 14911 mbufs in use: > 13719 mbufs allocated to data > 1176 mbufs allocated to packet headers > 14 mbufs allocated to protocol control blocks > 2 mbufs allocated to socket names and addresses > 11062/11070 mbuf clusters in use > 24003 Kbytes allocated to network (-74% in use) > ^^^^^^^ ?????????????????? i found that negative value is a result of wrong types in netstat sources. Patch attached at the end of this letter ... > > now output of "netstat -m" 11 Apr 13:10 (1 min before crash) > > 18053 mbufs in use: > 16818 mbufs allocated to data > 1219 mbufs allocated to packet headers > 14 mbufs allocated to protocol control blocks > 2 mbufs allocated to socket names and addresses > 14042/14060 mbuf clusters in use > ^^^^^^^^^^^???????????????????????????????????????????? this value not understandable for me now ... NMBCLUSTERS=12288 in kernel config but 14060 > 12288 ............ > 30376 Kbytes allocated to network (-38% in use) > ^^^^????????????????????? now patch to netstat mbuf.c module for negative percents ... this one for 2.2.1R ... ---------------------------------------------------------------- *** mbuf.c Tue Apr 15 17:52:31 1997 --- mbuf.c.orig Tue Apr 15 17:49:22 1997 *************** *** 79,85 **** mbpr(mbaddr) u_long mbaddr; { ! register u_long totmem, totfree, totmbufs; register int i; register struct mbtypes *mp; --- 79,85 ---- mbpr(mbaddr) u_long mbaddr; { ! register int totmem, totfree, totmbufs; register int i; register struct mbtypes *mp; *************** *** 96,119 **** totmbufs = 0; for (mp = mbtypes; mp->mt_name; mp++) totmbufs += mbstat.m_mtypes[mp->mt_type]; ! printf("%lu mbufs in use:\n", totmbufs); for (mp = mbtypes; mp->mt_name; mp++) if (mbstat.m_mtypes[mp->mt_type]) { seen[mp->mt_type] = YES; ! printf("\t%lu mbufs allocated to %s\n", mbstat.m_mtypes[mp->mt_type], mp->mt_name); } seen[MT_FREE] = YES; for (i = 0; i < nmbtypes; i++) if (!seen[i] && mbstat.m_mtypes[i]) { ! printf("\t%lu mbufs allocated to <mbuf type %d>\n", mbstat.m_mtypes[i], i); } printf("%lu/%lu mbuf clusters in use\n", mbstat.m_clusters - mbstat.m_clfree, mbstat.m_clusters); totmem = totmbufs * MSIZE + mbstat.m_clusters * MCLBYTES; totfree = mbstat.m_clfree * MCLBYTES; ! printf("%lu Kbytes allocated to network (%lu%% in use)\n", totmem / 1024, (totmem - totfree) * 100 / totmem); printf("%lu requests for memory denied\n", mbstat.m_drops); printf("%lu requests for memory delayed\n", mbstat.m_wait); --- 96,119 ---- totmbufs = 0; for (mp = mbtypes; mp->mt_name; mp++) totmbufs += mbstat.m_mtypes[mp->mt_type]; ! printf("%u mbufs in use:\n", totmbufs); for (mp = mbtypes; mp->mt_name; mp++) if (mbstat.m_mtypes[mp->mt_type]) { seen[mp->mt_type] = YES; ! printf("\t%u mbufs allocated to %s\n", mbstat.m_mtypes[mp->mt_type], mp->mt_name); } seen[MT_FREE] = YES; for (i = 0; i < nmbtypes; i++) if (!seen[i] && mbstat.m_mtypes[i]) { ! printf("\t%u mbufs allocated to <mbuf type %d>\n", mbstat.m_mtypes[i], i); } printf("%lu/%lu mbuf clusters in use\n", mbstat.m_clusters - mbstat.m_clfree, mbstat.m_clusters); totmem = totmbufs * MSIZE + mbstat.m_clusters * MCLBYTES; totfree = mbstat.m_clfree * MCLBYTES; ! printf("%u Kbytes allocated to network (%d%% in use)\n", totmem / 1024, (totmem - totfree) * 100 / totmem); printf("%lu requests for memory denied\n", mbstat.m_drops); printf("%lu requests for memory delayed\n", mbstat.m_wait);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704151448.SAA17603>