Logarithmic Auto Scaling y-axis

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
lobbin
Posts: 8
Joined: Thu Dec 04, 2003 9:52 am
Location: Malmö, Sweden
Contact:

Logarithmic Auto Scaling y-axis

Post by lobbin »

I have created a logarithmic graph, but the y-axis doesn't display values that good.

It display 1e+00 and the next value is 1e+01. Any ideas what I should change to have the axis print the actual value?
cuicui
Posts: 12
Joined: Thu Apr 27, 2006 8:02 am
Contact:

Post by cuicui »

Up ;)

Yes, i know, this post was opened more than two years ago, but i also use semi-log scale for my network graphs and more human readable values would be nice...

Any idea?

All the best,

Image
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

What would be better to display? This is purely a rrdtool issue anyways so the topic belongs on the rrdtool mailing list...
cuicui
Posts: 12
Joined: Thu Apr 27, 2006 8:02 am
Contact:

Post by cuicui »

BSOD2600 wrote:What would be better to display?
The Y axis values.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Those values are being displayed though, logarithmically.

You got a sample of what you're talking about?
cuicui
Posts: 12
Joined: Thu Apr 27, 2006 8:02 am
Contact:

Post by cuicui »

Instead of having the values displayed in exponential form (1e+07), i'd like to have them in kb/Mb, units. Same as MRTG when you do some semi-log graphs.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Alright... so once again this is a rrdtool issue. Post on their mailing list.
cuicui
Posts: 12
Joined: Thu Apr 27, 2006 8:02 am
Contact:

Post by cuicui »

BSOD2600 wrote:Alright... so once again this is a rrdtool issue. Post on their mailing list.
I will, but maybe this could be automatically managed in the futur versions of Cacti: displaying human readable Y values when switching from linear to semi-log scale.

As far as Cacti have a semi-log option, we shouldn't have to dig to have human readable Y axis values.

All the best,
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please post the pure rrdtool statement (start with the one seen in Graph Management) you want cacti to generate. I'll have a look at it
Reinhard
cuicui
Posts: 12
Joined: Thu Apr 27, 2006 8:02 am
Contact:

Post by cuicui »

You're very kind.

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="toutatis - Traffic - eth0" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=1000 \
--logarithmic \
--vertical-label="bits per second" \
--slope-mode \
DEF:a="/opt/apache-2.0.58/htdocs/cacti/rra/toutatis_test_traffic_in_103.rrd":traffic_in:AVERAGE \
DEF:b="/opt/apache-2.0.58/htdocs/cacti/rra/toutatis_test_traffic_in_103.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefe=b,8,* \
AREA:cdefa#00CF00:"Inbound"  \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:cdefe#002A97:"Outbound"  \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s" 

Code: Select all

Data Source Debug

/usr/bin/rrdtool create \
/opt/apache-2.0.58/htdocs/cacti/rra/toutatis_test_traffic_in_103.rrd \
--step 300  \
DS:traffic_in:COUNTER:600:0:100000000 \
DS:traffic_out:COUNTER:600:0:100000000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

cuicui wrote:As far as Cacti have a semi-log option, we shouldn't have to dig to have human readable Y axis values.
Do you refer to MRTGs logscale option? Please post a screenshot of that MRTG graph you're aiming at along with the MRTG parms set for this target
Reinhard
cuicui
Posts: 12
Joined: Thu Apr 27, 2006 8:02 am
Contact:

Post by cuicui »

Here's the graph.
Image

Options used to have this on MRTG are:

Code: Select all

Options[_]: growright, bits, logscale
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The "logscale" option is not valid for rrdtool. From man rrdgraph:

Code: Select all

[-X│--units-exponent value]

               This sets the 10**exponent scaling of the y-axis values. Normally, values will be scaled to the appropriate
               units (k, M, etc.).  However, you may wish to display units always in k (Kilo, 10e3) even if the data is in
               the M (Mega, 10e6) range, for instance. Value should be an integer which is a multiple of 3 between -18 and
               18 inclusively.  It is the exponent on the units you wish to use. For example, use 3 to display the y-axis
               values in k (Kilo, 10e3, thousands), use -6 to display the y-axis values in u (Micro, 10e-6, millionths).
               Use a value of 0 to prevent any scaling of the y-axis values.

               This option is very effective at confusing the heck out of the default rrdtool autoscaler and grid painter.
               If rrdtool detects that it is not successful in labeling the graph under the given circumstances, it will
               switch to the more robust --alt-y-grid mode.
This is not exactly what you requested, but the only option I see at the moment. But you may post your request to the rrdtool mailing list for adding a new option ...
Reinhard
cuicui
Posts: 12
Joined: Thu Apr 27, 2006 8:02 am
Contact:

Post by cuicui »

lvm wrote:The "logscale" option is not valid for rrdtool. From man rrdgraph:

Code: Select all

[-X│--units-exponent value]
[...]
               This option is very effective at confusing the heck out of the default rrdtool autoscaler and grid painter.
               If rrdtool detects that it is not successful in labeling the graph under the given circumstances, it will
               switch to the more robust --alt-y-grid mode.
This is not exactly what you requested, but the only option I see at the moment. But you may post your request to the rrdtool mailing list for adding a new option ...
Ok, thanks for your help and your patience ;)

All the best,
MaF
Posts: 4
Joined: Fri Aug 15, 2008 9:51 am

Re: Logarithmic Auto Scaling y-axis

Post by MaF »

lobbin wrote:I have created a logarithmic graph, but the y-axis doesn't display values that good.

It display 1e+00 and the next value is 1e+01. Any ideas what I should change to have the axis print the actual value?
I also had this problem. Then I checked "SI-Units for..." an the values at the y-axis are (for me) ok.


MaF
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest