Mercurial > flash_v2
changeset 831:0b41b42148e9
* src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs
to network page.
| author | nickg |
|---|---|
| date | Mon, 17 Mar 2003 18:40:04 +0000 |
| parents | 5fbe5042a140 |
| children | 71beb8096c67 |
| files | packages/net/httpd/current/ChangeLog packages/net/httpd/current/src/monitor.c |
| diffstat | 2 files changed, 90 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/net/httpd/current/ChangeLog +++ b/packages/net/httpd/current/ChangeLog @@ -1,3 +1,8 @@ +2003-03-17 Nick Garnett <nickg@balti.calivar.com> + + * src/monitor.c (cyg_monitor_network): Added monitoring of Mbufs + to network page. + 2003-02-24 Jonathan Larmour <jifl@eCosCentric.com> * cdl/httpd.cdl: Add doc link.
--- a/packages/net/httpd/current/src/monitor.c +++ b/packages/net/httpd/current/src/monitor.c @@ -107,6 +107,8 @@ #include <netinet/udp_var.h> #include <netinet/tcp_var.h> +#include <sys/mbuf.h> + #include <cyg/io/eth/eth_drv_stats.h> /* ================================================================= */ @@ -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, "<tr><td>%s<td>%ld</tr>\n", "Mbufs", + mbstat.m_mbufs ); + fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Clusters", + mbstat.m_clusters ); + fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Free Clusters", + mbstat.m_clfree ); + fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Drops", + mbstat.m_drops ); + fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Waits", + mbstat.m_wait ); + fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Drains", + mbstat.m_drain ); +#if defined(CYGPKG_NET_FREEBSD_STACK) + fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "Copy Fails", + mbstat.m_mcfail ); + fprintf( client, "<tr><td>%s<td>%ld</tr>\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, "<tr><td>%s<td>%ld</tr>\n", "FREE", + mtypes[MT_FREE] ); + fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "DATA", + mtypes[MT_DATA] ); + fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "HEADER", + mtypes[MT_HEADER] ); +#if !defined(CYGPKG_NET_FREEBSD_STACK) + fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "SOCKET", + mtypes[MT_SOCKET] ); + fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "PCB", + mtypes[MT_PCB] ); + fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "RTABLE", + mtypes[MT_RTABLE] ); + fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "HTABLE", + mtypes[MT_HTABLE] ); + fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "ATABLE", + mtypes[MT_ATABLE] ); +#endif + fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "SONAME", + mtypes[MT_SONAME] ); +#if !defined(CYGPKG_NET_FREEBSD_STACK) + fprintf( client, "<tr><td>%s<td>%ld</tr>\n", "SOOPTS", + mtypes[MT_SOOPTS] ); +#endif + fprintf( client, "<tr><td>%s<td>%ld</tr>\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); }
