95th percentile not working..

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

Moderators: Developers, Moderators

Post Reply
Kristoffer
Posts: 3
Joined: Fri May 15, 2009 2:00 pm

95th percentile not working..

Post by Kristoffer »

Hi list,

I have a issue after upgrading from 8.6 to 8.7d and from debian Etch to Lenny.
95th percentile shows 0 mbit.

I've search google and this forum all day, but nothing seems to help.

I've tried to delete the database, delete the installation, delete everything related to rrdtool, php and cacti and reinstall everything from sid.

Same problem.

On another server with the exact same software, it works, I can even copy the rrd file to the new server and it still works.

It seems that this server is somehow not calculating the percentile from the hrule: |95:bits:0:max:2| part.

I've attached the rrdtool debug outputs.
Cacti has not been modified, no new templates or changed settings.
I hope someone can point me in a direction ;-)

Thanks
Kristoffer

Below is debug output using the same datasource:

From server not working:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="admin01 - Traffic - eth0" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/lib/cacti/rra/admin01_traffic_in_9.rrd":traffic_in:AVERAGE \
DEF:b="/var/lib/cacti/rra/admin01_traffic_in_9.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefe=b,8,* \
AREA:cdefa#00CF00FF:"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#002A97FF:"Outbound" \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n" \
\
HRULE:0#FF0000FF:"95th Percentile" \
COMMENT:"(0 mbit in+out)\n"
RRDTool Says:
OK

From server working:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="admin01 - Traffic - eth0" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/lib/cacti/rra/admin01_traffic_in_9.rrd":traffic_in:AVERAGE \
DEF:b="/var/lib/cacti/rra/admin01_traffic_in_9.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefe=b,8,* \
AREA:cdefa#00CF00FF:"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#002A97FF:"Outbound" \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n" \
\
HRULE:17194.77#FF0000FF:"95th Percentile" \
COMMENT:"(0.02 mbit in+out)\n"
Attachments
Picture 1.png
Picture 1.png (155.41 KiB) Viewed 4284 times
Kristoffer
Posts: 3
Joined: Fri May 15, 2009 2:00 pm

Post by Kristoffer »

Some more info.
I'm baffled by this - could it be a php issue?

Graph templates, data template, date query and data source are identical. What would cause one server not to calculate the 95th percentile?

Any ideas greatly appreciated.


net-admin04:/tmp# rrdtool info bk01_traffic_in_392.rrd
filename = "bk01_traffic_in_392.rrd"
rrd_version = "0003"
step = 300
last_update = 1242467404
ds[traffic_in].type = "COUNTER"
ds[traffic_in].minimal_heartbeat = 600
ds[traffic_in].min = 0.0000000000e+00
ds[traffic_in].max = 1.0000000000e+09
ds[traffic_in].last_ds = "2586297813"
ds[traffic_in].value = 6.3983758389e+03
ds[traffic_in].unknown_sec = 0
ds[traffic_out].type = "COUNTER"
ds[traffic_out].minimal_heartbeat = 600
ds[traffic_out].min = 0.0000000000e+00
ds[traffic_out].max = 1.0000000000e+09
ds[traffic_out].last_ds = "702660083"
ds[traffic_out].value = 2.4438255034e+03
ds[traffic_out].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 600
rra[0].cur_row = 417
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[0].cdp_prep[1].value = NaN
rra[0].cdp_prep[1].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 700
rra[1].cur_row = 468
rra[1].pdp_per_row = 6
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = 1.5560267850e+05
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[1].cdp_prep[1].value = 5.0102785638e+03
rra[1].cdp_prep[1].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 775
rra[2].cur_row = 116
rra[2].pdp_per_row = 24
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = 8.6709528528e+05
rra[2].cdp_prep[0].unknown_datapoints = 0
rra[2].cdp_prep[1].value = 2.9861771811e+04
rra[2].cdp_prep[1].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 797
rra[3].cur_row = 9
rra[3].pdp_per_row = 288
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = 1.0370016800e+08
rra[3].cdp_prep[0].unknown_datapoints = 0
rra[3].cdp_prep[1].value = 2.0346247850e+06
rra[3].cdp_prep[1].unknown_datapoints = 0
rra[4].cf = "MAX"
rra[4].rows = 600
rra[4].cur_row = 417
rra[4].pdp_per_row = 1
rra[4].xff = 5.0000000000e-01
rra[4].cdp_prep[0].value = NaN
rra[4].cdp_prep[0].unknown_datapoints = 0
rra[4].cdp_prep[1].value = NaN
rra[4].cdp_prep[1].unknown_datapoints = 0
rra[5].cf = "MAX"
rra[5].rows = 700
rra[5].cur_row = 468
rra[5].pdp_per_row = 6
rra[5].xff = 5.0000000000e-01
rra[5].cdp_prep[0].value = 9.2436731204e+04
rra[5].cdp_prep[0].unknown_datapoints = 0
rra[5].cdp_prep[1].value = 1.9127326756e+03
rra[5].cdp_prep[1].unknown_datapoints = 0
rra[6].cf = "MAX"
rra[6].rows = 775
rra[6].cur_row = 116
rra[6].pdp_per_row = 24
rra[6].xff = 5.0000000000e-01
rra[6].cdp_prep[0].value = 1.1111402807e+05
rra[6].cdp_prep[0].unknown_datapoints = 0
rra[6].cdp_prep[1].value = 2.8166290442e+03
rra[6].cdp_prep[1].unknown_datapoints = 0
rra[7].cf = "MAX"
rra[7].rows = 797
rra[7].cur_row = 9
rra[7].pdp_per_row = 288
rra[7].xff = 5.0000000000e-01
rra[7].cdp_prep[0].value = 1.3245997258e+07
rra[7].cdp_prep[0].unknown_datapoints = 0
rra[7].cdp_prep[1].value = 3.2506428223e+05
rra[7].cdp_prep[1].unknown_datapoints = 0
Attachments
This is the new server
This is the new server
Picture 2.png (61.31 KiB) Viewed 4262 times
This is the old server
This is the old server
Picture 3.png (61.54 KiB) Viewed 4262 times
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Low php max memory setting.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Kristoffer
Posts: 3
Joined: Fri May 15, 2009 2:00 pm

