{{{#!comment [[Include(wiki:802.11/beta-note)]] }}} [[TracNav(802.11/TOC)]] = 802.11 Reference Design: TX/RX Log Process Examples = This set of examples of the Experiments Framework explores the information contained in the HDF5 log files. The first example, log_process_summary.py, will show at a quick summary of the the experiment, packets per rate for both Tx and Rx, Tx MPDU packet counts and number of bytes, and finally Rx packet counts and number of bytes. The second example, log_process_details.py, goes a bit deeper and looks at the number of re-transmissions as well as the average time it took to transmit a packet. Finally, the last example, log_process_throughput_vs_time.py, utilizes the [http://pandas.pydata.org/ pandas framework] to plot the throughput vs time of the AP and station. By default these scripts will use [wiki:../../sample_data sample data] but generally you can override this behavior with a command line argument or by modifying the *LOGFILE variable in the script. These examples demonstrates how to: * Extract information from an HDF5 log file * Use python packages to extract and process the log data == Log Process Summary == The flow of the log_process_summary.py script is: 1. Extract the log data from the HDF5 file 1. Extract the raw log index from the HDF5 file 1. Filter the raw log index to extract log entry types we desire 1. Convert the log data and filtered log index in to [http://www.numpy.org/ numpy] arrays. 1. Extract and print information from the NODE_INFO and TIME_INFO log entries. 1. Extract and process information from the TX and RX_OFDM log entries. To run this example: * Setup wlan_exp (see [wiki:../../GettingStarted Getting Started] for details) * Open a Python shell * CD to the '''Python_Reference/examples/txrx_log''' directory from the expanded 802.11 Reference design archive * Run {{{python log_process_summary.py}}} The script will run, then display its results: {{{ Reading log file 'raw_log_dual_flow_ap.hdf5' ( 20.2 MB) Raw Log Index Contents: 1 of Type 1 18,243 of Type 10 93,459 of Type 20 96,068 of Type 21 1 of Type 6 -------------------------- 207,772 total entries Filtered Log Index: 18,243 of Type RX_OFDM 1 of Type NODE_INFO 93,459 of Type TX 1 of Type TIME_INFO -------------------------- 111,704 total entries Node Info: Node Type : WLAN Exp (AP/DCF) MAC Address : 40:d8:55:04:21:3a Serial Number: W3-a-00189 WLAN Exp Ver : 0.9.0 Experiment Started at: Fri Apr 11 15:32:13 2014 Example 1: Pkts per Rate: Rate Tx Rx 6 Mbps: 941 0 9 Mbps: 0 0 12 Mbps: 0 0 18 Mbps: 92518 18243 24 Mbps: 0 0 36 Mbps: 0 0 48 Mbps: 0 0 54 Mbps: 0 0 Example 2: Tx MPDU Counts: Dest Addr # Pkts # Bytes MAC Addr Type 40:d8:55:04:20:bc 92518 131745632 Mango WARP Hardware ff:ff:ff:ff:ff:ff 941 65870 Broadcast Example 3: Rx Counts (including duplicates): Src Addr # Pkts # Bytes MAC Addr Type 40:d8:55:04:20:bc 18243 25978032 Mango WARP Hardware }}} To run the script on your own file, for example the one created by the [wiki:../txrx_log_capture two node, two flow log capture] example, then you would just need to run: {{{ python log_process_summary.py log_files/ap_log_stats.hdf5 }}} ---- '''Source:''' the script is included in the 802.11 Reference Design archive at '''Python_Reference/examples/txrx_log/log_process_summary.py'''. ---- == Log Process Details == The flow of the log_process_details.py script is: 1. Extract the log data from the HDF5 file 1. Extract the raw log index from the HDF5 file 1. Filter the raw log index to extract log entry types we desire 1. Convert the log data and filtered log index in to [http://www.numpy.org/ numpy] arrays. 1. Extract and process information from the TX and TX_LOW log entries. 1. Extract and process information from the TX, TX_LOW and RX_OFDM log entries. To run this example: * Setup wlan_exp (see [wiki:../../GettingStarted Getting Started] for details) * Open a Python shell * CD to the '''Python_Reference/examples/txrx_log''' directory from the expanded 802.11 Reference design archive * Run {{{python log_process_details.py}}} The script will run, then display its results: {{{ Reading log file 'raw_log_dual_flow_ap.hdf5' ( 20.2 MB) Log Index Contents: 1 of Type 1 18,243 of Type 10 93,459 of Type 20 96,068 of Type 21 1 of Type 6 -------------------------- 207,772 total entries Filtered Log Index: 18,243 of Type RX_OFDM 96,068 of Type TX_LOW 1 of Type NODE_INFO 93,459 of Type TX -------------------------- 207,771 total entries Example 1: Tx Information per Rate: Rate # Tx Pkts Avg Tx time (us) CPU High CPU Low Re-trans CPU High 6 Mbps: 941 941 0 431 9 Mbps: 0 0 0 0 12 Mbps: 0 0 0 0 18 Mbps: 92518 95127 2609 961 24 Mbps: 0 0 0 0 36 Mbps: 0 0 0 0 48 Mbps: 0 0 0 0 54 Mbps: 0 0 0 0 Total Retransmissions: 2609 Example 2: Tx Counts (CPU High): Dest Addr # Pkts # Bytes MAC Addr Type 40:d8:55:04:20:bc 92518 131745632 Mango WARP Hardware ff:ff:ff:ff:ff:ff 941 65870 Broadcast Example 2: Tx Counts (CPU Low - includes retransmissions): Dest Addr # Pkts # Bytes MAC Addr Type 40:d8:55:04:20:bc 95127 135460848 Mango WARP Hardware ff:ff:ff:ff:ff:ff 941 65870 Broadcast Example 3: Rx Counts (including duplicates): Dest Addr # Pkts # Bytes MAC Addr Type 40:d8:55:04:20:bc 18243 25978032 Mango WARP Hardware }}} To run the script on your own file, for example the one created by the [wiki:../txrx_log_capture two node, two flow log capture] example, then you would just need to run: {{{ python log_process_details.py log_files/ap_log_stats.hdf5 }}} ---- '''Source:''' the script is included in the 802.11 Reference Design archive at '''Python_Reference/examples/txrx_log/log_process_details.py'''. ---- == Log Process Throughput vs Time == The flow of the log_process_throughput_vs_time.py script is: 1. Extract the log data from the HDF5 file 1. Extract the raw log index from the HDF5 file 1. Filter the raw log index to extract log entry types we desire 1. Convert the log data and filtered log index in to [http://www.numpy.org/ numpy] arrays. 1. Extract and print information from the NODE_INFO and TIME_INFO log entries. 1. Extract and process information from the TX and RX_OFDM log entries. To run this example: * Setup wlan_exp (see [wiki:../../GettingStarted Getting Started] for details) * Open a Python shell * CD to the '''Python_Reference/examples/txrx_log''' directory from the expanded 802.11 Reference design archive * Run {{{python log_process_throughput_vs_time.py}}} The script will run, then display its results: {{{ }}} ---- '''Source:''' the script is included in the 802.11 Reference Design archive at '''Python_Reference/examples/txrx_log/log_process_throughput_vs_time.py'''. ----