# HG changeset patch # User nickg # Date 1047926404 0 # Node ID 0b41b42148e933878886c0b004bf4538545703c6 # Parent 5fbe5042a14009cfc40bd78f5878781f1ad68231 * src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs to network page. diff --git a/packages/net/httpd/current/ChangeLog b/packages/net/httpd/current/ChangeLog --- a/packages/net/httpd/current/ChangeLog +++ b/packages/net/httpd/current/ChangeLog @@ -1,3 +1,8 @@ +2003-03-17 Nick Garnett + + * src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs + to network page. + 2003-02-24 Jonathan Larmour * cdl/httpd.cdl: Add doc link. diff --git a/packages/net/httpd/current/src/monitor.c b/packages/net/httpd/current/src/monitor.c --- a/packages/net/httpd/current/src/monitor.c +++ b/packages/net/httpd/current/src/monitor.c @@ -107,6 +107,8 @@ #include #include +#include + #include /* ================================================================= */ @@ -1015,6 +1017,89 @@ static cyg_bool cyg_monitor_network( FIL } html_table_end( client ); + html_para_begin( client, "" ); + html_heading(client, 3, "Mbufs" ); + + html_table_begin( client, "border" ); + { + html_table_header( client, "Summary", "" ); + html_table_header( client, "Types", "" ); + + html_table_row_begin( client, "" ); + { + html_table_data_begin( client, "valign=\"top\"" ); + html_table_begin( client, "" ); + { + fprintf( client, "%s%ld\n", "Mbufs", + mbstat.m_mbufs ); + fprintf( client, "%s%ld\n", "Clusters", + mbstat.m_clusters ); + fprintf( client, "%s%ld\n", "Free Clusters", + mbstat.m_clfree ); + fprintf( client, "%s%ld\n", "Drops", + mbstat.m_drops ); + fprintf( client, "%s%ld\n", "Waits", + mbstat.m_wait ); + fprintf( client, "%s%ld\n", "Drains", + mbstat.m_drain ); +#if defined(CYGPKG_NET_FREEBSD_STACK) + fprintf( client, "%s%ld\n", "Copy Fails", + mbstat.m_mcfail ); + fprintf( client, "%s%ld\n", "Pullup Fails", + mbstat.m_mpfail ); +#endif + + } + html_table_end( client ); + + html_table_data_begin( client, "valign=\"top\"" ); + html_table_begin( client, "" ); + { + u_long *mtypes; +#if defined(CYGPKG_NET_FREEBSD_STACK) + mtypes = mbtypes; +#else + mtypes = mbstat.m_mtypes; +#endif + + fprintf( client, "%s%ld\n", "FREE", + mtypes[MT_FREE] ); + fprintf( client, "%s%ld\n", "DATA", + mtypes[MT_DATA] ); + fprintf( client, "%s%ld\n", "HEADER", + mtypes[MT_HEADER] ); +#if !defined(CYGPKG_NET_FREEBSD_STACK) + fprintf( client, "%s%ld\n", "SOCKET", + mtypes[MT_SOCKET] ); + fprintf( client, "%s%ld\n", "PCB", + mtypes[MT_PCB] ); + fprintf( client, "%s%ld\n", "RTABLE", + mtypes[MT_RTABLE] ); + fprintf( client, "%s%ld\n", "HTABLE", + mtypes[MT_HTABLE] ); + fprintf( client, "%s%ld\n", "ATABLE", + mtypes[MT_ATABLE] ); +#endif + fprintf( client, "%s%ld\n", "SONAME", + mtypes[MT_SONAME] ); +#if !defined(CYGPKG_NET_FREEBSD_STACK) + fprintf( client, "%s%ld\n", "SOOPTS", + mtypes[MT_SOOPTS] ); +#endif + fprintf( client, "%s%ld\n", "FTABLE", + mtypes[MT_FTABLE] ); + + /* Ignore the rest for now... */ + + } + html_table_end( client ); + + } + html_table_row_end( client ); + + } + html_table_end( client ); + draw_navbar(client); }