Changeset 18852


Ignore:
Timestamp:
2009-12-19T23:19:09+01:00 (8 years ago)
Author:
nbd
Message:

wprobe: export raw values (n, s, ss) to ipfix collectors for improved measurement accuracy

Location:
trunk/package
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/libipfix/extra/append-wprobe-ie.pl

    r15061 r18852  
    22 
    33my @fields = ( 
    4         [ "_avg", "FLOAT", " - Average" ], 
    5         [ "_stdev", "FLOAT", " - Standard deviation" ], 
    6         [ "_n", "UINT", " - Number of samples" ] 
     4        [ "_n", "UINT", " - Number of samples", 4 ], 
     5        [ "_s", "UINT", " - Sum of samples", 8 ], 
     6        [ "_ss", "UINT", " - Sum of squared samples", 8 ], 
    77); 
    88 
     
    2424                my @f; 
    2525                if ($counter) { 
    26                         @f = [ "", "UINT", "" ]; 
     26                        @f = [ "", "UINT", "", 4]; 
    2727                } else { 
    2828                        @f = @fields; 
     
    3434                        my $ftype = $f->[1]; 
    3535                        my $fdesc = $f->[2]; 
    36                         print "$nr, IPFIX_FT_WPROBE_$rfield$N, 4, IPFIX_CODING_$ftype, \"$nfield$n\", \"$descr$fdesc\"\n"; 
     36                        my $size = $f->[3]; 
     37                        print "$nr, IPFIX_FT_WPROBE_$rfield$N, $size, IPFIX_CODING_$ftype, \"$nfield$n\", \"$descr$fdesc\"\n"; 
    3738                } 
    3839        }; 
  • trunk/package/libipfix/patches/110-wprobe_ie.patch

    r15061 r18852  
    55 314, IPFIX_FT_OWDVARMAX_NSEC,       4, IPFIX_CODING_INT, "owdvarmax_nsec", "FOKUS maximum ow variance in ns" 
    66  
    7 +315, IPFIX_FT_WPROBE_NOISE_AVG, 4, IPFIX_CODING_FLOAT, "global_noise_avg", "wprobe global noice floor - Average" 
    8 +316, IPFIX_FT_WPROBE_NOISE_STDEV, 4, IPFIX_CODING_FLOAT, "global_noise_stdev", "wprobe global noice floor - Standard deviation" 
    9 +317, IPFIX_FT_WPROBE_NOISE_N, 4, IPFIX_CODING_UINT, "global_noise_n", "wprobe global noice floor - Number of samples" 
    10 +318, IPFIX_FT_WPROBE_PHY_BUSY_AVG, 4, IPFIX_CODING_FLOAT, "global_phy_busy_avg", "wprobe global airtime total - Average" 
    11 +319, IPFIX_FT_WPROBE_PHY_BUSY_STDEV, 4, IPFIX_CODING_FLOAT, "global_phy_busy_stdev", "wprobe global airtime total - Standard deviation" 
    12 +320, IPFIX_FT_WPROBE_PHY_BUSY_N, 4, IPFIX_CODING_UINT, "global_phy_busy_n", "wprobe global airtime total - Number of samples" 
    13 +321, IPFIX_FT_WPROBE_PHY_RX_AVG, 4, IPFIX_CODING_FLOAT, "global_phy_rx_avg", "wprobe global airtime total from rx-frame - Average" 
    14 +322, IPFIX_FT_WPROBE_PHY_RX_STDEV, 4, IPFIX_CODING_FLOAT, "global_phy_rx_stdev", "wprobe global airtime total from rx-frame - Standard deviation" 
    15 +323, IPFIX_FT_WPROBE_PHY_RX_N, 4, IPFIX_CODING_UINT, "global_phy_rx_n", "wprobe global airtime total from rx-frame - Number of samples" 
    16 +324, IPFIX_FT_WPROBE_PHY_TX_AVG, 4, IPFIX_CODING_FLOAT, "global_phy_tx_avg", "wprobe global airtime total from tx-frame - Average" 
    17 +325, IPFIX_FT_WPROBE_PHY_TX_STDEV, 4, IPFIX_CODING_FLOAT, "global_phy_tx_stdev", "wprobe global airtime total from tx-frame - Standard deviation" 
    18 +326, IPFIX_FT_WPROBE_PHY_TX_N, 4, IPFIX_CODING_UINT, "global_phy_tx_n", "wprobe global airtime total from tx-frame - Number of samples" 
    19 +327, IPFIX_FT_WPROBE_RSSI_AVG, 4, IPFIX_CODING_FLOAT, "link_rssi_avg", "wprobe link received signal strength indication - Average" 
    20 +328, IPFIX_FT_WPROBE_RSSI_STDEV, 4, IPFIX_CODING_FLOAT, "link_rssi_stdev", "wprobe link received signal strength indication - Standard deviation" 
    21 +329, IPFIX_FT_WPROBE_RSSI_N, 4, IPFIX_CODING_UINT, "link_rssi_n", "wprobe link received signal strength indication - Number of samples" 
    22 +330, IPFIX_FT_WPROBE_SIGNAL_AVG, 4, IPFIX_CODING_FLOAT, "link_signal_avg", "wprobe link signal strength in dB - Average" 
    23 +331, IPFIX_FT_WPROBE_SIGNAL_STDEV, 4, IPFIX_CODING_FLOAT, "link_signal_stdev", "wprobe link signal strength in dB - Standard deviation" 
    24 +332, IPFIX_FT_WPROBE_SIGNAL_N, 4, IPFIX_CODING_UINT, "link_signal_n", "wprobe link signal strength in dB - Number of samples" 
    25 +333, IPFIX_FT_WPROBE_IEEE_RX_RATE_AVG, 4, IPFIX_CODING_FLOAT, "link_ieee_rx_rate_avg", "wprobe link IEEE 802.11 RX data rate - Average" 
    26 +334, IPFIX_FT_WPROBE_IEEE_RX_RATE_STDEV, 4, IPFIX_CODING_FLOAT, "link_ieee_rx_rate_stdev", "wprobe link IEEE 802.11 RX data rate - Standard deviation" 
    27 +335, IPFIX_FT_WPROBE_IEEE_RX_RATE_N, 4, IPFIX_CODING_UINT, "link_ieee_rx_rate_n", "wprobe link IEEE 802.11 RX data rate - Number of samples" 
    28 +336, IPFIX_FT_WPROBE_IEEE_TX_RATE_AVG, 4, IPFIX_CODING_FLOAT, "link_ieee_tx_rate_avg", "wprobe link IEEE 802.11 TX data rate - Average" 
    29 +337, IPFIX_FT_WPROBE_IEEE_TX_RATE_STDEV, 4, IPFIX_CODING_FLOAT, "link_ieee_tx_rate_stdev", "wprobe link IEEE 802.11 TX data rate - Standard deviation" 
    30 +338, IPFIX_FT_WPROBE_IEEE_TX_RATE_N, 4, IPFIX_CODING_UINT, "link_ieee_tx_rate_n", "wprobe link IEEE 802.11 TX data rate - Number of samples" 
    31 +339, IPFIX_FT_WPROBE_RETRANSMIT_200_AVG, 4, IPFIX_CODING_FLOAT, "link_retransmit_200_avg", "wprobe link total retransmissions per packet - <200 bytes - Average" 
    32 +340, IPFIX_FT_WPROBE_RETRANSMIT_200_STDEV, 4, IPFIX_CODING_FLOAT, "link_retransmit_200_stdev", "wprobe link total retransmissions per packet - <200 bytes - Standard deviation" 
    33 +341, IPFIX_FT_WPROBE_RETRANSMIT_200_N, 4, IPFIX_CODING_UINT, "link_retransmit_200_n", "wprobe link total retransmissions per packet - <200 bytes - Number of samples" 
    34 +342, IPFIX_FT_WPROBE_RETRANSMIT_400_AVG, 4, IPFIX_CODING_FLOAT, "link_retransmit_400_avg", "wprobe link total retransmissions per packet - <400 bytes - Average" 
    35 +343, IPFIX_FT_WPROBE_RETRANSMIT_400_STDEV, 4, IPFIX_CODING_FLOAT, "link_retransmit_400_stdev", "wprobe link total retransmissions per packet - <400 bytes - Standard deviation" 
    36 +344, IPFIX_FT_WPROBE_RETRANSMIT_400_N, 4, IPFIX_CODING_UINT, "link_retransmit_400_n", "wprobe link total retransmissions per packet - <400 bytes - Number of samples" 
    37 +345, IPFIX_FT_WPROBE_RETRANSMIT_800_AVG, 4, IPFIX_CODING_FLOAT, "link_retransmit_800_avg", "wprobe link total retransmissions per packet - <800 bytes - Average" 
    38 +346, IPFIX_FT_WPROBE_RETRANSMIT_800_STDEV, 4, IPFIX_CODING_FLOAT, "link_retransmit_800_stdev", "wprobe link total retransmissions per packet - <800 bytes - Standard deviation" 
    39 +347, IPFIX_FT_WPROBE_RETRANSMIT_800_N, 4, IPFIX_CODING_UINT, "link_retransmit_800_n", "wprobe link total retransmissions per packet - <800 bytes - Number of samples" 
    40 +348, IPFIX_FT_WPROBE_RETRANSMIT_1600_AVG, 4, IPFIX_CODING_FLOAT, "link_retransmit_1600_avg", "wprobe link total retransmissions per packet - >800 bytes - Average" 
    41 +349, IPFIX_FT_WPROBE_RETRANSMIT_1600_STDEV, 4, IPFIX_CODING_FLOAT, "link_retransmit_1600_stdev", "wprobe link total retransmissions per packet - >800 bytes - Standard deviation" 
    42 +350, IPFIX_FT_WPROBE_RETRANSMIT_1600_N, 4, IPFIX_CODING_UINT, "link_retransmit_1600_n", "wprobe link total retransmissions per packet - >800 bytes - Number of samples" 
     7+315, IPFIX_FT_WPROBE_NOISE_N, 4, IPFIX_CODING_UINT, "global_noise_n", "wprobe global noice floor - Number of samples" 
     8+316, IPFIX_FT_WPROBE_NOISE_S, 8, IPFIX_CODING_UINT, "global_noise_s", "wprobe global noice floor - Sum of samples" 
     9+317, IPFIX_FT_WPROBE_NOISE_SS, 8, IPFIX_CODING_UINT, "global_noise_ss", "wprobe global noice floor - Sum of squared samples" 
     10+318, IPFIX_FT_WPROBE_PHY_BUSY_N, 4, IPFIX_CODING_UINT, "global_phy_busy_n", "wprobe global airtime total - Number of samples" 
     11+319, IPFIX_FT_WPROBE_PHY_BUSY_S, 8, IPFIX_CODING_UINT, "global_phy_busy_s", "wprobe global airtime total - Sum of samples" 
     12+320, IPFIX_FT_WPROBE_PHY_BUSY_SS, 8, IPFIX_CODING_UINT, "global_phy_busy_ss", "wprobe global airtime total - Sum of squared samples" 
     13+321, IPFIX_FT_WPROBE_PHY_RX_N, 4, IPFIX_CODING_UINT, "global_phy_rx_n", "wprobe global airtime total from rx-frame - Number of samples" 
     14+322, IPFIX_FT_WPROBE_PHY_RX_S, 8, IPFIX_CODING_UINT, "global_phy_rx_s", "wprobe global airtime total from rx-frame - Sum of samples" 
     15+323, IPFIX_FT_WPROBE_PHY_RX_SS, 8, IPFIX_CODING_UINT, "global_phy_rx_ss", "wprobe global airtime total from rx-frame - Sum of squared samples" 
     16+324, IPFIX_FT_WPROBE_PHY_TX_N, 4, IPFIX_CODING_UINT, "global_phy_tx_n", "wprobe global airtime total from tx-frame - Number of samples" 
     17+325, IPFIX_FT_WPROBE_PHY_TX_S, 8, IPFIX_CODING_UINT, "global_phy_tx_s", "wprobe global airtime total from tx-frame - Sum of samples" 
     18+326, IPFIX_FT_WPROBE_PHY_TX_SS, 8, IPFIX_CODING_UINT, "global_phy_tx_ss", "wprobe global airtime total from tx-frame - Sum of squared samples" 
     19+327, IPFIX_FT_WPROBE_RSSI_N, 4, IPFIX_CODING_UINT, "link_rssi_n", "wprobe link received signal strength indication - Number of samples" 
     20+328, IPFIX_FT_WPROBE_RSSI_S, 8, IPFIX_CODING_UINT, "link_rssi_s", "wprobe link received signal strength indication - Sum of samples" 
     21+329, IPFIX_FT_WPROBE_RSSI_SS, 8, IPFIX_CODING_UINT, "link_rssi_ss", "wprobe link received signal strength indication - Sum of squared samples" 
     22+330, IPFIX_FT_WPROBE_SIGNAL_N, 4, IPFIX_CODING_UINT, "link_signal_n", "wprobe link signal strength in dB - Number of samples" 
     23+331, IPFIX_FT_WPROBE_SIGNAL_S, 8, IPFIX_CODING_UINT, "link_signal_s", "wprobe link signal strength in dB - Sum of samples" 
     24+332, IPFIX_FT_WPROBE_SIGNAL_SS, 8, IPFIX_CODING_UINT, "link_signal_ss", "wprobe link signal strength in dB - Sum of squared samples" 
     25+333, IPFIX_FT_WPROBE_IEEE_RX_RATE_N, 4, IPFIX_CODING_UINT, "link_ieee_rx_rate_n", "wprobe link IEEE 802.11 RX data rate - Number of samples" 
     26+334, IPFIX_FT_WPROBE_IEEE_RX_RATE_S, 8, IPFIX_CODING_UINT, "link_ieee_rx_rate_s", "wprobe link IEEE 802.11 RX data rate - Sum of samples" 
     27+335, IPFIX_FT_WPROBE_IEEE_RX_RATE_SS, 8, IPFIX_CODING_UINT, "link_ieee_rx_rate_ss", "wprobe link IEEE 802.11 RX data rate - Sum of squared samples" 
     28+336, IPFIX_FT_WPROBE_IEEE_TX_RATE_N, 4, IPFIX_CODING_UINT, "link_ieee_tx_rate_n", "wprobe link IEEE 802.11 TX data rate - Number of samples" 
     29+337, IPFIX_FT_WPROBE_IEEE_TX_RATE_S, 8, IPFIX_CODING_UINT, "link_ieee_tx_rate_s", "wprobe link IEEE 802.11 TX data rate - Sum of samples" 
     30+338, IPFIX_FT_WPROBE_IEEE_TX_RATE_SS, 8, IPFIX_CODING_UINT, "link_ieee_tx_rate_ss", "wprobe link IEEE 802.11 TX data rate - Sum of squared samples" 
     31+339, IPFIX_FT_WPROBE_RETRANSMIT_200_N, 4, IPFIX_CODING_UINT, "link_retransmit_200_n", "wprobe link total retransmissions per packet - <200 bytes - Number of samples" 
     32+340, IPFIX_FT_WPROBE_RETRANSMIT_200_S, 8, IPFIX_CODING_UINT, "link_retransmit_200_s", "wprobe link total retransmissions per packet - <200 bytes - Sum of samples" 
     33+341, IPFIX_FT_WPROBE_RETRANSMIT_200_SS, 8, IPFIX_CODING_UINT, "link_retransmit_200_ss", "wprobe link total retransmissions per packet - <200 bytes - Sum of squared samples" 
     34+342, IPFIX_FT_WPROBE_RETRANSMIT_400_N, 4, IPFIX_CODING_UINT, "link_retransmit_400_n", "wprobe link total retransmissions per packet - <400 bytes - Number of samples" 
     35+343, IPFIX_FT_WPROBE_RETRANSMIT_400_S, 8, IPFIX_CODING_UINT, "link_retransmit_400_s", "wprobe link total retransmissions per packet - <400 bytes - Sum of samples" 
     36+344, IPFIX_FT_WPROBE_RETRANSMIT_400_SS, 8, IPFIX_CODING_UINT, "link_retransmit_400_ss", "wprobe link total retransmissions per packet - <400 bytes - Sum of squared samples" 
     37+345, IPFIX_FT_WPROBE_RETRANSMIT_800_N, 4, IPFIX_CODING_UINT, "link_retransmit_800_n", "wprobe link total retransmissions per packet - <800 bytes - Number of samples" 
     38+346, IPFIX_FT_WPROBE_RETRANSMIT_800_S, 8, IPFIX_CODING_UINT, "link_retransmit_800_s", "wprobe link total retransmissions per packet - <800 bytes - Sum of samples" 
     39+347, IPFIX_FT_WPROBE_RETRANSMIT_800_SS, 8, IPFIX_CODING_UINT, "link_retransmit_800_ss", "wprobe link total retransmissions per packet - <800 bytes - Sum of squared samples" 
     40+348, IPFIX_FT_WPROBE_RETRANSMIT_1600_N, 4, IPFIX_CODING_UINT, "link_retransmit_1600_n", "wprobe link total retransmissions per packet - >800 bytes - Number of samples" 
     41+349, IPFIX_FT_WPROBE_RETRANSMIT_1600_S, 8, IPFIX_CODING_UINT, "link_retransmit_1600_s", "wprobe link total retransmissions per packet - >800 bytes - Sum of samples" 
     42+350, IPFIX_FT_WPROBE_RETRANSMIT_1600_SS, 8, IPFIX_CODING_UINT, "link_retransmit_1600_ss", "wprobe link total retransmissions per packet - >800 bytes - Sum of squared samples" 
    4343+351, IPFIX_FT_WPROBE_FRAMES, 4, IPFIX_CODING_UINT, "global_frames", "wprobe global number of 802.11 frames seen" 
    4444+352, IPFIX_FT_WPROBE_PROBEREQ, 4, IPFIX_CODING_UINT, "global_probereq", "wprobe global number of 802.11 probe requests seen" 
  • trunk/package/wprobe/src/exporter/wprobe-export.c

    r16727 r18852  
    2626        int id; 
    2727        bool counter; 
    28         float scale; 
    2928        const char *wprobe_id; 
    3029        struct wprobe_value *val; 
     
    3736#define WMAP(_id, _name, ...) \ 
    3837        { \ 
    39                 .scale = 1.0f, \ 
    4038                .counter = false, \ 
    41                 .id = IPFIX_FT_WPROBE_##_id##_AVG, \ 
     39                .id = IPFIX_FT_WPROBE_##_id##_N, \ 
    4240                .wprobe_id = _name \ 
    4341                , ## __VA_ARGS__ \ 
     
    4644#define WMAP_COUNTER(_id, _name, ...) \ 
    4745        { \ 
    48                 .scale = 1.0f, \ 
    4946                .counter = true, \ 
    5047                .id = IPFIX_FT_WPROBE_##_id, \ 
     
    145142                        g_data.addrs[f++] = &map[i].val->U32; 
    146143                else 
    147                         g_data.addrs[f++] = &map[i].val->avg; 
     144                        g_data.addrs[f++] = &map[i].val->n; 
    148145 
    149146        if (ipfix_add_field( handle, t, FOKUS_USERID, map[i].id + 0, 4) < 0) 
     
    153150                        continue; 
    154151 
    155                 g_data.addrs[f++] = &map[i].val->stdev; 
    156                 g_data.addrs[f++] = &map[i].val->n; 
    157         if (ipfix_add_field( handle, t, FOKUS_USERID, map[i].id + 1, 4) < 0) 
     152                g_data.addrs[f++] = &map[i].val->s; 
     153                g_data.addrs[f++] = &map[i].val->ss; 
     154        if (ipfix_add_field( handle, t, FOKUS_USERID, map[i].id + 1, 8) < 0) 
    158155            exit(1); 
    159         if (ipfix_add_field( handle, t, FOKUS_USERID, map[i].id + 2, 4) < 0) 
     156        if (ipfix_add_field( handle, t, FOKUS_USERID, map[i].id + 2, 8) < 0) 
    160157            exit(1); 
    161158    } 
Note: See TracChangeset for help on using the changeset viewer.