[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

Software support and information
It is currently Sun Nov 09, 2025 11:28 pm

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Tue Dec 08, 2009 6:39 pm 
Offline
User

Joined: Tue Dec 08, 2009 6:25 pm
Posts: 6
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?


Top
 Profile Send private message  
 
PostPosted: Thu Dec 10, 2009 8:59 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
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.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
PostPosted: Thu Dec 10, 2009 4:50 pm 
Offline
User

Joined: Tue Dec 08, 2009 6:25 pm
Posts: 6
>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.)


Top
 Profile Send private message  
 
PostPosted: Thu Dec 10, 2009 8:45 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
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?

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
PostPosted: Fri Dec 11, 2009 4:28 am 
Offline
User

Joined: Tue Dec 08, 2009 6:25 pm
Posts: 6
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.


Top
 Profile Send private message  
 
PostPosted: Sat Dec 12, 2009 7:34 am 
Offline
User

Joined: Tue Dec 08, 2009 6:25 pm
Posts: 6
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.


Top
 Profile Send private message  
 
PostPosted: Sat Dec 12, 2009 9:28 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
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

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
PostPosted: Sat Dec 12, 2009 10:56 am 
Offline
User

Joined: Tue Dec 08, 2009 6:25 pm
Posts: 6
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?


Top
 Profile Send private message  
 
PostPosted: Sat Dec 12, 2009 5:35 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
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.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
PostPosted: Sun Dec 13, 2009 7:54 am 
Offline
User

Joined: Tue Dec 08, 2009 6:25 pm
Posts: 6
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.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group