From 1889dcbf7224138908ed0f266149f2c7a85c82c4 Mon Sep 17 00:00:00 2001 From: rtrimana Date: Mon, 19 Mar 2018 15:36:55 -0700 Subject: [PATCH] More scripts to plot graphs with labels. --- plot_scripts/plot_ts_graph_dlink_labeled | 75 +++++++++++++++++ .../plot_ts_graph_smartthings-mp-sensor | 82 +++++++++++++++++++ ...ot_ts_graph_smartthings-mp-sensor_combined | 44 ++++++++++ .../plot_ts_graph_smartthings-plug_combined | 8 +- .../plot_ts_graph_smartthings-plug_labeled | 77 +++++++++++++++++ plot_scripts/plot_ts_graph_tplink_labeled | 74 +++++++++++++++++ plot_scripts/plot_ts_graph_wemo | 40 ++++----- .../plot_ts_graph_wemo-insight_labeled | 74 +++++++++++++++++ plot_scripts/plot_ts_graph_wemo_labeled | 63 ++++++++++++++ run.sh | 29 ++++--- 10 files changed, 532 insertions(+), 34 deletions(-) create mode 100644 plot_scripts/plot_ts_graph_dlink_labeled create mode 100644 plot_scripts/plot_ts_graph_smartthings-mp-sensor create mode 100644 plot_scripts/plot_ts_graph_smartthings-mp-sensor_combined create mode 100644 plot_scripts/plot_ts_graph_smartthings-plug_labeled create mode 100644 plot_scripts/plot_ts_graph_tplink_labeled create mode 100644 plot_scripts/plot_ts_graph_wemo-insight_labeled create mode 100644 plot_scripts/plot_ts_graph_wemo_labeled diff --git a/plot_scripts/plot_ts_graph_dlink_labeled b/plot_scripts/plot_ts_graph_dlink_labeled new file mode 100644 index 0000000..84f75da --- /dev/null +++ b/plot_scripts/plot_ts_graph_dlink_labeled @@ -0,0 +1,75 @@ +# Script to plot time series graphs for network traffic analysis +# +# by Rahmadi Trimananda (rahmadi.trimananda@uci.edu) +# Programming Language Research Group @ University of California, Irvine +# Winter 2018 + +# ************ # +# BASIC SETUP # +# ************ # +set terminal pdfcairo enhanced font 'Verdana,10' +set autoscale +set key +unset log +unset label +set xtics 50 +set xtics rotate by 60 right +set ytics auto +set xlabel "Packet Timestamp (hh:mm:ss)" +set ylabel "Packet Size (bytes)" +set xdata time +set timefmt "%H:%M:%S" +set xrange [:] +set yrange [0:] + +# ************ # +# ON/OFF LABEL # +# ************ # +set label "1-ON" at "15:07:05", 4000 tc rgb "blue" +set label "1-OFF" at "15:08:08", 2000 tc rgb "red" +set label "2-ON" at "15:09:12", 4000 tc rgb "blue" +set label "2-OFF" at "15:10:19", 2000 tc rgb "red" +set label "3-ON" at "15:11:15", 4000 tc rgb "blue" +set label "3-OFF" at "15:12:16", 2000 tc rgb "red" +set label "4-ON" at "15:14:25", 4000 tc rgb "blue" +set label "4-OFF" at "15:15:24", 2000 tc rgb "red" +set label "5-ON" at "15:16:28", 4000 tc rgb "blue" +set label "5-OFF" at "15:17:29", 2000 tc rgb "red" +set label "6-ON" at "15:18:31", 4000 tc rgb "blue" +set label "6-OFF" at "15:19:33", 2000 tc rgb "red" + +# ***************** # +# PER DEVICE SETUP # +# ***************** # +# DLink switch local +# wlan1 +set output './result/dlink_switch_wlan1_timestamp_local_incoming_outgoing.pdf' +set title "DLink Switch Incoming/Outgoing Local Traffic (wlan1)" +plot "./result/dlink_switch_wlan1_local_incoming.dat" using 1:2 with lines dt 4 title "Incoming", "./result/dlink_switch_wlan1_local_outgoing.dat" using 1:2 with lines title "Outgoing" + +# ************ # +# ON/OFF LABEL # +# ************ # +set label "1-ON" at "15:23:58", 4000 tc rgb "blue" +set label "1-OFF" at "15:24:55", 3000 tc rgb "red" +set label "2-ON" at "15:25:56", 4000 tc rgb "blue" +set label "2-OFF" at "15:26:56", 3000 tc rgb "red" +set label "3-ON" at "15:27:58", 4000 tc rgb "blue" +set label "3-OFF" at "15:28:58", 3000 tc rgb "red" +set label "4-ON" at "15:31:11", 4000 tc rgb "blue" +set label "4-OFF" at "15:32:08", 3000 tc rgb "red" +set label "5-ON" at "15:33:09", 4000 tc rgb "blue" +set label "5-OFF" at "15:34:10", 3000 tc rgb "red" +set label "6-ON" at "15:35:12", 4000 tc rgb "blue" +set label "6-OFF" at "15:36:15", 3000 tc rgb "red" + +# ***************** # +# PER DEVICE SETUP # +# ***************** # +# DLink switch remote +# wlan1 +set output './result/dlink_switch_wlan1_timestamp_remote_incoming_outgoing.pdf' +set title "DLink Switch Incoming Remote Traffic (wlan1)" +plot "./result/dlink_switch_wlan1_remote_incoming.dat" using 1:2 with lines dt 4 title "Incoming", "./result/dlink_switch_wlan1_remote_outgoing.dat" using 1:2 with lines title "Outgoing" + + diff --git a/plot_scripts/plot_ts_graph_smartthings-mp-sensor b/plot_scripts/plot_ts_graph_smartthings-mp-sensor new file mode 100644 index 0000000..b06bf41 --- /dev/null +++ b/plot_scripts/plot_ts_graph_smartthings-mp-sensor @@ -0,0 +1,82 @@ +# Script to plot time series graphs for network traffic analysis +# +# by Rahmadi Trimananda (rahmadi.trimananda@uci.edu) +# Programming Language Research Group @ University of California, Irvine +# Winter 2018 + +# ************ # +# BASIC SETUP # +# ************ # +set terminal pngcairo enhanced font 'Verdana,10' +set autoscale +unset key +unset log +unset label +set xtics 50 +set xtics rotate by 60 right +set ytics auto +set xlabel "Packet Timestamp (hh:mm:ss)" +set ylabel "Packet Size (bytes)" +set xdata time +set timefmt "%H:%M:%S" +set xrange [:] +set yrange [0:] + +# ***************** # +# PER DEVICE SETUP # +# ***************** # +# SmartThings Multipurpose Sensor local +# eth0 +set output './result/smartthings-mp-sensor_switch_eth0_timestamp_local_incoming.png' +set title "SmartThings Multipurpose Sensor Incoming Local Traffic (eth0)" +plot "./result/smartthings-mp-sensor_switch_eth0_local_incoming.dat" using 1:2 with lines +set output './result/smartthings-mp-sensor_switch_eth0_timestamp_local_outgoing.png' +set title "SmartThings Multipurpose Sensor Outgoing Local Traffic (eth0)" +plot "./result/smartthings-mp-sensor_switch_eth0_local_outgoing.dat" using 1:2 with lines +# eth1 +set output './result/smartthings-mp-sensor_switch_eth1_timestamp_local_incoming.png' +set title "SmartThings Multipurpose Sensor Incoming Local Traffic (eth1)" +plot "./result/smartthings-mp-sensor_switch_eth1_local_incoming.dat" using 1:2 with lines +set output './result/smartthings-mp-sensor_switch_eth1_timestamp_local_outgoing.png' +set title "SmartThings Multipurpose Sensor Outgoing Local Traffic (eth1)" +plot "./result/smartthings-mp-sensor_switch_eth1_local_outgoing.dat" using 1:2 with lines +# wlan1 +#set output './result/smartthings-mp-sensor_switch_wlan1_timestamp_local_incoming.png' +#set title "SmartThings Multipurpose Sensor Incoming Local Traffic (wlan1)" +#plot "./result/smartthings-mp-sensor_switch_wlan1_local_incoming.dat" using 1:2 with lines +set output './result/smartthings-mp-sensor_switch_wlan1_timestamp_local_outgoing.png' +set title "SmartThings Multipurpose Sensor Outgoing Local Traffic (wlan1)" +plot "./result/smartthings-mp-sensor_switch_wlan1_local_outgoing.dat" using 1:2 with lines + +# SmartThings Multipurpose Sensor remote +# eth0 +set output './result/smartthings-mp-sensor_switch_eth0_timestamp_remote_incoming.png' +set title "SmartThings Multipurpose Sensor Incoming Remote Traffic (eth0)" +plot "./result/smartthings-mp-sensor_switch_eth0_remote_incoming.dat" using 1:2 with lines +set output './result/smartthings-mp-sensor_switch_eth0_timestamp_remote_outgoing.png' +set title "SmartThings Multipurpose Sensor Outgoing Remote Traffic (eth0)" +plot "./result/smartthings-mp-sensor_switch_eth0_remote_outgoing.dat" using 1:2 with lines +# eth1 +set output './result/smartthings-mp-sensor_switch_eth1_timestamp_remote_incoming.png' +set title "SmartThings Multipurpose Sensor Incoming Remote Traffic (eth1)" +plot "./result/smartthings-mp-sensor_switch_eth1_remote_incoming.dat" using 1:2 with lines +set output './result/smartthings-mp-sensor_switch_eth1_timestamp_remote_outgoing.png' +set title "SmartThings Multipurpose Sensor Outgoing Remote Traffic (eth1)" +plot "./result/smartthings-mp-sensor_switch_eth1_remote_outgoing.dat" using 1:2 with lines +# wlan1 +#set output './result/smartthings-mp-sensor_switch_wlan1_timestamp_remote_incoming.png' +#set title "SmartThings Multipurpose Sensor Incoming Remote Traffic (wlan1)" +#plot "./result/smartthings-mp-sensor_switch_wlan1_remote_incoming.dat" using 1:2 with lines +#set output './result/smartthings-mp-sensor_switch_wlan1_timestamp_remote_outgoing.png' +#set title "SmartThings Multipurpose Sensor Outgoing Remote Traffic (wlan1)" +#plot "./result/smartthings-mp-sensor_switch_wlan1_remote_outgoing.dat" using 1:2 with lines + +# SmartThings Multipurpose Sensor phone local +# wlan1 +set output './result/smartthings-mp-sensor_phone_wlan1_timestamp_local_incoming.png' +set title "SmartThings Multipurpose Sensor Phone Incoming Local Traffic (wlan1)" +plot "./result/smartthings-mp-sensor_phone_wlan1_local_incoming.dat" using 1:2 with lines +set output './result/smartthings-mp-sensor_phone_wlan1_timestamp_local_outgoing.png' +set title "SmartThings Multipurpose Sensor Phone Outgoing Local Traffic (wlan1)" +plot "./result/smartthings-mp-sensor_phone_wlan1_local_outgoing.dat" using 1:2 with lines + diff --git a/plot_scripts/plot_ts_graph_smartthings-mp-sensor_combined b/plot_scripts/plot_ts_graph_smartthings-mp-sensor_combined new file mode 100644 index 0000000..ce16a52 --- /dev/null +++ b/plot_scripts/plot_ts_graph_smartthings-mp-sensor_combined @@ -0,0 +1,44 @@ +# Script to plot time series graphs for network traffic analysis +# +# by Rahmadi Trimananda (rahmadi.trimananda@uci.edu) +# Programming Language Research Group @ University of California, Irvine +# Winter 2018 + +# ************ # +# BASIC SETUP # +# ************ # +set terminal pngcairo enhanced font 'Verdana,10' +set autoscale +set key +unset log +unset label +set xtics 50 +set xtics rotate by 60 right +set ytics auto +set xlabel "Packet Timestamp (hh:mm:ss)" +set ylabel "Packet Size (bytes)" +set xdata time +set timefmt "%H:%M:%S" +set xrange [:] +set yrange [0:] + +# ***************** # +# PER DEVICE SETUP # +# ***************** # +# SmartThings Multipurpose Sensor local +# wlan1 / eth0 / eth1 +set output './result/smartthings-mp-sensor_switch_wlan1_timestamp_local_incoming_combined.png' +set title "SmartThings Multipurpose Sensor Incoming Local Traffic (wlan1/eth0/eth1)" +plot "./result/smartthings-mp-sensor_switch_eth0_local_incoming.dat" using 1:2 with lines title "eth0", "./result/smartthings-mp-sensor_switch_eth1_local_incoming.dat" using 1:2 with lines title "eth1", "./result/smartthings-mp-sensor_phone_wlan1_local_outgoing.dat" using 1:2 with lines title "wlan1-phone-outgoing", "./result/smartthings-mp-sensor_phone_wlan1_local_incoming.dat" using 1:2 with lines title "wlan1-phone-incoming" +set output './result/smartthings-mp-sensor_switch_wlan1_timestamp_local_outgoing_combined.png' +set title "SmartThings Multipurpose Sensor Outgoing Local Traffic (wlan1/eth0/eth1)" +plot "./result/smartthings-mp-sensor_switch_wlan1_local_outgoing.dat" using 1:2 with lines title "wlan1", "./result/smartthings-mp-sensor_switch_eth0_local_outgoing.dat" using 1:2 with lines title "eth0", "./result/smartthings-mp-sensor_switch_eth1_local_outgoing.dat" using 1:2 with lines title "eth1", "./result/smartthings-mp-sensor_phone_wlan1_local_outgoing.dat" using 1:2 with lines title "wlan1-phone-outgoing", "./result/smartthings-mp-sensor_phone_wlan1_local_incoming.dat" using 1:2 with lines title "wlan1-phone-incoming" + +# SmartThings Multipurpose Sensor remote +# eth0 / eth1 +set output './result/smartthings-mp-sensor_switch_wlan1_timestamp_remote_incoming_combined.png' +set title "SmartThings Multipurpose Sensor Incoming Remote Traffic (eth0/eth1)" +plot "./result/smartthings-mp-sensor_switch_eth0_remote_incoming.dat" using 1:2 with lines title "eth0", "./result/smartthings-mp-sensor_switch_eth1_remote_incoming.dat" using 1:2 with lines title "eth1" +set output './result/smartthings-mp-sensor_switch_wlan1_timestamp_remote_outgoing_combined.png' +set title "SmartThings Multipurpose Sensor Outgoing Remote Traffic (eth0/eth1)" +plot "./result/smartthings-mp-sensor_switch_eth0_remote_outgoing.dat" using 1:2 with lines title "eth0", "./result/smartthings-mp-sensor_switch_eth1_remote_outgoing.dat" using 1:2 with lines title "eth1" diff --git a/plot_scripts/plot_ts_graph_smartthings-plug_combined b/plot_scripts/plot_ts_graph_smartthings-plug_combined index d8eeddf..f0133cc 100644 --- a/plot_scripts/plot_ts_graph_smartthings-plug_combined +++ b/plot_scripts/plot_ts_graph_smartthings-plug_combined @@ -31,14 +31,14 @@ set output './result/smartthings-plug_switch_wlan1_timestamp_local_incoming_comb set title "SmartThings Plug Switch Incoming Local Traffic (wlan1/eth0/eth1)" plot "./result/smartthings-plug_switch_eth0_local_incoming.dat" using 1:2 with lines title "eth0", "./result/smartthings-plug_switch_eth1_local_incoming.dat" using 1:2 with lines title "eth1", "./result/smartthings-plug_phone_wlan1_local_outgoing.dat" using 1:2 with lines title "wlan1-phone-outgoing", "./result/smartthings-plug_phone_wlan1_local_incoming.dat" using 1:2 with lines title "wlan1-phone-incoming" set output './result/smartthings-plug_switch_wlan1_timestamp_local_outgoing_combined.png' -set title "SmartThings Plug Switch Outgoing Local Traffic (wlan1/eth0)" +set title "SmartThings Plug Switch Outgoing Local Traffic (wlan1/eth0/eth1)" plot "./result/smartthings-plug_switch_wlan1_local_outgoing.dat" using 1:2 with lines title "wlan1", "./result/smartthings-plug_switch_eth0_local_outgoing.dat" using 1:2 with lines title "eth0", "./result/smartthings-plug_switch_eth1_local_outgoing.dat" using 1:2 with lines title "eth1", "./result/smartthings-plug_phone_wlan1_local_outgoing.dat" using 1:2 with lines title "wlan1-phone-outgoing", "./result/smartthings-plug_phone_wlan1_local_incoming.dat" using 1:2 with lines title "wlan1-phone-incoming" # SmartThings Plug switch remote -# wlan1 / eth0 / eth1 +# eth0 / eth1 set output './result/smartthings-plug_switch_wlan1_timestamp_remote_incoming_combined.png' -set title "SmartThings Plug Switch Incoming Remote Traffic (wlan1/eth0/eth1)" +set title "SmartThings Plug Switch Incoming Remote Traffic (eth0/eth1)" plot "./result/smartthings-plug_switch_eth0_remote_incoming.dat" using 1:2 with lines title "eth0", "./result/smartthings-plug_switch_eth1_remote_incoming.dat" using 1:2 with lines title "eth1" set output './result/smartthings-plug_switch_wlan1_timestamp_remote_outgoing_combined.png' -set title "SmartThings Plug Switch Outgoing Remote Traffic (wlan1/eth0)" +set title "SmartThings Plug Switch Outgoing Remote Traffic (eth0/eth1)" plot "./result/smartthings-plug_switch_eth0_remote_outgoing.dat" using 1:2 with lines title "eth0", "./result/smartthings-plug_switch_eth1_remote_outgoing.dat" using 1:2 with lines title "eth1" diff --git a/plot_scripts/plot_ts_graph_smartthings-plug_labeled b/plot_scripts/plot_ts_graph_smartthings-plug_labeled new file mode 100644 index 0000000..02a1fc7 --- /dev/null +++ b/plot_scripts/plot_ts_graph_smartthings-plug_labeled @@ -0,0 +1,77 @@ +# Script to plot time series graphs for network traffic analysis +# +# by Rahmadi Trimananda (rahmadi.trimananda@uci.edu) +# Programming Language Research Group @ University of California, Irvine +# Winter 2018 + +# ************ # +# BASIC SETUP # +# ************ # +set terminal pdfcairo enhanced font 'Verdana,10' +set autoscale +set key +unset log +unset label +set xtics 50 +set xtics rotate by 60 right +set ytics auto +set xlabel "Packet Timestamp (hh:mm:ss)" +set ylabel "Packet Size (bytes)" +set xdata time +set timefmt "%H:%M:%S" +set xrange [:] +set yrange [0:] + +# ************ # +# ON/OFF LABEL # +# ************ # +set label "1-ON" at "15:21:44", 2000 tc rgb "blue" +set label "1-OFF" at "15:23:04", 4000 tc rgb "red" +set label "2-ON" at "15:23:57", 2000 tc rgb "blue" +set label "2-OFF" at "15:24:58", 4000 tc rgb "red" +set label "3-ON" at "15:25:59", 2000 tc rgb "blue" +set label "3-OFF" at "15:27:01", 4000 tc rgb "red" +set label "4-ON" at "15:29:17", 2000 tc rgb "blue" +set label "4-OFF" at "15:30:13", 2500 tc rgb "red" +set label "5-ON" at "15:31:14", 2000 tc rgb "blue" +set label "5-OFF" at "15:32:15", 4000 tc rgb "red" +set label "6-ON" at "15:33:17", 8000 tc rgb "blue" +set label "6-OFF" at "15:34:16", 4000 tc rgb "red" + + +# ***************** # +# PER DEVICE SETUP # +# ***************** # +# SmartThings Plug switch local +# eth1 +set output './result/smartthings-plug_switch_eth1_timestamp_local_incoming_outgoing.pdf' +set title "SmartThings Plug Switch Incoming/Outgoing Local Traffic (eth1)" +plot "./result/smartthings-plug_switch_eth1_local_incoming.dat" using 1:2 with lines dt 4 title "Incoming", "./result/smartthings-plug_switch_eth1_local_outgoing.dat" using 1:2 with lines title "Outgoing" + +# ************ # +# ON/OFF LABEL # +# ************ # +set label "1-ON" at "15:38:22", 1500 tc rgb "blue" +set label "1-OFF" at "15:39:24", 1000 tc rgb "red" +set label "2-ON" at "15:40:24", 1500 tc rgb "blue" +set label "2-OFF" at "15:41:27", 1000 tc rgb "red" +set label "3-ON" at "15:42:27", 1500 tc rgb "blue" +set label "3-OFF" at "15:43:29", 1000 tc rgb "red" +set label "4-ON" at "15:45:32", 1500 tc rgb "blue" +set label "4-OFF" at "15:46:33", 1000 tc rgb "red" +set label "5-ON" at "15:47:36", 1500 tc rgb "blue" +set label "5-OFF" at "15:48:36", 1000 tc rgb "red" +set label "6-ON" at "15:49:39", 1500 tc rgb "blue" +set label "6-OFF" at "15:50:42", 1000 tc rgb "red" + + +# ***************** # +# PER DEVICE SETUP # +# ***************** # +# SmartThings Plug switch remote +# eth1 +set output './result/smartthings-plug_switch_eth1_timestamp_remote_incoming_outgoing.pdf' +set title "SmartThings Plug Switch Incoming/Outgoing Remote Traffic (eth1)" +plot "./result/smartthings-plug_switch_eth1_remote_incoming.dat" using 1:2 with lines dt 4 title "Incoming", "./result/smartthings-plug_switch_eth1_remote_outgoing.dat" using 1:2 with lines title "Outgoing" + + diff --git a/plot_scripts/plot_ts_graph_tplink_labeled b/plot_scripts/plot_ts_graph_tplink_labeled new file mode 100644 index 0000000..e9af2d7 --- /dev/null +++ b/plot_scripts/plot_ts_graph_tplink_labeled @@ -0,0 +1,74 @@ +# Script to plot time series graphs for network traffic analysis +# +# by Rahmadi Trimananda (rahmadi.trimananda@uci.edu) +# Programming Language Research Group @ University of California, Irvine +# Winter 2018 + +# ************ # +# BASIC SETUP # +# ************ # +set terminal pdfcairo enhanced font 'Verdana,10' +set autoscale +set key +unset log +unset label +set xtics 50 +set xtics rotate by 60 right +set ytics auto +set xlabel "Packet Timestamp (hh:mm:ss)" +set ylabel "Packet Size (bytes)" +set xdata time +set timefmt "%H:%M:%S" +set xrange [:] +set yrange [0:] + +# ************ # +# ON/OFF LABEL # +# ************ # +set label "1-ON" at "13:38:04", 9000 tc rgb "blue" +set label "1-OFF" at "13:39:03", 7000 tc rgb "red" +set label "2-ON" at "13:40:05", 9000 tc rgb "blue" +set label "2-OFF" at "13:41:08", 7000 tc rgb "red" +set label "3-ON" at "13:42:07", 9000 tc rgb "blue" +set label "3-OFF" at "13:43:09", 7000 tc rgb "red" +set label "4-ON" at "13:45:25", 9000 tc rgb "blue" +set label "4-OFF" at "13:46:27", 7000 tc rgb "red" +set label "5-ON" at "13:47:28", 9000 tc rgb "blue" +set label "5-OFF" at "13:48:29", 7000 tc rgb "red" +set label "6-ON" at "13:49:31", 9000 tc rgb "blue" +set label "6-OFF" at "13:50:30", 7000 tc rgb "red" + +# ***************** # +# PER DEVICE SETUP # +# ***************** # +# TPLink switch local +# wlan1 +set output './result/tplink_switch_wlan1_timestamp_local_incoming_outgoing.pdf' +set title "TP-Link Switch Incoming/Outgoing Local Traffic (wlan1)" +plot "./result/tplink_switch_wlan1_local_incoming.dat" using 1:2 with lines title "Incoming", "./result/tplink_switch_wlan1_local_outgoing.dat" using 1:2 with lines dt 4 title "Outgoing" + +# ************ # +# ON/OFF LABEL # +# ************ # +set label "1-ON" at "13:54:35", 8000 tc rgb "blue" +set label "1-OFF" at "13:55:31", 7000 tc rgb "red" +set label "2-ON" at "13:56:32", 8000 tc rgb "blue" +set label "2-OFF" at "13:57:33", 7000 tc rgb "red" +set label "3-ON" at "13:58:37", 8000 tc rgb "blue" +set label "3-OFF" at "13:59:37", 7000 tc rgb "red" +set label "4-ON" at "14:01:42", 8000 tc rgb "blue" +set label "4-OFF" at "14:02:42", 7000 tc rgb "red" +set label "5-ON" at "14:03:44", 8000 tc rgb "blue" +set label "5-OFF" at "14:04:47", 7000 tc rgb "red" +set label "6-ON" at "14:05:47", 6000 tc rgb "blue" +set label "6-OFF" at "14:06:49", 7000 tc rgb "red" + +# ***************** # +# PER DEVICE SETUP # +# ***************** # +# TPLink switch remote +# wlan1 +set output './result/tplink_switch_wlan1_timestamp_remote_incoming_outgoing.pdf' +set title "TP-Link Switch Incoming/Outgoing Remote Traffic (wlan1)" +plot "./result/tplink_switch_wlan1_remote_incoming.dat" using 1:2 with lines title "Incoming", "./result/tplink_switch_wlan1_remote_outgoing.dat" using 1:2 with lines dt 4 title "Outgoing" + diff --git a/plot_scripts/plot_ts_graph_wemo b/plot_scripts/plot_ts_graph_wemo index dfe1641..7b8d592 100644 --- a/plot_scripts/plot_ts_graph_wemo +++ b/plot_scripts/plot_ts_graph_wemo @@ -27,42 +27,42 @@ set yrange [0:] # ***************** # # WeMo switch local # eth0 -set output './result/wemo_switch_eth_timestamp_local_incoming.png' +set output './result/wemo_switch_eth0_timestamp_local_incoming.png' set title "WeMo Switch Incoming Local Traffic (eth0)" -plot "./result/wemo_switch_eth_local_incoming.dat" using 1:2 with lines -set output './result/wemo_switch_eth_timestamp_local_outgoing.png' +plot "./result/wemo_switch_eth0_local_incoming.dat" using 1:2 with lines +set output './result/wemo_switch_eth0_timestamp_local_outgoing.png' set title "WeMo Switch Outgoing Local Traffic (eth0)" -plot "./result/wemo_switch_eth_local_outgoing.dat" using 1:2 with lines +plot "./result/wemo_switch_eth0_local_outgoing.dat" using 1:2 with lines # wlan1 -set output './result/wemo_switch_wlan_timestamp_local_incoming.png' +set output './result/wemo_switch_wlan1_timestamp_local_incoming.png' set title "WeMo Switch Incoming Local Traffic (wlan1)" -plot "./result/wemo_switch_wlan_local_incoming.dat" using 1:2 with lines -set output './result/wemo_switch_wlan_timestamp_local_outgoing.png' +plot "./result/wemo_switch_wlan1_local_incoming.dat" using 1:2 with lines +set output './result/wemo_switch_wlan1_timestamp_local_outgoing.png' set title "WeMo Switch Outgoing Local Traffic (wlan1)" -plot "./result/wemo_switch_wlan_local_outgoing.dat" using 1:2 with lines +plot "./result/wemo_switch_wlan1_local_outgoing.dat" using 1:2 with lines # WeMo switch remote # eth0 -set output './result/wemo_switch_eth_timestamp_remote_incoming.png' +set output './result/wemo_switch_eth0_timestamp_remote_incoming.png' set title "WeMo Switch Incoming Remote Traffic (eth0)" -plot "./result/wemo_switch_eth_remote_incoming.dat" using 1:2 with lines -set output './result/wemo_switch_eth_timestamp_remote_outgoing.png' +plot "./result/wemo_switch_eth0_remote_incoming.dat" using 1:2 with lines +set output './result/wemo_switch_eth0_timestamp_remote_outgoing.png' set title "WeMo Switch Outgoing Remote Traffic (eth0)" -plot "./result/wemo_switch_eth_remote_outgoing.dat" using 1:2 with lines +plot "./result/wemo_switch_eth0_remote_outgoing.dat" using 1:2 with lines # wlan1 -set output './result/wemo_switch_wlan_timestamp_remote_incoming.png' +set output './result/wemo_switch_wlan1_timestamp_remote_incoming.png' set title "WeMo Switch Incoming Remote Traffic (wlan1)" -plot "./result/wemo_switch_wlan_remote_incoming.dat" using 1:2 with lines -set output './result/wemo_switch_wlan_timestamp_remote_outgoing.png' +plot "./result/wemo_switch_wlan1_remote_incoming.dat" using 1:2 with lines +set output './result/wemo_switch_wlan1_timestamp_remote_outgoing.png' set title "WeMo Switch Outgoing Remote Traffic (wlan1)" -plot "./result/wemo_switch_wlan_remote_outgoing.dat" using 1:2 with lines +plot "./result/wemo_switch_wlan1_remote_outgoing.dat" using 1:2 with lines # WeMo phone local # wlan1 -set output './result/wemo_phone_wlan_timestamp_local_incoming.png' +set output './result/wemo_phone_wlan1_timestamp_local_incoming.png' set title "WeMo Phone Incoming Local Traffic (wlan1)" -plot "./result/wemo_phone_wlan_local_incoming.dat" using 1:2 with lines -set output './result/wemo_phone_wlan_timestamp_local_outgoing.png' +plot "./result/wemo_phone_wlan1_local_incoming.dat" using 1:2 with lines +set output './result/wemo_phone_wlan1_timestamp_local_outgoing.png' set title "WeMo Phone Outgoing Local Traffic (wlan1)" -plot "./result/wemo_phone_wlan_local_outgoing.dat" using 1:2 with lines +plot "./result/wemo_phone_wlan1_local_outgoing.dat" using 1:2 with lines diff --git a/plot_scripts/plot_ts_graph_wemo-insight_labeled b/plot_scripts/plot_ts_graph_wemo-insight_labeled new file mode 100644 index 0000000..ccc8801 --- /dev/null +++ b/plot_scripts/plot_ts_graph_wemo-insight_labeled @@ -0,0 +1,74 @@ +# Script to plot time series graphs for network traffic analysis +# +# by Rahmadi Trimananda (rahmadi.trimananda@uci.edu) +# Programming Language Research Group @ University of California, Irvine +# Winter 2018 + +# ************ # +# BASIC SETUP # +# ************ # +set terminal pdfcairo enhanced font 'Verdana,10' +set autoscale +set key +unset log +unset label +set xtics 50 +set xtics rotate by 60 right +set ytics auto +set xlabel "Packet Timestamp (hh:mm:ss)" +set ylabel "Packet Size (bytes)" +set xdata time +set timefmt "%H:%M:%S" +set xrange [:] +set yrange [0:] + +# ************ # +# ON/OFF LABEL # +# ************ # +set label "1-ON" at "16:00:31", 60000 tc rgb "blue" +set label "1-OFF" at "16:01:26", 50000 tc rgb "red" +set label "2-ON" at "16:02:29", 60000 tc rgb "blue" +set label "2-OFF" at "16:03:34", 50000 tc rgb "red" +set label "3-ON" at "16:04:32", 60000 tc rgb "blue" +set label "3-OFF" at "16:05:32", 50000 tc rgb "red" +set label "4-ON" at "16:07:41", 60000 tc rgb "blue" +set label "4-OFF" at "16:08:40", 50000 tc rgb "red" +set label "5-ON" at "16:09:42", 60000 tc rgb "blue" +set label "5-OFF" at "16:10:43", 50000 tc rgb "red" +set label "6-ON" at "16:11:46", 60000 tc rgb "blue" +set label "6-OFF" at "16:12:46", 50000 tc rgb "red" + +# ***************** # +# PER DEVICE SETUP # +# ***************** # +# WeMo Insight switch local +# wlan1 +set output './result/wemo-insight_switch_wlan1_timestamp_local_incoming_outgoing.pdf' +set title "WeMo Insight Switch Incoming/Outgoing Local Traffic (wlan1)" +plot "./result/wemo-insight_switch_wlan1_local_incoming.dat" using 1:2 with lines dt 4 title "Incoming", "./result/wemo-insight_switch_wlan1_local_outgoing.dat" using 1:2 with lines title "Outgoing" + +# ************ # +# ON/OFF LABEL # +# ************ # +set label "1-ON" at "16:18:55", 80000 tc rgb "blue" +set label "1-OFF" at "16:19:56", 120000 tc rgb "red" +set label "2-ON" at "16:20:59", 80000 tc rgb "blue" +set label "2-OFF" at "16:22:00", 120000 tc rgb "red" +set label "3-ON" at "16:23:03", 80000 tc rgb "blue" +set label "3-OFF" at "16:24:07", 120000 tc rgb "red" +set label "4-ON" at "16:26:13", 80000 tc rgb "blue" +set label "4-OFF" at "16:27:09", 120000 tc rgb "red" +set label "5-ON" at "16:28:15", 80000 tc rgb "blue" +set label "5-OFF" at "16:29:12", 120000 tc rgb "red" +set label "6-ON" at "16:30:13", 80000 tc rgb "blue" +set label "6-OFF" at "16:31:18", 120000 tc rgb "red" + +# ***************** # +# PER DEVICE SETUP # +# ***************** # +# WeMo Insight switch remote +# wlan1 +set output './result/wemo-insight_switch_wlan_timestamp_remote_incoming_outgoing.pdf' +set title "WeMo Insight Switch Incoming/Outgoing Remote Traffic (wlan1)" +plot "./result/wemo-insight_switch_wlan1_remote_incoming.dat" using 1:2 with lines dt 4 title "Incoming", "./result/wemo-insight_switch_wlan1_remote_outgoing.dat" using 1:2 with lines title "Outgoing" + diff --git a/plot_scripts/plot_ts_graph_wemo_labeled b/plot_scripts/plot_ts_graph_wemo_labeled new file mode 100644 index 0000000..26d02e2 --- /dev/null +++ b/plot_scripts/plot_ts_graph_wemo_labeled @@ -0,0 +1,63 @@ +# Script to plot time series graphs for network traffic analysis +# +# by Rahmadi Trimananda (rahmadi.trimananda@uci.edu) +# Programming Language Research Group @ University of California, Irvine +# Winter 2018 + +# ************ # +# BASIC SETUP # +# ************ # +set terminal pdfcairo enhanced font 'Verdana,10' +set autoscale +set key +unset log +unset label +set xtics 50 +set xtics rotate by 60 right +set ytics auto +set xlabel "Packet Timestamp (hh:mm:ss)" +set ylabel "Packet Size (bytes)" +set xdata time +set timefmt "%H:%M:%S" +set xrange [:] +set yrange [0:] + +# ************ # +# ON/OFF LABEL # +# ************ # +set label "1-ON" at "11:10:05", 50000 tc rgb "blue" +set label "1-OFF" at "11:11:08", 50000 tc rgb "red" +set label "2-ON" at "11:12:10", 50000 tc rgb "blue" +set label "2-OFF" at "11:13:12", 50000 tc rgb "red" +set label "3-ON" at "11:14:14", 50000 tc rgb "blue" +set label "3-OFF" at "11:15:17", 50000 tc rgb "red" + +# ***************** # +# PER DEVICE SETUP # +# ***************** # +# WeMo switch local +# wlan1 +set output './result/wemo_switch_wlan1_timestamp_local_incoming_outgoing.pdf' +set title "WeMo Switch Incoming/Outgoing Local Traffic (wlan1)" +plot "./result/wemo_switch_wlan1_local_incoming.dat" using 1:2 with lines dt 4 title "Incoming", "./result/wemo_switch_wlan1_local_outgoing.dat" using 1:2 with lines title "Outgoing" + +# ************ # +# ON/OFF LABEL # +# ************ # +set label "1-ON" at "11:20:49", 50000 tc rgb "blue" +set label "1-OFF" at "11:21:49", 50000 tc rgb "red" +set label "2-ON" at "11:22:50", 50000 tc rgb "blue" +set label "2-OFF" at "11:23:52", 50000 tc rgb "red" +set label "3-ON" at "11:24:54", 5000 tc rgb "orange" +set label "3-OFF" at "11:26:55", 50000 tc rgb "blue" + +# ***************** # +# PER DEVICE SETUP # +# ***************** # +# WeMo switch remote +# wlan1 +set output './result/wemo_switch_wlan1_timestamp_remote_incoming_outgoing.pdf' +set title "WeMo Switch Incoming/Outgoing Remote Traffic (wlan1)" +plot "./result/wemo_switch_wlan1_remote_incoming.dat" using 1:2 with lines dt 4 title "Incoming", "./result/wemo_switch_wlan1_remote_outgoing.dat" using 1:2 with lines title "Outgoing" + + diff --git a/run.sh b/run.sh index 3749ed6..2b92991 100755 --- a/run.sh +++ b/run.sh @@ -4,10 +4,10 @@ # Basically, we make one call per one device that we want to analyze. ROUTER=Router ROUTER_MAC=b0:b9:8a:73:69:8f -#PHONE=Nexus_5_Black -#PHONE_MAC=64:89:9a:86:a9:7d -PHONE=Motorola -PHONE_MAC=a8:96:75:2f:0c:9c +PHONE=Nexus_5_Black +PHONE_MAC=64:89:9a:86:a9:7d +#PHONE=Motorola +#PHONE_MAC=a8:96:75:2f:0c:9c #PREFIX=wemo #DEVICE=WeMo_Switch @@ -40,9 +40,16 @@ PHONE_MAC=a8:96:75:2f:0c:9c PREFIX=smartthings-plug DEVICE=SmartThings_Plug DEVICE_MAC=d0:52:a8:a3:60:0f -PATH_SETUP=/scratch/traffic_measurements/Switches-Feb2018/smartthings/setup -PATH_LOCAL=/scratch/traffic_measurements/Switches-Feb2018/smartthings/local -PATH_REMOTE=/scratch/traffic_measurements/Switches-Feb2018/smartthings/remote +PATH_SETUP=/scratch/traffic_measurements/Switches-Feb2018/smartthings-plug/setup +PATH_LOCAL=/scratch/traffic_measurements/Switches-Feb2018/smartthings-plug/local +PATH_REMOTE=/scratch/traffic_measurements/Switches-Feb2018/smartthings-plug/remote + +#PREFIX=smartthings-mp-sensor +#DEVICE=SmartThings_Multipurpose_Sensor +#DEVICE_MAC=d0:52:a8:a3:60:0f +#PATH_SETUP=/scratch/traffic_measurements/Switches-Feb2018/smartthings-mp-sensor/setup +#PATH_LOCAL=/scratch/traffic_measurements/Switches-Feb2018/smartthings-mp-sensor/local +#PATH_REMOTE=/scratch/traffic_measurements/Switches-Feb2018/smartthings-mp-sensor/remote PATH_SETUP_WLAN1_JSON=$PREFIX.wlan1.setup.json PATH_SETUP_ETH0_JSON=$PREFIX.eth0.setup.json @@ -61,6 +68,7 @@ PATH_REMOTE_ETH0_JSON=$PREFIX.eth0.remote.json PATH_REMOTE_ETH1_DNS_JSON=$PREFIX.eth1.remote.dns.json PATH_REMOTE_ETH1_JSON=$PREFIX.eth1.remote.json PATH_GNUPLOT=./plot_scripts/plot_ts_graph_$PREFIX +PATH_GNUPLOT_LABELED=./plot_scripts/plot_ts_graph_$PREFIX\_labeled PATH_GNUPLOT_COMBINED=./plot_scripts/plot_ts_graph_$PREFIX\_combined PATH_DIR_RESULT=result PATH_RESULT_SETUP_WLAN1=$PREFIX\_switch_wlan1_setup @@ -84,17 +92,18 @@ PATH_RESULT_PHONE_REMOTE_WLAN1=$PREFIX\_phone_wlan1_remote #python ./base_gexf_generator.py $PATH_LOCAL/$PATH_LOCAL_ETH0_DNS_JSON $PATH_DIR_RESULT/$PATH_RESULT_LOCAL_ETH0.gexf #python ./parser/parse_packet_frequency.py $PATH_LOCAL/$PATH_LOCAL_ETH0_JSON $PATH_DIR_RESULT/$PATH_RESULT_LOCAL_ETH0 $ROUTER $ROUTER_MAC #python ./base_gexf_generator.py $PATH_LOCAL/$PATH_LOCAL_ETH1_DNS_JSON $PATH_DIR_RESULT/$PATH_RESULT_LOCAL_ETH1.gexf -#python ./parser/parse_packet_frequency.py $PATH_LOCAL/$PATH_LOCAL_ETH1_JSON $PATH_DIR_RESULT/$PATH_RESULT_LOCAL_ETH1 $DEVICE $DEVICE_MAC +python ./parser/parse_packet_frequency.py $PATH_LOCAL/$PATH_LOCAL_ETH1_JSON $PATH_DIR_RESULT/$PATH_RESULT_LOCAL_ETH1 $DEVICE $DEVICE_MAC #python ./base_gexf_generator.py $PATH_REMOTE/$PATH_REMOTE_WLAN1_DNS_JSON $PATH_DIR_RESULT/$PATH_RESULT_REMOTE_WLAN1.gexf #python ./parser/parse_packet_frequency.py $PATH_REMOTE/$PATH_REMOTE_WLAN1_JSON $PATH_DIR_RESULT/$PATH_RESULT_REMOTE_WLAN1 $DEVICE $DEVICE_MAC #python ./base_gexf_generator.py $PATH_REMOTE/$PATH_REMOTE_ETH0_DNS_JSON $PATH_DIR_RESULT/$PATH_RESULT_REMOTE_ETH0.gexf #python ./parser/parse_packet_frequency.py $PATH_REMOTE/$PATH_REMOTE_ETH0_JSON $PATH_DIR_RESULT/$PATH_RESULT_REMOTE_ETH0 $ROUTER $ROUTER_MAC #python ./base_gexf_generator.py $PATH_REMOTE/$PATH_REMOTE_ETH1_DNS_JSON $PATH_DIR_RESULT/$PATH_RESULT_REMOTE_ETH1.gexf -#python ./parser/parse_packet_frequency.py $PATH_REMOTE/$PATH_REMOTE_ETH1_JSON $PATH_DIR_RESULT/$PATH_RESULT_REMOTE_ETH1 $DEVICE $DEVICE_MAC +python ./parser/parse_packet_frequency.py $PATH_REMOTE/$PATH_REMOTE_ETH1_JSON $PATH_DIR_RESULT/$PATH_RESULT_REMOTE_ETH1 $DEVICE $DEVICE_MAC #python ./parser/parse_packet_frequency.py $PATH_LOCAL/$PATH_LOCAL_WLAN1_JSON $PATH_DIR_RESULT/$PATH_RESULT_PHONE_LOCAL_WLAN1 $PHONE $PHONE_MAC #python ./parser/parse_packet_frequency.py $PATH_REMOTE/$PATH_REMOTE_WLAN1_JSON $PATH_DIR_RESULT/$PATH_RESULT_PHONE_REMOTE_WLAN1 $PHONE $PHONE_MAC #gnuplot $PATH_GNUPLOT -gnuplot $PATH_GNUPLOT_COMBINED +gnuplot $PATH_GNUPLOT_LABELED # only the WLAN1/ETH1 part - basically just the device perspective +#gnuplot $PATH_GNUPLOT_COMBINED -- 2.34.1