示例#1
0
static void html_map( void )
{
	TABLE_START( opf );
	os_fprintf( opf, "<tr><th>Server Name</th><th>Users/Max</th><th>Opers/Max</th><th>Ping/Max</th></tr>" );
	ProcessServerMap( HTMLMapHandler, StatServ.exclusions, NULL );
	TABLE_END( opf );
}
示例#2
0
static void html_clientstats( void )
{
	TABLE_START( opf );
	os_fprintf( opf, "<tr><th>Version</th><th align=right>Count</th></tr>" );
	GetClientStats( HTMLClientVersionReport, 10, NULL );
	TABLE_END( opf );
}
示例#3
0
static void html_tldmap( void )
{
	TABLE_START( opf );
	os_fprintf( opf, "<tr><th>tld</th><th>Country</th><th>Current</th><th>Day</th><th>Week</th><th>Month</th><th>All Time</th></tr>" );
	GetTLDStats( HTMLTLDReport, NULL );
	TABLE_END( opf );
}
示例#4
0
static void html_channeltop10kicks( void )
{
	TABLE_START( opf );
	os_fprintf( opf, "<tr><th>Channel</th><th>Total Kicks</th></tr>" );
	GetChannelStats( top10kickshandler, CHANNEL_SORT_KICKS, 10, 1, NULL );
	TABLE_END( opf );
}
示例#5
0
static void html_channeltop10topics( void )
{
	TABLE_START( opf );
	os_fprintf( opf, "<tr><th>Channel</th><th>Total Topics</th></tr>" );
	GetChannelStats( top10topicshandler, CHANNEL_SORT_TOPICS, 10, 1, NULL );
	TABLE_END( opf );
}
示例#6
0
static void html_channeltop10members( void )
{
	TABLE_START( opf );
	os_fprintf( opf, "<tr><th>Channel</th><th align=right>Members</th></tr>" );
	GetChannelStats( top10membershandler, CHANNEL_SORT_MEMBERS, 10, 1, NULL );
	TABLE_END( opf );
}
示例#7
0
static void html_channeltop10joins( void )
{
	TABLE_START( opf );
	os_fprintf( opf, "<tr><th>Channel</th><th align=right>Total Joins</th></tr>" );
	GetChannelStats( top10joinshandler, CHANNEL_SORT_JOINS, 10, 1, NULL );
	TABLE_END( opf );
}
示例#8
0
static void html_monthlystats( void )
{
	TABLE_START( opf );
	os_fprintf( opf, "<tr><th><b></b></th><th><b>Total</b><th><b>Current</b><th><b>Average</b></th><th><b>Max</b></th><th><b>Max Time</b></th></tr>\n" );
	os_fprintf( opf, "<tr><td>Users:</td>\n" );
	os_fprintf( opf, "<td>%-2d</td>\n", networkstats.users.monthly.runningtotal );
	os_fprintf( opf, "<td>%-2d (%d%%)</td>\n", networkstats.users.current,
		GetMonthlyPercent( &networkstats.users ) );
	os_fprintf( opf, "<td>%-2d</td>\n", networkstats.users.monthly.average );
	os_fprintf( opf, "<td>%-2d</td>\n", networkstats.users.monthly.max );
	os_fprintf( opf, "<td>%s</td></tr>\n", sftime( networkstats.users.monthly.ts_max ) );
	os_fprintf( opf, "<tr><td>Channels:</td>\n" );
	os_fprintf( opf, "<td>%-2d</td>\n", networkstats.channels.monthly.runningtotal );
	os_fprintf( opf, "<td>%-2d (%d%%)</td>\n", networkstats.channels.current,
		GetMonthlyPercent( &networkstats.channels ) );
	os_fprintf( opf, "<td>%-2d</td>\n", networkstats.channels.monthly.average );
	os_fprintf( opf, "<td>%-2d</td>\n", networkstats.channels.monthly.max );
	os_fprintf( opf, "<td>%s</td></tr>\n", sftime( networkstats.channels.monthly.ts_max ) );
	os_fprintf( opf, "<tr><td>Opers:</td>\n" );
	os_fprintf( opf, "<td>%-2d</td>\n", networkstats.opers.monthly.runningtotal );
	os_fprintf( opf, "<td>%-2d (%d%%)</td>\n", networkstats.opers.current,
		GetMonthlyPercent( &networkstats.opers ) );
	os_fprintf( opf, "<td>%-2d</td>\n", networkstats.opers.monthly.average );
	os_fprintf( opf, "<td>%-2d</td>\n", networkstats.opers.monthly.max );
	os_fprintf( opf, "<td>%s</td></tr>\n", sftime( networkstats.opers.monthly.ts_max ) );
	os_fprintf( opf, "<tr><td>Servers:</td>\n" );
	os_fprintf( opf, "<td>%-2d</td>\n", networkstats.servers.monthly.runningtotal );
	os_fprintf( opf, "<td>%-2d (%d%%)</td>\n", networkstats.servers.current,
		GetMonthlyPercent( &networkstats.servers ) );
	os_fprintf( opf, "<td>%-2d</td>\n", networkstats.servers.monthly.average );
	os_fprintf( opf, "<td>%-2d</td>\n", networkstats.servers.monthly.max );
	os_fprintf( opf, "<td>%s</td></tr>\n", sftime( networkstats.servers.monthly.ts_max ) );
	TABLE_END( opf );
}
示例#9
0
static void html_srvlist( void )
{
	TABLE_START( opf );
	os_fprintf( opf, "<tr><th colspan = 2>Server name</th></tr>" );
	GetServerStats( serverlisthandler, NULL );
	TABLE_END( opf );
}
示例#10
0
文件: util_funcs.c 项目: OPSF/uClinux
int
check_and_reload_table(struct internal_mib_table *table)
{
    /*
     * If the saved data is fairly recent,
     *    we don't need to reload it
     */
    if (table->cache_marker &&
        !(atime_ready(table->cache_marker, table->cache_timeout * 1000)))
        return 1;


    /*
     * Call the routine provided to read in the data
     *
     * N.B:  Update the cache marker *before* calling
     *   this routine, to avoid problems with recursion
     */
    if (!table->cache_marker)
        table->cache_marker = atime_newMarker();
    else
        atime_setMarker(table->cache_marker);

    table->next_index = 1;
    if (table->reload((mib_table_t) table) < 0) {
        free(table->cache_marker);
        table->cache_marker = NULL;
        return 0;
    }
    table->current_index = 1;
    if (table->compare != NULL) /* Sort the table */
        qsort(TABLE_START(table), table->next_index-1,
              table->data_size, table->compare);
    return 1;
}
示例#11
0
static void html_netstats( void )
{
	TABLE_START( opf );
	os_fprintf( opf, "<tr><th><b></b></th><th><b>Total</b></th><th><b>Current</b></th><th><b>Average</b></th><th><b>Max</b></th><th><b>Max Time</b></th></tr>\n" );
	os_fprintf( opf, "<tr><td>Users:</td>\n" );
	os_fprintf( opf, "<td>%d</td>\n", networkstats.users.alltime.runningtotal );
	os_fprintf( opf, "<td>%d (%d%%)</td>\n", networkstats.users.current,
		GetAllTimePercent( &networkstats.users ) );
	os_fprintf( opf, "<td>%d</td>\n", networkstats.users.alltime.average );
	os_fprintf( opf, "<td>%d</td>\n", networkstats.users.alltime.max );
	os_fprintf( opf, "<td>%s</td></tr>\n", sftime( networkstats.users.alltime.ts_max ) );
	os_fprintf( opf, "<tr><td>Channels:</td>\n" );
	os_fprintf( opf, "<td>%d</td>\n", networkstats.channels.alltime.runningtotal );
	os_fprintf( opf, "<td>%i (%d%%)</td>\n", networkstats.channels.current,
		GetAllTimePercent( &networkstats.channels ) );
	os_fprintf( opf, "<td>%i</td>\n", networkstats.channels.alltime.average );
	os_fprintf( opf, "<td>%d</td>\n", networkstats.channels.alltime.max );
	os_fprintf( opf, "<td>%s</td></tr>\n", sftime( networkstats.channels.alltime.ts_max ) );
	os_fprintf( opf, "<tr><td>Opers:</td>\n" );
	os_fprintf( opf, "<td>%d</td>\n", networkstats.opers.alltime.runningtotal );
	os_fprintf( opf, "<td>%i (%d%%)</td>\n", networkstats.opers.current,
		GetAllTimePercent( &networkstats.opers ) );
	os_fprintf( opf, "<td>%i</td>\n", networkstats.opers.alltime.average );
	os_fprintf( opf, "<td>%i</td>\n", networkstats.opers.alltime.max );
	os_fprintf( opf, "<td>%s</td></tr>\n", sftime( networkstats.opers.alltime.ts_max ) );
	os_fprintf( opf, "<tr><td>Servers:</td>\n" );
	os_fprintf( opf, "<td>%d</td>\n", networkstats.servers.alltime.runningtotal );
	os_fprintf( opf, "<td>%d (%d%%)</td>\n", networkstats.servers.current,
		GetAllTimePercent( &networkstats.servers ) );
	os_fprintf( opf, "<td>%d</td>\n", networkstats.servers.alltime.average );
	os_fprintf( opf, "<td>%d</td>\n", networkstats.servers.alltime.max );
	os_fprintf( opf, "<td>%s</td></tr>\n", sftime( networkstats.servers.alltime.ts_max ) );
	os_fprintf( opf, "<tr><td colspan=\"3\">Users Set Away:</td>\n" );
	os_fprintf( opf, "<td colspan=\"3\">%d</td></tr>\n", NSGetAwayCount() );
	TABLE_END( opf );
}
示例#12
0
static void html_srvlistdet( void )
{
	TABLE_START( opf );
	GetServerStats( serverlistdetailhandler, NULL );
	TABLE_END( opf );
}