1 # Script to plot time series graphs for network traffic analysis
3 # by Rahmadi Trimananda (rahmadi.trimananda@uci.edu)
4 # Programming Language Research Group @ University of California, Irvine
10 set terminal pdfcairo enhanced font 'Verdana,10'
16 set xtics rotate by 60 right
18 set xlabel "Packet Timestamp (hh:mm:ss)"
19 set ylabel "Traffic Volume (bytes)"
21 set timefmt "%H:%M:%S"
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"
45 # SmartThings Plug switch local
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"
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"
71 # SmartThings Plug switch remote
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"