version 1.5, 1997/06/29 21:46:03 |
version 1.6, 1997/07/23 02:50:55 |
|
|
{ MT_OOBDATA, "oob data" }, |
{ MT_OOBDATA, "oob data" }, |
{ MT_CONTROL, "ancillary data" }, |
{ MT_CONTROL, "ancillary data" }, |
{ MT_HEADER, "packet headers" }, |
{ MT_HEADER, "packet headers" }, |
|
{ MT_SOCKET, "socket structures" }, /* XXX */ |
|
{ MT_PCB, "protocol control blocks" }, /* XXX */ |
|
{ MT_RTABLE, "routing table entries" }, /* XXX */ |
|
{ MT_HTABLE, "IMP host table entries" }, /* XXX */ |
|
{ MT_ATABLE, "address resolution tables" }, |
{ MT_FTABLE, "fragment reassembly queue headers" }, /* XXX */ |
{ MT_FTABLE, "fragment reassembly queue headers" }, /* XXX */ |
{ MT_SONAME, "socket names and addresses" }, |
{ MT_SONAME, "socket names and addresses" }, |
{ MT_SOOPTS, "socket options" }, |
{ MT_SOOPTS, "socket options" }, |
|
{ MT_RIGHTS, "access rights" }, |
|
{ MT_IFADDR, "interface addresses" }, /* XXX */ |
{ 0, 0 } |
{ 0, 0 } |
}; |
}; |
|
|
|
|
totmbufs = 0; |
totmbufs = 0; |
for (mp = mbtypes; mp->mt_name; mp++) |
for (mp = mbtypes; mp->mt_name; mp++) |
totmbufs += mbstat.m_mtypes[mp->mt_type]; |
totmbufs += mbstat.m_mtypes[mp->mt_type]; |
printf("%u mbufs in use:\n", totmbufs); |
printf("%u mbuf%s in use:\n", totmbufs, plural(totmbufs)); |
for (mp = mbtypes; mp->mt_name; mp++) |
for (mp = mbtypes; mp->mt_name; mp++) |
if (mbstat.m_mtypes[mp->mt_type]) { |
if (mbstat.m_mtypes[mp->mt_type]) { |
seen[mp->mt_type] = YES; |
seen[mp->mt_type] = YES; |
printf("\t%u mbufs allocated to %s\n", |
printf("\t%u mbuf%s allocated to %s\n", |
mbstat.m_mtypes[mp->mt_type], mp->mt_name); |
mbstat.m_mtypes[mp->mt_type], |
|
plural((int)mbstat.m_mtypes[mp->mt_type]), |
|
mp->mt_name); |
} |
} |
seen[MT_FREE] = YES; |
seen[MT_FREE] = YES; |
for (i = 0; i < nmbtypes; i++) |
for (i = 0; i < nmbtypes; i++) |
if (!seen[i] && mbstat.m_mtypes[i]) { |
if (!seen[i] && mbstat.m_mtypes[i]) { |
printf("\t%u mbufs allocated to <mbuf type %d>\n", |
printf("\t%u mbuf%s allocated to <mbuf type %d>\n", |
mbstat.m_mtypes[i], i); |
mbstat.m_mtypes[i], |
|
plural((int)mbstat.m_mtypes[i]), i); |
} |
} |
printf("%lu/%lu mapped pages in use\n", |
printf("%lu/%lu mapped pages in use\n", |
mbstat.m_clusters - mbstat.m_clfree, mbstat.m_clusters); |
mbstat.m_clusters - mbstat.m_clfree, mbstat.m_clusters); |