[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Cheshire Cat Computing :: View topic - Scaling a non-gauge graph
Cheshire Cat Computing
https://steveshipway.org/forum/

Scaling a non-gauge graph
https://steveshipway.org/forum/viewtopic.php?f=2&t=4064
Page 1 of 2

Author:  compata [ Tue Dec 08, 2009 6:39 pm ]
Post subject:  Scaling a non-gauge graph

Having trouble getting a non-gauge graph to scale. routers2.conf says "unscaled = no". The MRTG cfg file says "router2.cgi*Options[topic]: scaled". But the graph refuses to scale. What am I missing?

Author:  stevesh [ Thu Dec 10, 2009 8:59 am ]
Post subject:  Re: Scaling a non-gauge graph

The .cfg file will override any defaults in the routers2.conf.

Can you post the cfg file contents, plus the graph image generated? This will help identify what is going on.

You might also like to use

UnScaled[targetname]: n

although this only works with later versions of MRTG.

Author:  compata [ Thu Dec 10, 2009 4:50 pm ]
Post subject:  Re: Scaling a non-gauge graph

>Can you post the cfg file contents, plus the graph image generated? This will help identify what is going on.

>You might also like to use
>UnScaled[targetname]: n
>although this only works with later versions of MRTG.

Based on your suggestion, I've added the UnScaled line to the cfg file. No luck. Here's the current stanza.

Target[ws_rain]: `/home/dave/bin/get-ws rain`
Options[ws_rain]: growright, noinfo, nopercent, noo
router2.cgi*Options[ws_rain]: scaled
ShortLegend[ws_rain]: mm
MaxBytes[ws_rain]: 120
Legend1[ws_rain]: mm
YLegend[ws_rain]: mm
Title[ws_rain]: 6-Rain
PageTop[ws_rain]: <H1>Rain</H1>
LegendI[ws_rain]: mm
UnScaled[ws_rain]: n

The latest graph is attached. Note that the Y axis goes to 120mm. (It's hasn't rained here in the last 30 hours.)

Author:  stevesh [ Thu Dec 10, 2009 8:45 pm ]
Post subject:  Re: Scaling a non-gauge graph

One suggestion I have would be making the 'get-ws rain' command return the values in metres. Then, you do not need to use the 'fixunit' option, and you can use ShortLegend[]:m and let RRDTool take care of using the appropriate prefix. It doesnt matter so much in this case as you'll never get a meter or a micrometer of rain, and you probably want everything in mm, but it is generally good practice to have the data stored in SI units.

From the graph you show me, it looks like the data are all zero. You should add 'fixunit' to the routers.cgi*Options if you're keeping your main unit as mm else you get the 'milli' prefix added (see the y-axis for an example of this happenning). On the y-axis you see '120m' this isn 120 meters, it is 120milli- (since you dont have fixunit). This would indicate to me that it is confused as there are no non-zero values.

Are you absolutely sure that there are non-zero data values being stored?

Author:  compata [ Fri Dec 11, 2009 4:28 am ]
Post subject:  Re: Scaling a non-gauge graph

We don't get a lot of rainy days but there were a few earlier this week. The graph scale did not change. Rain is expected tonight so tomorrow I'll post a new graph.

Thanks for the suggestions on the units. I had suspected that there was a margin problem on the Y axis and the second m was being cut off. With your explanation, I'll look for another approach to that. The raw data is in mm.

Author:  compata [ Sat Dec 12, 2009 7:34 am ]
Post subject:  Re: Scaling a non-gauge graph

A very minor amount of rain early this morning. A new graph is attached. It's hard to see but there was one mm of rain just after 0100. But as you can see, the graph is still not scaled.

Author:  stevesh [ Sat Dec 12, 2009 9:28 am ]
Post subject:  Re: Scaling a non-gauge graph

The graph y-axis still shows the Y-max is 120milli (IE, 0.12). When the numbers start to get this small you start getting problems with scaling; I think you need to check the output of your data collection plugin to make sure it is giving the output you expect.

Another big point is that I think you need to have 'Options[ws_rain]:gauge' for this plugin (although I may be wrong) which would explain why the numbers are so small and usually zero.

Steve

Author:  compata [ Sat Dec 12, 2009 10:56 am ]
Post subject:  Re: Scaling a non-gauge graph

Ok, now I'm confused. The numbers returned by the plugin are integers and I specified MaxBytes = 120. While I said the unit of measure is mm, that is just a string to MRTG. What is telling the tool that my values are in milli-mm?

Author:  stevesh [ Sat Dec 12, 2009 5:35 pm ]
Post subject:  Re: Scaling a non-gauge graph

Because you don't have the 'gauge' option, MRTG is calculating the rate of change.
If you store 0 for 12:00 and 1 for 12:05, then MRTG will save 0.003 which is the rate per second. This will display as 3 milli-

The milli- prefix is being provided automatically by RRDTool because you have not suppressed prefixed with the 'fixunit' extended option.

Author:  compata [ Sun Dec 13, 2009 7:54 am ]
Post subject:  Re: Scaling a non-gauge graph

Well, now I'm embarrassed. Of course, that's what happens and I should have known that. Thanks for your patience with me, Steve.

Now that I have (I think) a handle on getting this to work, the data source has started to malfunction. Suddenly its USB connection refuses to accept an address. Until I get that working again, I won't make any more progress on the graph. So let's close out this topic. If necessary, I'll start another one some day.

Page 1 of 2 All times are UTC + 12 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/