SM_CPUStatSum.gplot 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # SYSMON
  2. #
  3. # Anzeige: system cpu auslastung
  4. #
  5. # Daten: user nice system idle iowait irq softirq
  6. # Beispiel aus dem Logfile:
  7. # 2014-01-23_23:37:59 sysmon stat_cpu_percent: 32.17 0.00 18.53 37.72 0.15 0.04 11.38
  8. #
  9. #
  10. set terminal png transparent size <SIZE> crop
  11. set output '<OUT>.png'
  12. set xdata time
  13. set timefmt "%Y-%m-%d_%H:%M:%S"
  14. set xlabel " "
  15. set ytics
  16. set yrange [0:100]
  17. set y2range [0:100]
  18. set title '<L1>'
  19. set grid xtics y2tics
  20. set y2label "Auslastung %"
  21. #FileLog 4:stat_cpu_percent:0:$fld[3]
  22. #FileLog 5:stat_cpu_percent:0:$fld[3]+$fld[4]
  23. #FileLog 6:stat_cpu_percent:0:$fld[3]+$fld[4]+$fld[5]
  24. #FileLog 7:stat_cpu_percent:0:$fld[3]+$fld[4]+$fld[5]+$fld[6]
  25. #FileLog 8:stat_cpu_percent:0:$fld[3]+$fld[4]+$fld[5]+$fld[6]+$fld[7]
  26. #FileLog 9:stat_cpu_percent:0:$fld[3]+$fld[4]+$fld[5]+$fld[6]+$fld[7]+$fld[8]
  27. #FileLog 10:stat_cpu_percent:0:$fld[3]+$fld[4]+$fld[5]+$fld[6]+$fld[7]+$fld[8]+$fld[9]
  28. plot \
  29. "< awk '/load avg:/ {print $1, $4}' <IN>" \
  30. using 1:2 ls l0 axes x1y1 title 'user' lw 1.0 with lines \
  31. "< awk '/load avg5:/ {print $1, $4}' <IN>" \
  32. using 1:2 ls l1 axes x1y1 title 'nice' lw 1.0 with lines \
  33. "< awk '/load avg15:/ {print $1, $4}' <IN>" \
  34. using 1:2 ls l2 axes x1y1 title 'system' lw 1.0 with lines
  35. "< awk '/load avg15:/ {print $1, $4}' <IN>" \
  36. using 1:2 ls l3 axes x1y1 title 'idle' lw 1.0 with lines
  37. "< awk '/load avg15:/ {print $1, $4}' <IN>" \
  38. using 1:2 ls l4 axes x1y1 title 'iowait' lw 1.0 with lines
  39. "< awk '/load avg15:/ {print $1, $4}' <IN>" \
  40. using 1:2 ls l5 axes x1y1 title 'irq' lw 1.0 with lines
  41. "< awk '/load avg15:/ {print $1, $4}' <IN>" \
  42. using 1:2 ls l6 axes x1y1 title 'softirq' lw 1.0 with lines