Reorganize code by creating a package for code that reassembles traffic flows at...
[pingpong.git] / plot_scripts / plot_ts_graph_smartthings-plug_labeled
1 # Script to plot time series graphs for network traffic analysis
2 #
3 # by Rahmadi Trimananda (rahmadi.trimananda@uci.edu)
4 # Programming Language Research Group @ University of California, Irvine
5 # Winter 2018
6
7 # ************ #
8 # BASIC SETUP  #
9 # ************ #
10 set terminal pdfcairo enhanced font 'Verdana,10'
11 set autoscale
12 set key
13 unset log
14 unset label
15 set xtics 50
16 set xtics rotate by 60 right
17 set ytics auto
18 set xlabel "Packet Timestamp (hh:mm:ss)"
19 set ylabel "Traffic Volume (bytes)"
20 set xdata time
21 set timefmt "%H:%M:%S"
22 set xrange [:]
23 set yrange [0:]
24
25 # ************ #
26 # ON/OFF LABEL #
27 # ************ #
28 set label "1-ON" at "15:21:44", 2000 tc rgb "blue"
29 set label "1-OFF" at "15:23:04", 4000 tc rgb "red"
30 set label "2-ON" at "15:23:57", 2000 tc rgb "blue"
31 set label "2-OFF" at "15:24:58", 4000 tc rgb "red"
32 set label "3-ON" at "15:25:59", 2000 tc rgb "blue"
33 set label "3-OFF" at "15:27:01", 4000 tc rgb "red"
34 set label "4-ON" at "15:29:17", 2000 tc rgb "blue"
35 set label "4-OFF" at "15:30:13", 2500 tc rgb "red"
36 set label "5-ON" at "15:31:14", 2000 tc rgb "blue"
37 set label "5-OFF" at "15:32:15", 4000 tc rgb "red"
38 set label "6-ON" at "15:33:17", 8000 tc rgb "blue"
39 set label "6-OFF" at "15:34:16", 4000 tc rgb "red"
40
41
42 # ***************** #
43 # PER DEVICE SETUP  #
44 # ***************** #
45 # SmartThings Plug switch local
46 # eth1
47 set output './result/smartthings-plug_switch_eth1_timestamp_local_incoming_outgoing.pdf'
48 set title "SmartThings Plug Switch Incoming/Outgoing Local Traffic (eth1)"
49 plot "./result/smartthings-plug_switch_eth1_local_incoming.dat" using 1:2 with lines lc 8 dt 4 title "Incoming", "./result/smartthings-plug_switch_eth1_local_outgoing.dat" using 1:2 with lines lc 6 title "Outgoing"
50
51 # ************ #
52 # ON/OFF LABEL #
53 # ************ #
54 set label "1-ON" at "15:38:22", 1500 tc rgb "blue"
55 set label "1-OFF" at "15:39:24", 1000 tc rgb "red"
56 set label "2-ON" at "15:40:24", 1500 tc rgb "blue"
57 set label "2-OFF" at "15:41:27", 1000 tc rgb "red"
58 set label "3-ON" at "15:42:27", 1500 tc rgb "blue"
59 set label "3-OFF" at "15:43:29", 1000 tc rgb "red"
60 set label "4-ON" at "15:45:32", 1500 tc rgb "blue"
61 set label "4-OFF" at "15:46:33", 1000 tc rgb "red"
62 set label "5-ON" at "15:47:36", 1500 tc rgb "blue"
63 set label "5-OFF" at "15:48:36", 1000 tc rgb "red"
64 set label "6-ON" at "15:49:39", 1500 tc rgb "blue"
65 set label "6-OFF" at "15:50:42", 1000 tc rgb "red"
66
67
68 # ***************** #
69 # PER DEVICE SETUP  #
70 # ***************** #
71 # SmartThings Plug switch remote
72 # eth1
73 set output './result/smartthings-plug_switch_eth1_timestamp_remote_incoming_outgoing.pdf'
74 set title "SmartThings Plug Switch Incoming/Outgoing Remote Traffic (eth1)"
75 plot "./result/smartthings-plug_switch_eth1_remote_incoming.dat" using 1:2 with lines lc 8 dt 4 title "Incoming", "./result/smartthings-plug_switch_eth1_remote_outgoing.dat" using 1:2 with lines lc 6 title "Outgoing"
76
77