Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Left-axis-format doesn't allow me to print SI units #1271

Open
mpikzink opened this issue Nov 19, 2024 · 0 comments
Open

Left-axis-format doesn't allow me to print SI units #1271

mpikzink opened this issue Nov 19, 2024 · 0 comments

Comments

@mpikzink
Copy link

mpikzink commented Nov 19, 2024

Describe the bug
The regexp check in --left-axis-format doesn't allow to print SI units like kWh or in that case krpm

%5.1lf%Srpm

while GPRINT:sensor:MIN:%5.1lf%Srpm does work like I expect.

To Reproduce
RRDTool Command

rrdtool graph /tmp/wQnE1vf6MRRW4HkB --start 1731938400 --end 1732025700 --width 1707 --height 988 --imgformat=SVG --font LEGEND:8:DejaVuSansMono --font AXIS:7:DejaVuSansMono --font-render-mode normal -c FONT\#000000 -c BACK\#EEEEEE00 -c SHADEA\#EEEEEE00 -c SHADEB\#EEEEEE00 -c CANVAS\#FFFFFF00 -c GRID\#a5a5a5 -c MGRID\#FF9999 -c FRAME\#5e5e5e -c ARROW\#5e5e5e --alt-autoscale-max --rigid --slope-mode  --vertical-label "Fanspeed" --left-axis-format "%5.1lF%Srpm" DEF:sensor=xxx/sensor-fanspeed-ipmi-Fan1A.rrd:sensor:AVERAGE DEF:sensor_max=xxx/sensor-fanspeed-ipmi-Fan1A.rrd:sensor:MAX DEF:sensor_min=xxx/sensor-fanspeed-ipmi-Fan1A.rrd:sensor:MIN AREA:sensor_max\#c5c5c5 AREA:sensor_min\#ffffffff COMMENT:"Alert tresholds\\:" LINE1.5:600\#00008b:"low = 600rpm":dashes LINE1.5:960\#005bdf:"warn low = 960rpm":dashes COMMENT:"\\n" COMMENT:"                               Now      Avg     Min     Max\\n" LINE2:sensor\#000000:"Fan1A                     " GPRINT:sensor:LAST:%5.1lf%Srpm GPRINT:sensor:AVERAGE:%5.1lf%Srpm GPRINT:sensor:MIN:%5.1lf%Srpm GPRINT:sensor:MAX:%5.1lf%Srpm\\l --daemon unix:/var/run/rrdcached.sock

RRDTool Output

ERROR: invalid format string '%5.1lF%Srpm' (should match '^(?:[^%]+|%%)*%[-+ 0#]?[0-9]*(?:[.][0-9]+)?l[eEfFgG](?:[^%]+|%%)*$')

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
I like to see the SI units also in the Y-Axis
Screenshot from 2024-11-19 15-29-41

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Tested with RRDTool 1.7.2
The GPRINT %S issue was part of the release notes there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant