diff options
author | Andre Lorbach <alorbach@adiscon.com> | 2013-07-11 11:28:39 +0200 |
---|---|---|
committer | Andre Lorbach <alorbach@adiscon.com> | 2013-07-11 11:28:39 +0200 |
commit | fba8609b2a1458686bb90a98a11e134548616310 (patch) | |
tree | d9386b4b3057fcc0dfd9330f5aa021629546d4a9 /plugins/impstats/statslog-splitter.py | |
parent | 53bd9a94ec2c7ad1a009c6fb6655adea48746ca3 (diff) | |
download | rsyslog-fba8609b2a1458686bb90a98a11e134548616310.tar.gz rsyslog-fba8609b2a1458686bb90a98a11e134548616310.tar.bz2 rsyslog-fba8609b2a1458686bb90a98a11e134548616310.zip |
Added new option "chartscalcdelta" to generate charts with delta values instead of cumulative values.
Also fixed reading outputfile parameter in statslog-graph.py script.
Diffstat (limited to 'plugins/impstats/statslog-splitter.py')
-rwxr-xr-x | plugins/impstats/statslog-splitter.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/impstats/statslog-splitter.py b/plugins/impstats/statslog-splitter.py index a32584cb..84668d9e 100755 --- a/plugins/impstats/statslog-splitter.py +++ b/plugins/impstats/statslog-splitter.py @@ -23,6 +23,7 @@ bLogarithmicChart = False bLineChart = True bBarChart = False bFilledLineChart = False +bChartCalcDelta = False szChartsFormat = "svg" # Helper variables @@ -72,6 +73,8 @@ for arg in sys.argv[-4:]: bBarChart = True elif arg.find("--filledlinechart") != -1: bFilledLineChart = True + elif arg.find("--chartscalcdelta") != -1: + bChartCalcDelta = True elif arg.find("--h") != -1 or arg.find("-h") != -1 or arg.find("--help") != -1: bHelpOutput = True @@ -89,10 +92,11 @@ if bHelpOutput: print " Default is disabled." print " --chartsformat=<svg|png> Format which should be used for Charts." print " Default is svg format" - print " --logarithmic Uses Logarithmic to scale the Y Axis, maybe useful in some cases. Default is OFF" + print " --logarithmic Uses Logarithmic to scale the Y Axis, maybe useful in some cases. Default is OFF." print " --linechart If set, line charts will be generated (Default)." print " --barchart If set, bar charts will be generated." - print " --filledlinechart Use filled lines on Linechart, maybe useful in some cases. Default is OFF" + print " --filledlinechart Use filled lines on Linechart, maybe useful in some cases. Default is OFF." + print " --chartscalcdelta If set, charts will use calculated delta values instead of cumulative values." print "\n Sampleline: ./statslog-splitter.py singlefile --input=rsyslog-stats.log --outputdir=/home/user/csvlogs/ --enablecharts --chartsformat=png" elif bSingleObjectOutput: inputfile = open(szInput, 'r') @@ -206,6 +210,8 @@ elif bSingleObjectOutput: szChartAddArgs += " --logarithmic" if bFilledLineChart: szChartAddArgs += " --filledlinechart" + if bChartCalcDelta: + szChartAddArgs += " --chartscalcdelta" # Default SVG Format! if szChartsFormat.find("svg") != -1: |