##  innreport-display.conf -- Display configuration file for innreport
##
##  Used to parameterize text and HTML daily reports.
##
##  If you want to modify this file, rename it to another name (otherwise it
##  will be overwritten each time you update INN), and set that name in the
##  display_conf_file option in innreport.conf.
##
##  See the innreport.conf manual page for more information.

###########################################################################
# Index page
section index {
    column {
        title         "Dates";
        value         "date";
    };
    column {
        title         "Incoming feeds";
        name          "Offered|Accepted|Volume";
        value         "total(%innd_offered) | total(%innd_accepted) |
                       bytes(total(%inn_flow_size))";
    };
    column {
        title         "Outgoing feeds";
        name          "Offered|Accepted|Volume";
        value         "total(%innfeed_offered) + total(%nntplink_offered) +
                       total(%innxbatch_offered) + total(%innxmit_offered) |
                       total(%innfeed_accepted) + total(%nntplink_accepted) +
                       total(%innxbatch_accepted) + total(%innxmit_accepted) |
                       bytes(total(%innfeed_accepted_size) +
                       total(%innfeed_rejected_size) +
                       total(%innxbatch_accepted_size) +
                       total(%innxbatch_rejected_size) +
                       total(%innxmit_accepted_size) +
                       total(%innxmit_rejected_size))";
    };
    graph {
        title         "Incoming feeds";
        value         val1;
        color         "#FFFFCE";
        unit          "art";
        data {
            name        "Offered";
            color       "#50A0D0";
            value       "val2";          # Incoming feeds: Offered
        };
        data {
            name        "Accepted";
            color       "#0000FF";
            value       "val3";          # Incoming feeds: Accepted
        };
    };
    graph {
        title         "Outgoing feeds";
        value         val1;
        color         "#FFFFCE";
        unit          "art";
        data {
            name        "Offered";
            color       "#50A0D0";
            value       "val5";          # Outgoing feeds: Offered
        };
        data {
            name        "Accepted";
            color       "#0000FF";
            value       "val6";          # Outgoing feeds: Accepted
        };
    };
    graph {
        title         "Bandwidth";
        value         val1;
        color         "#FFFFCE";
        unit          "Kb";
        data {
            name        "Incoming";
            color       "#50A0D0";
            value       "byte(val4)";    # Incoming feeds: Volume
        };
        data {
            name        "Outgoing";
            color       "#0000FF";
            value       "byte(val7)";    # Outgoing feeds: Volume
        };
    };
};

###########################################################################
# Report

section prog_type {
   #skip      true;              # used to skip a section.
    title     "Log entries by program:";
    data      "%prog_type";
    sort      "$prog_type{$b} <=> $prog_type{$a} or $a cmp $b";
   #text      false;             # to skip this section in the text report
   #html      false;             # to skip this section in the HTML report
    column {
        name          "Program name";
        format        "%-46.46s";
        value         "$key";
        format_total  "TOTAL: %-39.39s";
        total         "$num";
    };
    column {
        name          "Lines";
        format_name   "%7s";
        format        "%7d";
       #text          false;   # to skip this column in the text report
        value         "$prog_type{$key}";
        total         "total(%prog_type)";
    };
    column {
        name          "%Lines";
        format_name   "%7s";
        format        "%6.1f%%";
       #html          false;   # to skip this column in the HTML report
        value         "$prog_type{$key} / total(%prog_type) * 100";
        total         "100";
    };
    column {
        name          "Size";
        format        "%9s";
        value         "bytes($prog_size{$key})";
        total         "bytes(total(%prog_size))";
    };
    column {
        name          "%Size";
        format_name   "%6s";
        format        "%5.1f%%";
        value         "$prog_size{$key} / total(%prog_size) * 100";
        total         "100";
    };
};

section innd_his {
    title     "History cache:";
    data      "%innd_his";
    sort      "$innd_his{$b} <=> $innd_his{$a}";
    column {
        name          "Reason";
        format        "%-57.57s";
        value         "$key";
        format_total  "TOTAL: %-50.50s";
        total         "$num";
    };
    column {
        name          "Count";
        format_name   "%10s";
        format        "%10d";
        value         "$innd_his{$key}";
        total         "total(%innd_his)";
    };
    column {
        name          "%Count";
        format_name   "%10s";
        format        "%9.1f%%";
        value         "100 * $innd_his{$key} / total(%innd_his)";
        total         "100";
    };
};

section innd_timer {
    title     "innd timer:";
    data      "%innd_time_time";
    column {
        name          "Code region";
        format        "%-15.15s";
        value         "$key";
        format_total  "TOTAL: %-8.8s";
        total         "$num";
    };
    column {
        name          "Time";
        format        "%13s";
        value         "time_ms($innd_time_time{$key})";
        total         "time_ms(total(%innd_time_time))";
    };
    column {
        name          "Pct";
        format_name   "%6s";
        format        "%5.1f%%";
        value         "100 * $innd_time_time{$key} / $innd_time_times";
        total         "100 * total(%innd_time_time) / $innd_time_times";
    };
    column {
        name          "Invoked";
        format        "%10s";
        value         "$innd_time_num{$key}";
        format_total  "%9s-";
        total         "";
    };
    column {
        name          "Min(ms)";
        format_name   "%9s";
        format        "%9.3f";
        value         "$innd_time_min{$key}";
        format_total  "%8s-";
        total         "";
    };
    column {
        name          "Avg(ms)";
        format_name   "%10s";
        format        "%10.3f";
        value         "$innd_time_time{$key} /
                       ($innd_time_num{$key} ? $innd_time_num{$key} : 1)";
        format_total  "%9s-";
        total         "";
    };
    column {
        name          "Max(ms)";
        format_name   "%10s";
        format        "%10.3f";
        value         "$innd_time_max{$key}";
        format_total  "%9s-";
        total         "";
    };
};

section innfeed_timer {
    title     "innfeed timer:";
    data      "%innfeed_time_time";
    column {
        name          "Code region";
        format        "%-15.15s";
        value         "$key";
        format_total  "TOTAL: %-8.8s";
        total         "$num";
    };
    column {
        name          "Time";
        format        "%13s";
        value         "time_ms($innfeed_time_time{$key})";
        total         "time_ms(total(%innfeed_time_time))";
    };
    column {
        name          "Pct";
        format_name   "%6s";
        format        "%5.1f%%";
        value         "100 * $innfeed_time_time{$key} / $innfeed_time_times";
        total         "100 * total(%innfeed_time_time) / $innfeed_time_times";
    };
    column {
        name          "Invoked";
        format        "%10s";
        value         "$innfeed_time_num{$key}";
        format_total  "%9s-";
        total         "";
    };
    column {
        name          "Min(ms)";
        format_name   "%9s";
        format        "%9.3f";
        value         "$innfeed_time_min{$key}";
        format_total  "%8s-";
        total         "";
    };
    column {
        name          "Avg(ms)";
        format_name   "%10s";
        format        "%10.3f";
        value         "$innfeed_time_time{$key} /
                       ($innfeed_time_num{$key} ? $innfeed_time_num{$key} : 1)";
        format_total  "%9s-";
        total         "";
    };
    column {
        name          "Max(ms)";
        format_name   "%10s";
        format        "%10.3f";
        value         "$innfeed_time_max{$key}";
        format_total  "%9s-";
        total         "";
    };
};

section nnrpd_timer {
    title     "nnrpd timer:";
    data      "%nnrpd_time_time";
    column {
        name          "Code region";
        format        "%-15.15s";
        value         "$key";
        format_total  "TOTAL: %-8.8s";
        total         "$num";
    };
    column {
        name          "Time";
        format        "%13s";
        value         "time_ms($nnrpd_time_time{$key})";
        total         "time_ms(total(%nnrpd_time_time))";
    };
    column {
        name          "Pct";
        format_name   "%6s";
        format        "%5.1f%%";
        value         "100 * $nnrpd_time_time{$key} / $nnrpd_time_times";
        total         "100 * total(%nnrpd_time_time) / $nnrpd_time_times";
    };
    column {
        name          "Invoked";
        format        "%10s";
        value         "$nnrpd_time_num{$key}";
        format_total  "%9s-";
        total         "";
    };
    column {
        name          "Min(ms)";
        format_name   "%9s";
        format        "%9.3f";
        value         "$nnrpd_time_min{$key}";
        format_total  "%8s-";
        total         "";
    };
    column {
        name          "Avg(ms)";
        format_name   "%10s";
        format        "%10.3f";
        value         "$nnrpd_time_time{$key} /
                       ($nnrpd_time_num{$key} ? $nnrpd_time_num{$key} : 1)";
        format_total  "%9s-";
        total         "";
    };
    column {
        name          "Max(ms)";
        format_name   "%10s";
        format        "%10.3f";
        value         "$nnrpd_time_max{$key}";
        format_total  "%9s-";
        total         "";
    };
};

section innd_control {
    title     "Control commands to innd:";
    data      "%innd_control";
    column {
        name          "Command";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Number";
        format_name   "%7s";
        value         "$innd_control{$key}";
        format        "%7d";
        total         "total(%innd_control)";
    };
};

section innd_newgroup {
    title     "Newsgroups created:";
    data      "%innd_newgroup";
    column {
        name          "Group";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL%-66.66s";
        total         "";
    };
    column {
        name          "Mode";
        value         "$innd_newgroup{$key}";
        format        "%7s";
        total         "$num";
    };
};

section innd_changegroup {
    title     "Newsgroups changed:";
    data      "%innd_changegroup";
    column {
        name          "Group";
        format        "%-68.68s";
        value         "$key";
        format_total  "TOTAL%-63.63s";
        total         "";
    };
    column {
        name          "New mode";
        format        "%10s";
        value         "$innd_changegroup{$key}";
        total         "$num";
    };
};

section innd_rmgroup {
    title     "Newsgroups removed:";
    data      "%innd_rmgroup";
    column {
        name          "Group";
        format        "%-78.78s";
        value         "$key";
        format_total  "TOTAL: %-71.71s";
        total         "$num";
    };
};

section controlchan {
    title     "Control channel:";
    data      "%controlchan_who";
    column {
        name          "Sender";
        format        "%-25.25s";
        value         "$key";
        format_total  "TOTAL%-20.20s";
        total         "";
    };
    column {
        name          "newgroup";
        value         "$controlchan_new{$key}";
        format        "%8s";
        total         "total(%controlchan_new)";
    };
    column {
        name          "rmgroup";
        value         "$controlchan_rm{$key}";
        format        "%8s";
        total         "total(%controlchan_rm)";
    };
    column {
        name          "Other";
        value         "$controlchan_other{$key}";
        format        "%8s";
        total         "total(%controlchan_other)";
    };
    column {
        name          "Bad PGP";
        value         "$controlchan_skippgp{$key}";
        format        "%8s";
        total         "total(%controlchan_skippgp)";
    };
    column {
        name          "DoIt";
        value         "$controlchan_doit{$key}";
        format        "%8s";
        total         "total(%controlchan_doit)";
    };
    column {
        name          "OK";
        value         "$controlchan_ok{$key}";
        format        "%8s";
        total         "total(%controlchan_ok)";
    };
};

section innd_connect {
    title     "Incoming feeds (innd):";
    data      "%innd_seconds_sum";
    sort      "$innd_accepted_sum{$b} <=> $innd_accepted_sum{$a}
               or $innd_offered_sum{$b} <=> $innd_offered_sum{$a}
               or $a cmp $b";
    numbering true;
    column {
        name          "Server";
        format_name   "%-21.21s";
        format        "%-24.24s";
        value         "$key";
        format_total  "TOTAL: %-17.17s";
        total         "$num";
    };
    column {
        name          "Connects";
        format_name   "%5s";
        format        "%5d";
        value         "$innd_connect_sum{$key}";
        total         "total(%innd_connect_sum)";
    };
    column {
        name          "Offered";
        format_name   "%8s";
        format        "%8d";
        value         "$innd_offered_sum{$key}";
        total         "total(%innd_offered_sum)";
    };
    column {
        name          "Taken";
        format_name   "%7s";
        format        "%7d";
        value         "$innd_accepted_sum{$key}";
        total         "total(%innd_accepted_sum)";
    };
    column {
        name          "Refused";
        format_name   "%7s";
        format        "%7d";
        value         "$innd_refused_sum{$key}";
        total         "total(%innd_refused_sum)";
    };
    column {
        name          "Reject";
        format_name   "%7s";
        format        "%7d";
        value         "$innd_rejected_sum{$key}";
        total         "total(%innd_rejected_sum)";
    };
    column {
        name          "%Accpt";
        format_name   "%6s";
        format        "%4d%%";
        value         "$innd_offered_sum{$key} == 0 ? 0 :
                       ($innd_accepted_sum{$key} /
                        $innd_offered_sum{$key} * 100)";
        total         "total(%innd_offered_sum) == 0 ? 0 :
                       (total(%innd_accepted_sum) /
                        total(%innd_offered_sum)) * 100";
    };
    column {
        name          "Elapsed";
        format_name   "%8s";
        format        "%9s";
        value         "time($innd_seconds_sum{$key})";
        total         "time(total(%innd_seconds_sum))";
    };
    graph {
        title         "Articles received by server";
        type          histo3d;
        sort          "%innd_accepted_sum";
        data {
            name        "Articles accepted";
            color       "#0000FF";
            value       "%innd_accepted_sum";
        };
        data {
            name        "Articles refused";
            color       "#FFAF00";
            value       "%innd_refused_sum";
        };
        data {
            name        "Articles rejected";
            color       "#FF0000";
            value       "%innd_rejected_sum";
        };
    };
};

section innd_incoming_vol {
    title     "Incoming volume (innd):";
    data      "%innd_seconds_sum";
    sort      "$innd_stored_size_sum{$b} <=> $innd_stored_size_sum{$a}
               or $a cmp $b";
    numbering true;
    column {
        name          "Server";
        format        "%-24.24s";
        value         "$key";
        format_total  "TOTAL: %-17.17s";
        total         "$num";
    };
    column {
        name          "AcceptVol";
        format        "%9s";
        value         "bytes($innd_stored_size_sum{$key})";
        total         "bytes(total(%innd_stored_size_sum))";
    };
    column {
        name          "DupVol";
        format        "%9s";
        value         "bytes($innd_duplicated_size_sum{$key})";
        total         "bytes(total(%innd_duplicated_size_sum))";
    };
    column {
        name          "RejVol";
        format        "%9s";
        value         "bytes($innd_rejected_size_sum{$key})";
        total         "bytes(total(%innd_rejected_size_sum))";
    };
    column {
        name          "TotalVol";
        format        "%9s";
        value         "bytes($innd_stored_size_sum{$key} +
                             $innd_duplicated_size_sum{$key} +
                             $innd_rejected_size_sum{$key})";
        total         "bytes(total(%innd_stored_size_sum) +
                             total(%innd_duplicated_size_sum) +
                             total(%innd_rejected_size_sum))";
    };
    column {
        name          "%Acc";
        format_name   "%4s";
        format        "%3d%%";
        value         "$innd_offered_size_sum{$key} == 0 ? 0 :
                       $innd_stored_size_sum{$key}
                       / $innd_offered_size_sum{$key} * 100";
        total         "total(%innd_offered_size_sum) == 0 ? 0 :
                       (total(%innd_stored_size_sum) /
                        total(%innd_offered_size_sum)) * 100";
    };
    column {
        name          "Vol/Art";
        format        "%9s";
        value         "bytes(($innd_stored_size_sum{$key} +
                              $innd_duplicated_size_sum{$key} +
                              $innd_rejected_size_sum{$key}) /
                              ($innd_accepted_sum{$key} +
                               $innd_rejected_sum{$key}))";
        total         "bytes((total(%innd_stored_size_sum) +
                              total(%innd_duplicated_size_sum) +
                              total(%innd_rejected_size_sum)) /
                              (total(%innd_accepted_sum) +
                               total(%innd_rejected_sum)))";
    };
    graph {
        title         "Incoming volume received by server";
        type          histo3d;
        sort          "%innd_stored_size_sum";
        data {
            name        "Accepted Volume";
            color       "#0000FF";
            value       "%innd_stored_size_sum";
        };
        data {
            name        "Duplicated Volume";
            color       "#FFAF00";
            value       "%innd_duplicated_size_sum";
        };
        data {
            name        "Rejected Volume";
            color       "#FF0000";
            value       "%innd_rejected_size_sum";
        };
    };
};

section inn_flow {
    title     "Incoming articles (innd):";
    data      "%inn_flow";
    sort      "&DateCompare";
    column {
        name          "Date";
        format        "%-27.27s";
        value         "$key";
        format_total  "TOTAL: %-20.20s";
        total         "time(total(%inn_flow_time))";
    };
    column {
        name          "Articles";
        format_name   "%8s";
        value         "$inn_flow{$key}";
        format        "%8d";
        total         "total(%inn_flow)";
    };
    column {
        name          "%Arts";
        format_name   "%8s";
        value         "$inn_flow{$key} / $inn_flow_total * 100";
        format        "%7.1f%%";
        total         "100";
    };
    column {
        name          "Art/sec";
        format_name   "%7s";
        value         "$inn_flow{$key} / $inn_flow_time{$key}";
        format        "%7.2f";
        total         "total(%inn_flow) / total(%inn_flow_time)";
    };
    column {
        name          "Size";
        value         "bytes($inn_flow_size{$key})";
        format        "%9s";
        total         "bytes(total(%inn_flow_size))";
    };
    column {
        name          "%Size";
        format_name   "%7s";
        value         "$inn_flow_size{$key} / total(%inn_flow_size) * 100";
        format        "%6.1f%%";
        total         "100";
    };
    column {
        name          "KB/sec";
        format_name   "%7s";
        value         "$inn_flow_size{$key} / $inn_flow_time{$key} / 1024";
        format        "%7.2f";
        total         "total(%inn_flow_size) / total(%inn_flow_time) / 1024";
    };
    graph {
        title         "Incoming articles";
        type          histo;
        data {
            name        "Hours";
            value       "%inn_flow_labels";
        };
        data {
            name        "Art/sec";
            factor      3600;
            value       "%inn_flow";
        };
    };
    graph {
        title         "Incoming articles (size)";
        type          histo;
        data {
            name        "Hours";
            value       "%inn_flow_labels";
        };
        data {
            name        "Kb/sec";
            factor      3686400;     # 3600 * 1024
            value       "%inn_flow_size";
        };
    };
};

section cnfsstat {
    title     "CNFS buffer status:";
    data      "%cnfsstat";
    column {
        name          "Buffer";
        format        "%-13.13s";
        value         "$key";
        format_total  "TOTAL: %-6.6s";
        total         "$num";
    };
    column {
        name          "Class";
        format        "%-13.13s";
        value         "$cnfsstat{$key}";
        format_total  "-%12s";
        total         "";
    };
    column {
        name          "Size";
        format        "%9s";
        value         "bytes($cnfsstat_size{$key})";
        total         "bytes(total(%cnfsstat_size))";
    };
    column {
        name          "Used";
        format        "%9s";
        value         "bytes($cnfsstat_used{$key})";
        total         "bytes(total(%cnfsstat_used))";
    };
    column {
        name          "%Used";
        format_name   "%7s";
        value         "$cnfsstat_used{$key} / $cnfsstat_size{$key} * 100";
        format        "%6.1f%%";
        total         "total(%cnfsstat_used) / total(%cnfsstat_size) * 100";
    };
    column {
        name          "Cycles";
        format_name   "%6s";
        format        "%6d";
        value         "$cnfsstat_cycles{$key}";
        total         "total(%cnfsstat_cycles)";
    };
    column {
        name          "KB/sec";
        format_name   "%7s";
        value         "$cnfsstat_rate{$key} / $cnfsstat_samples{$key} / 1024";
        format        "%7.2f";
        total         "total(%cnfsstat_rate) / total(%cnfsstat_samples) / 1024";
    };
    column {
        name          "Days";
        format_name   "%8s";
        value         "$cnfsstat_size{$key} /
                       ($cnfsstat_rate{$key}
                        / $cnfsstat_samples{$key}) / 86400";
        format        "%8.2f";
        format_total  "%7s-";
        total         "";
    };
};

section inn_unwanted {
    title     "Sites sending bad articles:";
    data      "%inn_badart";
    sort      "$inn_badart{$b} <=> $inn_badart{$a} or $a cmp $b";
    numbering true;
    column {
        name          "Server";
        format        "%-23.23s";
        value         "$key";
        format_total  "TOTAL: %-16.16s";
        total         "$num";
    };
    column {
        name          "Total";
        format_name   "%6s";
        format        "%6d";
        value         "$inn_badart{$key}";
        total         "total(%inn_badart)";
    };
    column {
        name          "Group";
        format_name   "%6s";
        format        "%6d";
        value         "$inn_uw_ng_s{$key}";
        total         "total(%inn_uw_ng_s)";
    };
    column {
        name          "Dist";
        format_name   "%5s";
        format        "%5d";
        value         "$inn_uw_dist_s{$key}";
        total         "total(%inn_uw_dist_s)";
    };
    column {
        name          "Duplic";
        format_name   "%6s";
        format        "%6d";
        value         "$inn_duplicate{$key}";
        total         "total(%inn_duplicate)";
    };
    column {
        name          "Unapp";
        format_name   "%5s";
        format        "%5d";
        value         "$inn_unapproved{$key}";
        total         "total(%inn_unapproved)";
    };
    column {
        name          "TooOld";
        format_name   "%6s";
        format        "%6d";
        value         "$inn_tooold{$key}";
        total         "total(%inn_tooold)";
    };
    column {
        name          "Site";
        format_name   "%4s";
        format        "%4d";
        value         "$inn_uw_site{$key}";
        total         "total(%inn_uw_site)";
    };
    column {
        name          "Line";
        format_name   "%4s";
        format        "%4d";
        value         "$inn_linecount{$key}";
        total         "total(%inn_linecount)";
    };
    column {
        name          "Other";
        format_name   "%5s";
        format        "%5d";
        value         "$innd_others{$key}";
        total         "total(%innd_others)";
    };
};

section inn_unwanted_group {
    title     "Unwanted newsgroups:";
    top       20;     # default 'top' value or use 'top_text' and 'top_html'
                      # to specify different values for text and HTML reports.
    data      "%inn_uw_ng";
    sort      "$inn_uw_ng{$b} <=> $inn_uw_ng{$a} or $a cmp $b";
    column {
        name          "Newsgroup";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Count";
        format_name   "%7s";
        format        "%7d";
        value         "$inn_uw_ng{$key}";
        total         "total(%inn_uw_ng)";
    };
};

section inn_unwanted_dist {
    title     "Unwanted distributions:";
    top       20;
    data      "%inn_uw_dist";
    sort      "$inn_uw_dist{$b} <=> $inn_uw_dist{$a} or $a cmp $b";
    column {
        name          "Distribution";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Count";
        format_name   "%7s";
        format        "%7d";
        value         "$inn_uw_dist{$key}";
        total         "total(%inn_uw_dist)";
    };
};

section inn_unwanted_unapp {
    title     "Supposedly-moderated groups with unmoderated postings:";
    top       20;
    data      "%inn_unapproved_g";
    sort      "$inn_unapproved_g{$b} <=> $inn_unapproved_g{$a} or $a cmp $b";
    column {
        name          "Groups";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Count";
        format_name   "%7s";
        format        "%7d";
        value         "$inn_unapproved_g{$key}";
        total         "total(%inn_unapproved_g)";
    };
};

section inn_unwanted_path {
    title     "Unwanted sites in Path header field:";
    top       20;
    data      "%inn_site_path";
    sort      "$inn_site_path{$b} <=> $inn_site_path{$a} or $a cmp $b";
    column {
        name          "Site";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Count";
        format_name   "%7s";
        format        "%7d";
        value         "$inn_site_path{$key}";
        total         "total(%inn_site_path)";
    };
};

section innd_perl {
    title     "Perl filter (innd):";
    top       20;
    data      "%innd_filter_perl";
    sort      "$innd_filter_perl{$b} <=> $innd_filter_perl{$a} or $a cmp $b";
    column {
        name          "Reason";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Count";
        format_name   "%7s";
        format        "%7d";
        value         "$innd_filter_perl{$key}";
        total         "total(%innd_filter_perl)";
    };
};

section innd_python {
    title     "Python filter (innd):";
    top       20;
    data      "%innd_filter_python";
    sort      "$innd_filter_python{$b} <=> $innd_filter_python{$a}
               or $a cmp $b";
    column {
        name          "Reason";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Count";
        format_name   "%7s";
        format        "%7d";
        value         "$innd_filter_python{$key}";
        total         "total(%innd_filter_python)";
    };
};

section nocem {
    title     "NoCeM on spool:";
    data      "%nocem_totalids";
    sort      "$nocem_newids{$b} <=> $nocem_newids{$a}
               or $nocem_skipids{$b} <=> $nocem_skipids{$a}
               or $a cmp $b";
    column {
        name          "Issuer (type)";
        format        "%-40.40s";
        value         "$key";
        format_total  "TOTAL: %-33.33s";
        total         "$num";
    };
    column {
        name          "Notices";
        format        "%7s";
        value         "$nocem_count{$key}";
        total         "total(%nocem_count)";
    };
    column {
        name          "Bad PGP";
        format        "%7s";
        value         "$nocem_badsigs{$key}";
        total         "total(%nocem_badsigs)";
    };
    column {
        name          "Cancel";
        format        "%7s";
        value         "$nocem_newids{$key}";
        total         "total(%nocem_newids)";
    };
    column {
        name          "Skip";
        format        "%6s";
        value         "$nocem_skipids{$key}";
        total         "total(%nocem_skipids)";
    };
    column {
        name          "Total";
        format        "%7s";
        value         "$nocem_totalids{$key}";
        total         "total(%nocem_totalids)";
    };
};

section innd_no_permission {
    title     "No permission servers (innd):";
    data      "%innd_no_permission";
    sort      "$innd_no_permission{$b} <=> $innd_no_permission{$a}
               or $a cmp $b";
    column {
        name          "System";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Conn";
        format_name   "%7s";
        format        "%7d";
        value         "$innd_no_permission{$key}";
        total         "total(%innd_no_permission)";
    };
};

section innd_max_conn {
    title     "Too many incoming connections (innd):";
    data      "%innd_max_conn";
    sort      "$innd_max_conn{$b} <=> $innd_max_conn{$a} or $a cmp $b";
    column {
        name          "Server";
        format        "%-70.70s";
        value         "$key";
        format_total  "TOTAL: %-63.63s";
        total         "$num";
    };
    column {
        name          "Conn";
        format_name   "%8s";
        format        "%8d";
        value         "$innd_max_conn{$key}";
        total         "total(%innd_max_conn)";
    };
};

section innd_too_many_connects_per_minute {
    title     "Too many connects per minute (innd):";
    data      "%innd_too_many_connects_per_minute";
    sort      "$innd_too_many_connects_per_minute{$b} <=>
               $innd_too_many_connects_per_minute{$a} or $a cmp $b";
    column {
        name          "System";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Conn";
        format_name   "%7s";
        format        "%7d";
        value         "$innd_too_many_connects_per_minute{$key}";
        total         "total(%innd_too_many_connects_per_minute)";
    };
};

section innd_misc {
    title     "Miscellaneous innd events:";
    data      "%innd_misc";
    sort      "$innd_misc{$b} <=> $innd_misc{$a} or $a cmp $b";
    column {
        name          "Events";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Count";
        format_name   "%7s";
        format        "%7d";
        value         "$innd_misc{$key}";
        total         "total(%innd_misc)";
    };
};

section innd_misc_stat {
    title     "Miscellaneous innd statistics:";
    data      "%innd_misc_stat";
    sort      "$innd_misc_stat{$b} <=> $innd_misc_stat{$a} or $a cmp $b";
    double    true;
    top       10;
   #numbering true;
    column {
        primary       true;
        name          "Event";
        format        "%-69.69s";
        value         "$key1";
        format_total  "TOTAL: %-62.62s";
        total         "$num";
    };
    column {
        name          "Server";
        format        "  %-67.67s";
        value         "$key2";
        total         "$num";
        format_total  "TOTAL: %-60.60s";
    };
    column {
        name          "Number";
        format_name   "%9s";
        format        "%9d";
        value         "$innd_misc_stat{$key1}{$key2}";
        total         "total(%innd_misc_stat)";
    };
};

section innfeed_connect {
    title     "Outgoing feeds (innfeed) by articles:";
    data      "%innfeed_offered";
    sort      "$innfeed_accepted{$b} <=> $innfeed_accepted{$a}
               or $innfeed_offered{$b} <=> $innfeed_offered{$a}
               or $a cmp $b";
    numbering true;
    column {
        name          "Server";
        format        "%-18.18s";
        value         "$key";
        format_total  "TOTAL: %-11.11s";
        total         "$num";
    };
    column {
        name          "Offered";
        format_name   "%7s";
        format        "%7d";
        value         "$innfeed_offered{$key}";
        total         "total(%innfeed_offered)";
    };
    column {
        name          "Taken";
        format_name   "%7s";
        format        "%7d";
        value         "$innfeed_accepted{$key}";
        total         "total(%innfeed_accepted)";
    };
    column {
        name          "Refused";
        format_name   "%7s";
        format        "%7d";
        value         "$innfeed_refused{$key}";
        total         "total(%innfeed_refused)";
    };
    column {
        name          "Reject";
        format_name   "%6s";
        format        "%6d";
        value         "$innfeed_rejected{$key}";
        total         "total(%innfeed_rejected)";
    };
    column {
        name          "Miss";
        format_name   "%6s";
        format        "%6d";
        value         "$innfeed_missing{$key}";
        total         "total(%innfeed_missing)";
    };
    column {
        name          "Spool";
        format_name   "%7s";
        format        "%7d";
        value         "$innfeed_spooled{$key}";
        total         "total(%innfeed_spooled)";
    };
    column {
        name          "%Took";
        format_name   "%5s";
        format        "%3d%%";
        value         "$innfeed_offered{$key} == 0 ? 0 :
                       $innfeed_accepted{$key} / $innfeed_offered{$key} * 100";
        total         "total(%innfeed_offered) == 0 ? 0 :
                       total(%innfeed_accepted)
                       / total(%innfeed_offered) * 100";
    };
    column {
        name          "Elapsed";
        format_name   "%8s";
        format        "%9s";
        value         "time($innfeed_seconds{$key})";
        total         "time(total(%innfeed_seconds))";
    };
    graph {
        title         "Outgoing feeds (innfeed) by articles";
        type          histo3d;
        sort          "%innfeed_accepted";
        data {
            name        "Accepted";
            color       "#0000FF";
            value       "%innfeed_accepted";
        };
        data {
            name        "Refused";
            color       "#FFAF00";
            value       "%innfeed_refused";
        };
        data {
            name        "Rejected";
            color       "#FF0000";
            value       "%innfeed_rejected";
        };
        data {
            name        "Missing";
            color       "#00FF00";
            value       "%innfeed_missing";
        };
        data {
            name        "Spooled";
            color       "#AF00FF";
            value       "%innfeed_spooled";
        };
    };
};

section innfeed_volume {
    title     "Outgoing feeds (innfeed) by volume:";
    data      "%innfeed_offered";
    sort      "$innfeed_accepted_size{$b} <=> $innfeed_accepted_size{$a}
               or $a cmp $b";
    numbering true;
    column {
        name          "Server";
        format        "%-17.17s";
        value         "$key";
        format_total  "TOTAL: %-10.10s";
        total         "$num";
    };
    column {
        name          "AcceptVol";
        format        "%9s";
        value         "bytes($innfeed_accepted_size{$key})";
        total         "bytes(total(%innfeed_accepted_size))";
    };
    column {
        name          "RejectVol";
        format        "%9s";
        value         "bytes($innfeed_rejected_size{$key})";
        total         "bytes(total(%innfeed_rejected_size))";
    };
    column {
        name          "TotalVol";
        format        "%9s";
        value         "bytes($innfeed_accepted_size{$key} +
                             $innfeed_rejected_size{$key})";
        total         "bytes(total(%innfeed_accepted_size) +
                             total(%innfeed_rejected_size))";
    };
    column {
        name          "Volume/sec";
        format_name   "%11s";
        format        "%9s/s";
        value         "bytes(($innfeed_accepted_size{$key} +
                              $innfeed_rejected_size{$key}) /
                             $innfeed_seconds{$key})";
        total         "bytes((total(%innfeed_accepted_size) +
                              total(%innfeed_rejected_size)) /
                             total(%innfeed_seconds))";
    };
    column {
        name          "Vol/Art";
        format        "%9s";
        value         "bytes(($innfeed_accepted_size{$key} +
                              $innfeed_rejected_size{$key}) /
                             ($innfeed_accepted{$key} +
                              $innfeed_rejected{$key}))";
        total         "bytes((total(%innfeed_accepted_size) +
                              total(%innfeed_rejected_size)) /
                             (total(%innfeed_accepted) +
                              total(%innfeed_rejected)))";
    };
    column {
        name          "Elapsed";
        format        "%9s";
        value         "time($innfeed_seconds{$key})";
        total         "time(total(%innfeed_seconds))";
    };
    graph {
        title         "Outgoing feeds (innfeed) by volume";
        type          histo3d;
        sort          "%innfeed_accepted_size";
        data {
            name        "Accepted";
            color       "#0000FF";
            value       "%innfeed_accepted_size";
        };
        data {
            name        "Rejected";
            color       "#FFAF00";
            value       "%innfeed_rejected_size";
        };
    };
};

section innfeed_shrunk {
    title     "Backlog files shrunk by innfeed:";
    data      "%innfeed_shrunk";
    sort      "$innfeed_shrunk{$b} <=> $innfeed_shrunk{$a} or $a cmp $b";
    column {
        name          "Server";
        format        "%-70.70s";
        value         "$key";
        format_total  "TOTAL: %-63.63s";
        total         "$num";
    };
    column {
        name          "Size";
        format        "%8s";
        value         "bytes($innfeed_shrunk{$key})";
        total         "bytes(total(%innfeed_shrunk))";
    };
};

section nntplink_connect {
    title     "Outgoing feeds (nntplink):";
    data      "%nntplink_site";
    sort      "$nntplink_accepted{$b} <=> $nntplink_accepted{$a}
               or $nntplink_offered{$b} <=> $nntplink_offered{$a}
               or $a cmp $b";
    numbering true;
    column {
        name          "Server";
        format        "%-25.25s";
        value         "$key";
        format_total  "TOTAL: %-18.18s";
        total         "$num";
    };
    column {
        name          "Offered";
        format_name   "%8s";
        format        "%8d";
        value         "$nntplink_offered{$key}";
        total         "total(%nntplink_offered)";
    };
    column {
        name          "Taken";
        format_name   "%8s";
        format        "%8d";
        value         "$nntplink_accepted{$key}";
        total         "total(%nntplink_accepted)";
    };
    column {
        name          "Rejected";
        format_name   "%8s";
        format        "%8d";
        value         "$nntplink_rejected{$key}";
        total         "total(%nntplink_rejected)";
    };
    column {
        name          "Failed";
        format_name   "%8s";
        format        "%8d";
        value         "$nntplink_failed{$key}";
        total         "total(%nntplink_failed)";
    };
    column {
        name          "%Accpt";
        format_name   "%6s";
        format        "%5d%%";
        value         "$nntplink_offered{$key} == 0 ? 0 :
                       $nntplink_accepted{$key}
                       / $nntplink_offered{$key} * 100";
        total         "total(%nntplink_offered) == 0 ? 0 :
                       total(%nntplink_accepted)
                       / total(%nntplink_offered) * 100";
    };
    column {
        name          "Elapsed";
        format        "%10s";
        value         "time($nntplink_times{$key})";
        total         "time(total(%nntplink_times))";
    };
    graph {
        title         "Outgoing feeds (nntplink)";
        type          histo3d;
        sort          "%nntplink_accepted";
        data {
            name        "Articles accepted";
            color       "#0000FF";
            value       "%nntplink_accepted";
        };
        data {
            name        "Articles rejected";
            color       "#FFAF00";
            value       "%nntplink_rejected";
        };
        data {
            name        "Articles failed";
            color       "#FF0000";
            value       "%nntplink_failed";
        };
    };
};

section nntplink_connect2 {
    title     "Outgoing feeds (nntplink) - other information:";
    data      "%nntplink_site";
    # Same sorting as the previous section.
    sort      "$nntplink_accepted{$b} <=> $nntplink_accepted{$a}
               or $nntplink_offered{$b} <=> $nntplink_offered{$a}
               or $a cmp $b";
    numbering true;
    column {
        name          "Server";
        format        "%-20.20s";
        value         "$key";
        format_total  "TOTAL: %-13.13s";
        total         "$num";
    };
    column {
        name          "Conn";
        format_name   "%4s";
        format        "%4d";
        value         "$nntplink_site{$key}";
        total         "total(%nntplink_site)";
    };
    column {
        name          "Ok";
        format_name   "%4s";
        format        "%4d";
        value         "$nntplink_site{$key} - ($nntplink_eof{$key} +
                       $nntplink_sockerr{$key} + $nntplink_selecterr{$key} +
                       $nntplink_hiload{$key} + $nntplink_bpipe{$key} +
                       $nntplink_nospace{$key} + $nntplink_auth{$key} +
                       $nntplink_expire{$key} + $nntplink_fail{$key})";
        total         "total(%nntplink_site) - (total(%nntplink_eof) +
                       total(%nntplink_sockerr) + total(%nntplink_selecterr) +
                       total(%nntplink_hiload) + total(%nntplink_bpipe) +
                       total(%nntplink_nospace) + total(%nntplink_auth) +
                       total(%nntplink_expire) + total(%nntplink_fail))";
    };
    column {
        name          "EOF";
        format_name   "%3s";
        format        "%3d";
        value         "$nntplink_eof{$key}";
        total         "total(%nntplink_eof)";
    };
    column {
        name          "Sock";
        format_name   "%4s";
        format        "%4d";
        value         "$nntplink_sockerr{$key}";
        total         "total(%nntplink_sockerr)";
    };
    column {
        name          "Slct";
        format_name   "%4s";
        format        "%4d";
        value         "$nntplink_selecterr{$key}";
        total         "total(%nntplink_selecterr)";
    };
    column {
        name          "Load";
        format_name   "%4s";
        format        "%4d";
        value         "$nntplink_hiload{$key}";
        total         "total(%nntplink_hiload)";
    };
    column {
        name          "Bpip";
        format_name   "%4s";
        format        "%4d";
        value         "$nntplink_bpipe{$key}";
        total         "total(%nntplink_bpipe)";
    };
    column {
        name          "Spce";
        format_name   "%4s";
        format        "%4d";
        value         "$nntplink_nospace{$key}";
        total         "total(%nntplink_nospace)";
    };
    column {
        name          "Exp";
        format_name   "%4s";
        format        "%4d";
        value         "$nntplink_expire{$key}";
        total         "total(%nntplink_expire)";
    };
    column {
        name          "Auth";
        format_name   "%4s";
        format        "%4d";
        value         "$nntplink_auth{$key}";
        total         "total(%nntplink_auth)";
    };
    column {
        name          "Othr";
        format_name   "%4s";
        format        "%4d";
        value         "$nntplink_fail{$key}";
        total         "total(%nntplink_fail)";
    };
    column {
        name          "Pct";
        format_name   "%4s";
        format        "%3d%%";
        value         "$nntplink_site{$key} ? 100 * ($nntplink_site{$key} -
                       ($nntplink_eof{$key} + $nntplink_sockerr{$key} +
                        $nntplink_selecterr{$key} +
                        $nntplink_hiload{$key} + $nntplink_bpipe{$key} +
                        $nntplink_nospace{$key} + $nntplink_auth{$key} +
                        $nntplink_expire{$key} + $nntplink_fail{$key}))
                        / $nntplink_site{$key} : 0";
        total         "total(%nntplink_site) ? 100 * (total(%nntplink_site) -
                       (total(%nntplink_eof) + total(%nntplink_sockerr) +
                        total(%nntplink_selecterr) +
                        total(%nntplink_hiload) + total(%nntplink_bpipe) +
                        total(%nntplink_nospace) + total(%nntplink_auth) +
                        total(%nntplink_expire) + total(%nntplink_fail)))
                        / total(%nntplink_site) : 0";
    };
};

section innxbatch_connect {
    title     "Outgoing feeds (innxbatch) by articles:";
    data      "%innxbatch_offered";
    sort      "$innxbatch_accepted{$b} <=> $innxbatch_accepted{$a}
               or $innxbatch_offered{$b} <=> $innxbatch_offered{$a}
               or $a cmp $b";
    numbering true;
    column {
        name          "Server";
        format        "%-33.33s";
        value         "$key";
        format_total  "TOTAL: %-26.26s";
        total         "$num";
    };
    column {
        name          "Offered";
        format_name   "%7s";
        format        "%7d";
        value         "$innxbatch_offered{$key}";
        total         "total(%innxbatch_offered)";
    };
    column {
        name          "Taken";
        format_name   "%7s";
        format        "%7d";
        value         "$innxbatch_accepted{$key}";
        total         "total(%innxbatch_accepted)";
    };
    column {
        name          "Refused";
        format_name   "%7s";
        format        "%7d";
        value         "$innxbatch_refused{$key}";
        total         "total(%innxbatch_refused)";
    };
    column {
        name          "Reject";
        format_name   "%7s";
        format        "%7d";
        value         "$innxbatch_rejected{$key}";
        total         "total(%innxbatch_rejected)";
    };
    column {
        name          "%Acc";
        format_name   "%4s";
        format        "%3d%%";
        value         "$innxbatch_offered{$key} == 0 ? 0 :
                       $innxbatch_accepted{$key} /
                       $innxbatch_offered{$key} * 100";
        total         "total(%innxbatch_offered) == 0 ? 0 :
                       total(%innxbatch_accepted) /
                       total(%innxbatch_offered) * 100";
    };
    column {
        name          "Elapsed";
        format        "%8s";
        value         "time($innxbatch_times{$key})";
        total         "time(total(%innxbatch_times))";
    };
    graph {
        title         "Outgoing feeds (innxbatch) by articles";
        type          histo3d;
        sort          "%innxbatch_accepted";
        data {
            name        "Art. accepted";
            color       "#0000FF";
            value       "%innxbatch_accepted";
        };
        data {
            name        "Art. refused";
            color       "#FFAF00";
            value       "%innxbatch_refused";
        };
        data {
            name        "Art. rejected";
            color       "#FF0000";
            value       "%innxbatch_rejected";
        };
    };
};

section innxbatch_volume {
    title     "Outgoing feeds (innxbatch) by volume:";
    data      "%innxbatch_offered";
    sort      "$innxbatch_accepted_size{$b} <=> $innxbatch_accepted_size{$a}
               or $a cmp $b";
    numbering true;
    column {
        name          "Server";
        format        "%-17.17s";
        value         "$key";
        format_total  "TOTAL: %-10.10s";
        total         "$num";
    };
    column {
        name          "AcceptVol";
        format        "%9s";
        value         "bytes($innxbatch_accepted_size{$key})";
        total         "bytes(total(%innxbatch_accepted_size))";
    };
    column {
        name          "RejectVol";
        format        "%9s";
        value         "bytes($innxbatch_rejected_size{$key})";
        total         "bytes(total(%innxbatch_rejected_size))";
    };
    column {
        name          "TotalVol";
        format        "%9s";
        value         "bytes($innxbatch_accepted_size{$key} +
                             $innxbatch_rejected_size{$key})";
        total         "bytes(total(%innxbatch_accepted_size) +
                                   total(%innxbatch_rejected_size))";
    };
    column {
        name          "Volume/sec";
        format_name   "%11s";
        format        "%9s/s";
        value         "bytes(($innxbatch_accepted_size{$key} +
                              $innxbatch_rejected_size{$key}) /
                             $innxbatch_times{$key} / 1024)";
        total        "bytes((total(%innxbatch_accepted_size) +
                             total(%innxbatch_rejected_size)) /
                            total(%innxbatch_times) / 1024)";
    };
    column {
        name          "Vol/Art";
        format        "%9s";
        value         "bytes(($innxbatch_accepted_size{$key} +
                              $innxbatch_rejected_size{$key}) /
                             ($innxbatch_accepted{$key} +
                              $innxbatch_rejected{$key}))";
        total         "bytes((total(%innxbatch_accepted_size) +
                              total(%innxbatch_rejected_size)) /
                             (total(%innxbatch_accepted) +
                              total(%innxbatch_rejected)))";
    };
    column {
        name          "Elapsed";
        format        "%9s";
        value         "time($innxbatch_times{$key})";
        total         "time(total(%innxbatch_times))";
    };
    graph {
        title         "Outgoing feeds (innxbatch) by volume";
        type          histo3d;
        sort          "%innxbatch_accepted_size";
        data {
            name        "Articles accepted";
            color       "#0000FF";
            value       "%innxbatch_accepted_size";
        };
        data {
            name        "Articles rejected";
            color       "#FFAF00";
            value       "%innxbatch_rejected_size";
        };
    };
};

section innxmit_connect {
    title     "Outgoing feeds (innxmit) by articles:";
    data      "%innxmit_times";
    sort      "$innxmit_accepted{$b} <=> $innxmit_accepted{$a}
               or $innxmit_offered{$b} <=> $innxmit_offered{$a}
               or $a cmp $b";
    numbering true;
    column {
        name          "Server";
        format        "%-27.27s";
        value         "$key";
        format_total  "TOTAL: %-20.20s";
        total         "$num";
    };
    column {
        name          "Offered";
        format_name   "%7s";
        format        "%7d";
        value         "$innxmit_offered{$key}";
        total         "total(%innxmit_offered)";
    };
    column {
        name          "Taken";
        format_name   "%7s";
        format        "%7d";
        value         "$innxmit_accepted{$key}";
        total         "total(%innxmit_accepted)";
    };
    column {
        name          "Refused";
        format_name   "%7s";
        format        "%7d";
        value         "$innxmit_refused{$key}";
        total         "total(%innxmit_refused)";
    };
    column {
        name          "Reject";
        format_name   "%7s";
        format        "%7d";
        value         "$innxmit_rejected{$key}";
        total         "total(%innxmit_rejected)";
    };
    column {
        name          "Miss";
        format_name   "%5s";
        format        "%5d";
        value         "$innxmit_missing{$key}";
        total         "total(%innxmit_rejected)";
    };
    column {
        name          "%Acc";
        format_name   "%4s";
        format        "%3d%%";
        value         "$innxmit_offered{$key} == 0 ? 0 :
                       $innxmit_accepted{$key} / $innxmit_offered{$key} * 100";
        total         "total(%innxmit_offered) == 0 ? 0 :
                       total(%innxmit_accepted)
                       / total(%innxmit_offered) * 100";
    };
    column {
        name          "Elapsed";
        format        "%8s";
        value         "time($innxmit_times{$key})";
        total         "time(total(%innxmit_times))";
    };
    graph {
        title         "Outgoing feeds (innxmit) by articles";
        type          histo3d;
        sort          "%innxmit_accepted";
        data {
            name        "Art. accepted";
            color       "#0000FF";
            value       "%innxmit_accepted";
        };
        data {
            name        "Art. refused";
            color       "#FFAF00";
            value       "%innxmit_refused";
        };
        data {
            name        "Art. rejected";
            color       "#FF0000";
            value       "%innxmit_rejected";
        };
        data {
            name        "Art. missing";
            color       "#00FF00";
            value       "%innxmit_missing";
        };
    };
};

section innxmit_volume {
    title     "Outgoing feeds (innxmit) by volume:";
    data      "%innxmit_times";
    sort      "$innxmit_accepted_size{$b} <=> $innxmit_accepted_size{$a}
               or $a cmp $b";
    numbering true;
    column {
        name          "Server";
        format        "%-24.24s";
        value         "$key";
        format_total  "TOTAL: %-17.17s";
        total         "$num";
    };
    column {
        name          "AcceptVol";
        format        "%9s";
        value         "bytes($innxmit_accepted_size{$key})";
        total         "bytes(total(%innxmit_accepted_size))";
    };
    column {
        name          "RejectVol";
        format        "%9s";
        value         "bytes($innxmit_rejected_size{$key})";
        total         "bytes(total(%innxmit_rejected_size))";
    };
    column {
        name          "TotalVol";
        format        "%9s";
        value         "bytes($innxmit_accepted_size{$key} +
                             $innxmit_rejected_size{$key})";
        total         "bytes(total(%innxmit_accepted_size) +
                             total(%innxmit_rejected_size))";
    };
    column {
        name          "KB/s";
        format_name   "%5s";
        format        "%5.1f";
        value         "($innxmit_accepted_size{$key} +
                        $innxmit_rejected_size{$key}) /
                       $innxmit_times{$key} / 1024";
        total         "(total(%innxmit_accepted_size) +
                        total(%innxmit_rejected_size)) /
                       total(%innxmit_times) / 1024";
    };
    column {
        name          "Vol/Art";
        format        "%9s";
        value         "bytes(($innxmit_accepted_size{$key} +
                              $innxmit_rejected_size{$key}) /
                             ($innxmit_accepted{$key} +
                              $innxmit_rejected{$key}))";
        total         "bytes((total(%innxmit_accepted_size) +
                              total(%innxmit_rejected_size)) /
                             (total(%innxmit_accepted) +
                              total(%innxmit_rejected)))";
    };
    column {
        name          "Elapsed";
        format        "%8s";
        value         "time($innxmit_times{$key})";
        total         "time(total(%innxmit_times))";
    };
    graph {
        title         "Outgoing feeds (innxmit) by volume";
        type          histo3d;
        sort          "%innxmit_accepted";
        data {
            name        "Articles accepted";
            color       "#0000FF";
            value       "%innxmit_accepted_size";
        };
        data {
            name        "Articles rejected";
            color       "#FFAF00";
            value       "%innxmit_rejected_size";
        };
        data {
            name        "Total";
            color       "#FF0000";
            value       "%innxmit_missing";
        };
    };
};


section innxmit_connect2 {
    title     "Outgoing feeds (innxmit) - other information:";
    data      "%innxmit_site";
    # Same sorting as the previous section.
    sort      "$innxmit_accepted_size{$b} <=> $innxmit_accepted_size{$a}
               or $a cmp $b";
    numbering true;
    column {
        name          "Server";
        format        "%-25.25s";
        value         "$key";
        format_total  "TOTAL: %-18.18s";
        total         "$num";
    };
    column {
        name          "Conn";
        format_name   "%5s";
        format        "%5d";
        value         "$innxmit_site{$key}";
        total         "total(%innxmit_site)";
    };
    column {
        name          "Ok";
        format_name   "%5s";
        format        "%5d";
        value         "$innxmit_site{$key} - ($innxmit_afail_host{$key} +
                       $innxmit_hiload{$key} + $innxmit_nospace{$key} +
                       $innxmit_cfail_host{$key} + $innxmit_expire{$key} +
                       $innxmit_crefused{$key})";
        total         "total(%innxmit_site) - (total(%innxmit_afail_host) +
                       total(%innxmit_hiload) + total(%innxmit_nospace) +
                       total(%innxmit_cfail_host) + total(%innxmit_expire) +
                       total(%innxmit_crefused))";
    };
    column {
        name          "Auth";
        format_name   "%4s";
        format        "%4d";
        value         "$innxmit_afail_host{$key}";
        total         "total(%innxmit_afail_host)";
    };
    column {
        name          "Load";
        format_name   "%4s";
        format        "%4d";
        value         "$innxmit_hiload{$key}";
        total         "total(%innxmit_hiload)";
    };
    column {
        name          "Space";
        format_name   "%5s";
        format        "%5d";
        value         "$innxmit_nospace{$key}";
        total         "total(%innxmit_nospace)";
    };
    column {
        name          "Expire";
        format_name   "%6s";
        format        "%6d";
        value         "$innxmit_expire{$key}";
        total         "total(%innxmit_expire)";
    };
    column {
        name          "Connct";
        format_name   "%6s";
        format        "%6d";
        value         "$innxmit_cfail_host{$key}";
        total         "total(%innxmit_cfail_host)";
    };
    column {
        name          "Other";
        format_name   "%6s";
        format        "%6d";
        value         "$innxmit_crefused{$key}";
        total         "total(%innxmit_crefused)";
    };
    column {
        name          "Pct";
        format_name   "%4s";
        format        "%3d%%";
        value         "$innxmit_site{$key} ? 100 * ($innxmit_site{$key} -
                       ($innxmit_afail_host{$key} + $innxmit_hiload{$key} +
                        $innxmit_nospace{$key} + $innxmit_cfail_host{$key} +
                        $innxmit_expire{$key} + $innxmit_crefused{$key}))
                       / $innxmit_site{$key} : 0";
        total         "total(%innxmit_site) ? 100 * (total(%innxmit_site) -
                       (total(%innxmit_afail_host) + total(%innxmit_hiload) +
                        total(%innxmit_nospace) + total(%innxmit_cfail_host) +
                        total(%innxmit_expire) + total(%innxmit_crefused)))
                       / total(%innxmit_site) : 0";
    };
};

section innxmit_unwanted {
    title     "Sites fed by innxmit rejecting bad articles:";
    data      "%innxmit_badart";
    sort      "$innxmit_badart{$b} <=> $innxmit_badart{$a} or $a cmp $b";
    numbering true;
    column {
        name          "Server";
        format        "%-23.23s";
        value         "$key";
        format_total  "TOTAL: %-16.16s";
        total         "$num";
    };
    column {
        name          "Total";
        format_name   "%6s";
        format        "%6d";
        value         "$innxmit_badart{$key}";
        total         "total(%innxmit_badart)";
    };
    column {
        name          "Group";
        format_name   "%6s";
        format        "%6d";
        value         "$innxmit_uw_ng_s{$key}";
        total         "total(%innxmit_uw_ng_s)";
    };
    column {
        name          "Dist";
        format_name   "%5s";
        format        "%5d";
        value         "$innxmit_uw_dist_s{$key}";
        total         "total(%innxmit_uw_dist_s)";
    };
    column {
        name          "Duplic";
        format_name   "%6s";
        format        "%6d";
        value         "$innxmit_duplicate{$key}";
        total         "total(%innxmit_duplicate)";
    };
    column {
        name          "Unapp";
        format_name   "%5s";
        format        "%5d";
        value         "$innxmit_unapproved{$key}";
        total         "total(%innxmit_unapproved)";
    };
    column {
        name          "TooOld";
        format_name   "%6s";
        format        "%6d";
        value         "$innxmit_tooold{$key}";
        total         "total(%innxmit_tooold)";
    };
    column {
        name          "Site";
        format_name   "%4s";
        format        "%4d";
        value         "$innxmit_uw_site{$key}";
        total         "total(%innxmit_uw_site)";
    };
    column {
        name          "Line";
        format_name   "%4s";
        format        "%4d";
        value         "$innxmit_linecount{$key}";
        total         "total(%innxmit_linecount)";
    };
    column {
        name          "Other";
        format_name   "%5s";
        format        "%5d";
        value         "$innxmit_others{$key}";
        total         "total(%innxmit_others)";
    };
};

section batcher_elapsed {
    title     "UUCP batches created:";
    data      "%batcher_elapsed";
    column {
        name          "Server";
        format        "%-41.41s";
        value         "$key";
        format_total  "TOTAL: %-34.34s";
        total         "$num";
    };
    column {
        name          "Offered";
        format_name   "%7s";
        format        "%7d";
        value         "$batcher_offered{$key}";
        total         "total(%batcher_offered)";
    };
    column {
        name          "Articles";
        format_name   "%8s";
        format        "%8d";
        value         "$batcher_articles{$key}";
        total         "total(%batcher_articles)";
    };
    column {
        name          "Size";
        format        "%10s";
        value         "bytes($batcher_bytes{$key})";
        total         "bytes(total(%batcher_bytes))";
    };
    column {
        name          "Elapsed";
        format        "%9s";
        value         "time($batcher_elapsed{$key})";
        total         "time(total(%batcher_elapsed))";
    };
};

section rnews_host {
    title     "rnews articles offered from:";
    data      "%rnews_host";
    sort      "$rnews_host{$b} <=> $rnews_host{$a} or $a cmp $b";
    column {
        name          "System";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Offered";
        format_name   "%7s";
        format        "%7d";
        value         "$rnews_host{$key}";
        total         "total(%rnews_host)";
    };
};

section rnews_rejected {
    title     "rnews connections rejected:";
    data      "%rnews_rejected";
    sort      "$rnews_rejected{$b} <=> $rnews_rejected{$a} or $a cmp $b";
    column {
        name          "Reason";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Conn";
        format_name   "%7s";
        format        "%7d";
        value         "$rnews_rejected{$key}";
        total         "total(%rnews_rejected)";
    };
};

section rnews_misc {
    title     "Miscellaneous rnews statistics:";
    data      "%rnews_misc";
    sort      "$rnews_misc{$b} <=> $rnews_misc{$a} or $a cmp $b";
    double    true;
    column {
        primary       true;
        name          "Event";
        format        "%-69.69s";
        value         "$key1";
        format_total  "TOTAL: %-62.62s";
        total         "";
    };
    column {
        name          "Element";
        format        "  %-67.67s";
        value         "$key2";
        total         "";
    };
    column {
        name          "Number";
        format_name   "%9s";
        format        "%9d";
        value         "$rnews_misc{$key1}{$key2}";
        total         "total(%rnews_misc)";
    };
};

section nnrpd_groups {
    title     "NNRP readership statistics:";
    data      "%nnrpd_connect";
    top       100;
    sort      "$nnrpd_articles{$b} <=> $nnrpd_articles{$a}
               or $nnrpd_connect{$b} <=> $nnrpd_connect{$a}
               or $a cmp $b";
    numbering true;
    column {
        name          "System";
        format        "%-30.30s";
        value         "$key";
        format_total  "TOTAL: %-23.23s";
        total         "$num";
    };
    column {
        name          "Conn";
        format_name   "%4s";
        format        "%4d";
        value         "$nnrpd_connect{$key}";
        total         "total(%nnrpd_connect)";
    };
    column {
        name          "Arts";
        format_name   "%6s";
        format        "%6d";
        value         "$nnrpd_articles{$key}";
        total         "total(%nnrpd_articles)";
    };
    column {
        name          "Size";
        format        "%9s";
        value         "bytes($nnrpd_bytes{$key})";
        total         "bytes(total(%nnrpd_bytes))";
    };
    column {
        name          "Groups";
        format_name   "%6s";
        format        "%6d";
        value         "$nnrpd_groups{$key}";
        total         "total(%nnrpd_groups)";
    };
    column {
        name          "Post";
        format_name   "%4s";
        format        "%4d";
        value         "$nnrpd_post_ok{$key}";
        total         "total(%nnrpd_post_ok)";
    };
    column {
        name          "Rej";
        format_name   "%4s";
        format        "%4d";
        value         "($nnrpd_post_rej{$key}||0) +
                       ($nnrpd_post_error{$key}||0)";
        total         "total(%nnrpd_post_rej) + total(%nnrpd_post_error)";
    };
    column {
        name          "Elapsed";
        format        "%9s";
        value         "time($nnrpd_times{$key})";
        total         "time(total(%nnrpd_times))";
    };
};

section nnrpd_dom_groups {
    title     "NNRP connection statistics (by domain):";
    data      "%nnrpd_dom_connect";
    top       100;
    sort      "$nnrpd_dom_articles{$b} <=> $nnrpd_dom_articles{$a}
               or $nnrpd_dom_connect{$b} <=> $nnrpd_dom_connect{$a}
               or $a cmp $b";
    numbering true;
    column {
        name          "System";
        format        "%-30.30s";
        value         "$key";
        format_total  "TOTAL: %-23.23s";
        total         "$num";
    };
    column {
        name          "Conn";
        format_name   "%4s";
        format        "%4d";
        value         "$nnrpd_dom_connect{$key}";
        total         "total(%nnrpd_dom_connect)";
    };
    column {
        name          "Arts";
        format_name   "%6s";
        format        "%6d";
        value         "$nnrpd_dom_articles{$key}";
        total         "total(%nnrpd_dom_articles)";
    };
    column {
        name          "Size";
        format        "%9s";
        value         "bytes($nnrpd_dom_bytes{$key})";
        total         "bytes(total(%nnrpd_dom_bytes))";
    };
    column {
        name          "Groups";
        format_name   "%6s";
        format        "%6d";
        value         "$nnrpd_dom_groups{$key}";
        total         "total(%nnrpd_dom_groups)";
    };
    column {
        name          "Post";
        format_name   "%4s";
        format        "%4d";
        value         "$nnrpd_dom_post_ok{$key}";
        total         "total(%nnrpd_dom_post_ok)";
    };
    column {
        name          "Rej";
        format_name   "%4s";
        format        "%4d";
        value         "($nnrpd_dom_post_rej{$key}||0) +
                       ($nnrpd_dom_post_error{$key}||0)";
        total         "total(%nnrpd_dom_post_rej) +
                       total(%nnrpd_dom_post_error)";
    };
    column {
        name          "Elapsed";
        format        "%9s";
        value         "time($nnrpd_dom_times{$key})";
        total         "time(total(%nnrpd_dom_times))";
    };
};

section nnrpd_auth {
    title     "NNRP auth users:";
    data      "%nnrpd_auth";
    top       20;
    sort      "$nnrpd_auth{$b} <=> $nnrpd_auth{$a} or $a cmp $b";
    column {
        name          "User";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Conn";
        format_name   "%7s";
        format        "%7d";
        value         "$nnrpd_auth{$key}";
        total         "total(%nnrpd_auth)";
    };
};

section nnrpd_resource {
    title     "NNRP total resource statistics:";
    data      "%nnrpd_resource_elapsed";
    top       20;
    sort      "$nnrpd_resource_elapsed{$b} <=> $nnrpd_resource_elapsed{$a}
               or $a cmp $b";
    column {
        name          "System";
        format        "%-39.39s";
        format_total  "TOTAL: %-32.32s";
        value         "$key";
        total         "$num";
    };
    column {
        name          "User(ms)";
        format_name   "%9s";
        format        "%9.3f";
        value         "$nnrpd_resource_user{$key}";
        total         "total(%nnrpd_resource_user)";
    };
    column {
        name          "System(ms)";
        format_name   "%9s";
        format        "%9.3f";
        value         "$nnrpd_resource_system{$key}";
        total         "total(%nnrpd_resource_system)";
    };
    column {
        name          "Idle(ms)";
        format_name   "%9s";
        format        "%9.3f";
        value         "$nnrpd_resource_idle{$key}";
        total         "total(%nnrpd_resource_idle)";
    };
    column {
        name          "Elapsed";
        format_name   "%8s";
        format        "%9s";
        value         "time($nnrpd_resource_elapsed{$key})";
        total         "time(total(%nnrpd_resource_elapsed))";
    };
};

section nnrpd_curious {
    title     "Curious NNRP explorers:";
    data      "%nnrpd_curious";
    top       20;
    sort      "$nnrpd_curious{$b} <=> $nnrpd_curious{$a} or $a cmp $b";
    column {
        name          "System";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Conn";
        format_name   "%7s";
        format        "%7d";
        value         "$nnrpd_curious{$key}";
        total         "total(%nnrpd_curious)";
    };
};

section nnrpd_no_permission {
    title     "NNRP no permission clients:";
    data      "%nnrpd_no_permission";
    top       20;
    sort      "$nnrpd_no_permission{$b} <=> $nnrpd_no_permission{$a}
               or $a cmp $b";
    column {
        name          "System";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Conn";
        format_name   "%7s";
        format        "%7d";
        value         "$nnrpd_no_permission{$key}";
        total         "total(%nnrpd_no_permission)";
    };
};

section nnrpd_gethostbyaddr {
    title     "NNRP gethostbyaddr failures:";
    data      "%nnrpd_gethostbyaddr";
    top       20;
    sort      "$nnrpd_gethostbyaddr{$b} <=> $nnrpd_gethostbyaddr{$a}
               or $a cmp $b";
    column {
        name          "System";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Conn";
        format_name   "%7s";
        format        "%7d";
        value         "$nnrpd_gethostbyaddr{$key}";
        total         "total(%nnrpd_gethostbyaddr)";
    };
};

section nnrpd_unrecognized {
    title     "NNRP unrecognized commands (by host):";
    data      "%nnrpd_unrecognized";
    top       20;
    sort      "$nnrpd_unrecognized{$b} <=> $nnrpd_unrecognized{$a}
               or $a cmp $b";
    column {
        name          "System";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Conn";
        format_name   "%7s";
        format        "%7d";
        value         "$nnrpd_unrecognized{$key}";
        total         "total(%nnrpd_unrecognized)";
    };
};

section nnrpd_unrecognized2 {
    title     "NNRP unrecognized commands (by command):";
    data      "%nnrpd_unrecogn_cmd";
    top       20;
    sort      "$nnrpd_unrecogn_cmd{$b} <=> $nnrpd_unrecogn_cmd{$a}
               or $a cmp $b";
    column {
        name          "Command";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Count";
        format_name   "%7s";
        format        "%7d";
        value         "$nnrpd_unrecogn_cmd{$key}";
        total         "total(%nnrpd_unrecogn_cmd)";
    };
};

section nnrpd_timeout {
    title     "NNRP client timeouts:";
    data      "%nnrpd_timeout";
    top       20;
    sort      "$nnrpd_timeout{$b} <=> $nnrpd_timeout{$a} or $a cmp $b";
    column {
        name          "System";
        format        "%-67.67s";
        value         "$key";
        format_total  "TOTAL: %-60.60s";
        total         "$num";
    };
    column {
        name          "Conn";
        format_name   "%5s";
        format        "%5d";
        value         "$nnrpd_timeout{$key}";
        total         "total(%nnrpd_timeout)";
    };
    column {
        name          "Peer";
        format_name   "%5s";
        format        "%5d";
        value         "$nnrpd_reset_peer{$key}";
        total         "total(%nnrpd_reset_peer)";
    };
};

section nnrpd_hierarchy {
    title     "Newsgroup request counts (by hierarchy):";
    data      "%nnrpd_hierarchy";
    top       100;
    sort      "$nnrpd_hierarchy{$b} <=> $nnrpd_hierarchy{$a} or $a cmp $b";
    numbering true;
    column {
        name          "Hierarchy";
        format        "%-64.64s";
        value         "$key";
        format_total  "TOTAL: %-57.57s";
        total         "$num";
    };
    column {
        name          "Count";
        format_name   "%7s";
        format        "%7d";
        value         "$nnrpd_hierarchy{$key}";
        total         "total(%nnrpd_hierarchy)";
    };
    column {
        name          "Pct";
        format_name   "%6s";
        format        "%5.1f%%";
        value         "$nnrpd_hierarchy{$key} / total(%nnrpd_hierarchy) * 100";
        total         "100";
    };
   #graph : type piechart
};

section nnrpd_group {
    title     "Newsgroup request counts (by newsgroup):";
    data      "%nnrpd_group";
    top       100;
    sort      "$nnrpd_group{$b} <=> $nnrpd_group{$a} or $a cmp $b";
    numbering true;
    column {
        name          "Newsgroup";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Count";
        format_name   "%7s";
        format        "%7d";
        value         "$nnrpd_group{$key}";
        total         "total(%nnrpd_group)";
    };
};

section ihave_site {
    title     "IHAVE messages offered from:";
    data      "%controlchan_ihave_site";
    sort      "$controlchan_ihave_site{$b} <=> $controlchan_ihave_site{$a}
               or $a cmp $b";
    column {
        name          "System";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Offered";
        format_name   "%7s";
        format        "%7d";
        value         "$controlchan_ihave_site{$key}";
        total         "total(%controlchan_ihave_site)";
    };
};

section sendme_site {
    title     "SENDME messages offered from:";
    data      "%controlchan_sendme_site";
    sort      "$controlchan_sendme_site{$b} <=> $controlchan_sendme_site{$a}
               or $a cmp $b";
    column {
        name          "System";
        format        "%-71.71s";
        value         "$key";
        format_total  "TOTAL: %-64.64s";
        total         "$num";
    };
    column {
        name          "Offered";
        format_name   "%7s";
        format        "%7d";
        value         "$controlchan_sendme_site{$key}";
        total         "total(%controlchan_sendme_site)";
    };
};