Post by Kristoffer »

Tried to copy the php.ini from the working server - no luck.

memory_limit = 128M

Troubleshooting ideas are greatly appreciated.

Thanks.
frosteyes
Posts: 3
Joined: Sun Oct 11, 2009 4:51 pm

Found a solution

Post by frosteyes »

I have the same problem, so I would like to know if their is any solution.

I use version 0.8.7d

Thanks ahead
openx
Posts: 1
Joined: Sat Oct 17, 2009 10:57 am

Post by openx »

See: http://forums.cacti.net/post-149546.html#149546


Resolved my problems with 64bit+95th percentile
frosteyes
Posts: 3
Joined: Sun Oct 11, 2009 4:51 pm

Think I have found the problem

Post by frosteyes »

I have digging a bit deeper into the problem, and might found the reason. As I am a Dane, I use da_DK.UTF8 for locales. Width rrdtool 1.3 fetch return decimal comma (,) as used in Denmark, and not decimal dot (.) as used in USA

I'm working on a clean solution
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Oh, very interesting... When you work out a solution, please send me a patch to evaluate and include.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
stein
Posts: 7
Joined: Thu Apr 02, 2009 8:42 am

Post by stein »

I got the same problem after I changed the locale to nb_NO.iso88591 (needed to get the norwegian characters working..).
95th percentile now only shows up as 0 mbit/s.
Please update if you got a fix for this.
frosteyes
Posts: 3
Joined: Sun Oct 11, 2009 4:51 pm

Just a small followup

Post by frosteyes »

I newer got around to create a clean solution.

What I did, was to change the LC_NUMERIC to C, and just keeps everthing else as da_DK.UTF-8

LANG=da_DK.UTF-8
LC_CTYPE="da_DK.UTF-8"
LC_NUMERIC=C
LC_TIME="da_DK.UTF-8"
LC_COLLATE="da_DK.UTF-8"
LC_MONETARY="da_DK.UTF-8"
LC_MESSAGES="da_DK.UTF-8"
LC_PAPER="da_DK.UTF-8"
LC_NAME="da_DK.UTF-8"
LC_ADDRESS="da_DK.UTF-8"
LC_TELEPHONE="da_DK.UTF-8"
LC_MEASUREMENT="da_DK.UTF-8"
LC_IDENTIFICATION="da_DK.UTF-8"
LC_ALL=

This means that folder names, and this can work with danish stuff.

I did the job, but is not a clean solution
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Ah....

Interesting, I didn't think about internationalization of RRDTool's output.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Another, short term workaround is to, in lib/rrd.php, to do the following in the function rrdtool_function_fetch just before and after the rrdtool_execute() calls.

Code: Select all

$locale = getenv("LC_NUMERIC");
putenv("LC_NUMERIC=C");
rrdtool_execute(...);
putenv("LC_NUMERIC=$locale");
However, I am perplexed as to why your PHP ENV is not behaving correctly. Shouldn't PHP be picking this up from the Apache users environment? Reading further, there is a solution also to do something like the following:

Code: Select all

setlocale(LC_NUMERIC,'ru');
http://us2.php.net/manual/en/function.setlocale.php

In include/config.php

The second might be better.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

The user reports, via Private Message, that my first example fixes the Reporting of 95th Percentile with RRDtool 1.4.x.

Rony, what are your thoughts? I believe we need Browniebrawn's feedback on this one.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
stein
Posts: 7
Joined: Thu Apr 02, 2009 8:42 am

Post by stein »

Big thanks to frosteyes.
It's finally working for me too.

I solved it by adding this to /etc/init.d/apache2

ENV="env -i LC_NUMERIC=C LANG=nb_NO.iso88591 PATH=/usr/local/bin:/usr/bin:/bin"

It might be a naughty solution but it works!
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests