SolarCapture C Bindings User Guide  SF-115721-CD
Issue 3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sc_rate_monitor Node Reference

Node that measures and exports packet rate and bandwidth to solar_capture_monitor.

Detailed Description

This node measures and exports packet rate and bandwidth to solar_capture_monitor.

It passes packets from input to output without modification, and measures packet rate and bandwidth statistics using an exponential moving average.

The statistics can be accessed with the solar_capture_monitor tool.

Note that the total number of packets is also available from the solar_capture_monitor output in the pkts_in field, as for all nodes.

Arguments

Argument Optional? Default Type Description
alpha Yes 0.5 SC_PARAM_DBL Alpha value for the expoential moving average. Higher values give more weight to newer samples.
period Yes 0.1 SC_PARAM_DBL Period in seconds over which samples are measured.

Exposed Statistics

Statistics exposed by the sc_rate_monitor node.

Name Type Data Type Description
pkt_rate int pkt_rate Packet rate (packets/second).
cap_bytes uint64_t byte_count Sum of payload bytes.
link_bytes uint64_t byte_count Sum of frame_len (bytes on wire before snapping).
cap_bw uint64_t bandwidth Payload bandwidth (bits/second).
link_bw uint64_t bandwidth Bandwidth before snap (bits/second) (from frame_len field).