github.com/ssetin/penguincast@v0.2.0/drawStat.plt (about) 1 set terminal png truecolor size 1024, 768 font "Helvetica,10" 2 set datafile separator "\t" 3 set title "CPU and Memory usage(Listeners count)\nCore2Duo E7500 2.93GHz, 4 GB RAM" 4 set output "ue_stat01tmp.png" 5 set grid ytics y2tics xtics 6 set grid 7 set key left top 8 9 # total memory size, Kbytes 10 totalMemoryGB = 4 11 totalMemory = totalMemoryGB*1024*1024 12 13 set xdata time 14 set timefmt "%Y-%m-%d %H:%M:%S" 15 set format x "%d.%m.%Y\n%H:%M" 16 17 set style line 1 lw 2 lt 1 lc 3 18 set style line 2 lw 2 lt 1 lc 1 19 set style line 3 lw 2 lt 1 lc 2 20 21 # Memory 22 set ylabel "Listeners" 23 set yrange [0:20000] 24 set ytics nomirror 25 26 # CPU 27 set y2label 'Usage, %' 28 set y2range [0:100] 29 set y2tics 5 nomirror 30 set autoscale y 31 #set autoscale y2 32 33 34 plot "log/stat.log" using 1:2 title "Listeners" with lines linestyle 1 axes x1y1, \ 35 "log/stat.log" using 1:3 title "CPU" with line linestyle 3 axes x1y2, \ 36 "log/stat.log" using 1:(($4/totalMemory)*100) title "Memory" with line linestyle 2 axes x1y2 37 38 39