Near zero float number format

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

Moderators: Developers, Moderators

Post Reply
rmarx
Posts: 9
Joined: Thu Jul 21, 2011 6:33 am

Near zero float number format

Post by rmarx »

Hi,
I'm graphing ping latency and I would like to show gprint latency times like y-axis format. i.e y-axis shows 0.2 milliseconds and gprint shows 200m (its 200 milli milliseconds -> microseconds). So, I want cacti shows 0.2 on gprint as well.

Thanks
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Near zero float number format

Post by noname »

To force to show in no unit, for example:

Create custom CDEF
Image

And use it in graph template
Image
rmarx
Posts: 9
Joined: Thu Jul 21, 2011 6:33 am

Re: Near zero float number format

Post by rmarx »

Thanks by your reply noname.

It hid the unit, but the number continues like hundreds (i.e. "200") instead thousandth (i.e. "0.2"). I need to force cacti to show in thousandth format instead of change subunit.
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Near zero float number format

Post by noname »

Hmm, it may be related to Base Value settings (default:1000?) in graph template..
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Near zero float number format

Post by gandalf »

units-exponent may help here
R.
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Near zero float number format

Post by noname »

Oops, I missed that.

http://docs.cacti.net/manual:087:3_templates.2_graph_template
Unit Exponent Value
Sets the 10^e scaling of the y-axis. Valid values for this field are between -18 and 18.
For example, you could use 3 to display everything in 'k' (kilo) or -6 to display everything in 'u' (micro).
Thanks gandalf
rmarx
Posts: 9
Joined: Thu Jul 21, 2011 6:33 am

Re: Near zero float number format

Post by rmarx »

That worked only for y-axis... not for gprint.
rmarx
Posts: 9
Joined: Thu Jul 21, 2011 6:33 am

Re: Near zero float number format

Post by rmarx »

I found somthing in Graph management->Gprint presets. There I can change number formatting. Default is %8.2lf%s. I tried some changes, but I havent got 0,XXX formatting style.
rmarx
Posts: 9
Joined: Thu Jul 21, 2011 6:33 am

Re: Near zero float number format

Post by rmarx »

I got!

I added a new gprint preset in graph management -> gprint presets. In the new gprint, I set GPRINT Text to %3.3lf. I taked away the "%s" param... this avoid magnitude autoselection. So, I changed GPRINT type to the new gprint in the Graph template item.


Thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests