Strange units displayes

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
sharkys
Posts: 12
Joined: Sun Oct 05, 2008 11:17 am

Strange units displayes

Post by sharkys »

Could you please provide me some guidance how to get rid of those strange units and replace them by real numbers ? I tried already everything, but not succesfully. Other graphs are working fine...

Code: Select all

  	 RRDTool Command:

/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="PROXY - Sendmail Statistics" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:8: \
--font AXIS:6: \
--font LEGEND:7: \
--font UNIT:6: \
DEF:a="/usr/local/share/cacti/rra/proxy_sm_bytes_to_72.rrd":sm_msgsto:AVERAGE \
DEF:b="/usr/local/share/cacti/rra/proxy_sm_bytes_to_72.rrd":sm_msgsfrom:AVERAGE \
DEF:c="/usr/local/share/cacti/rra/proxy_sm_bytes_to_72.rrd":sm_msgsreject:AVERAGE \
DEF:d="/usr/local/share/cacti/rra/proxy_sm_bytes_to_72.rrd":mess_queue:AVERAGE \
AREA:a#00FF00FF:"msgs sent"  \
GPRINT:a:LAST:"    current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"average\:%8.2lf %s"  \
GPRINT:a:MAX:"max\:%8.2lf %s\n"  \
AREA:b#4444FFFF:"msgs received"  \
GPRINT:b:LAST:"current\:%8.2lf %s"  \
GPRINT:b:AVERAGE:"average\:%8.2lf %s"  \
GPRINT:b:MAX:"max\:%8.2lf %s\n"  \
AREA:c#FF0000FF:"msgs rejected"  \
GPRINT:c:LAST:"current\:%8.2lf %s"  \
GPRINT:c:AVERAGE:"average\:%8.2lf %s"  \
GPRINT:c:MAX:"max\:%8.2lf %s\n"  \
AREA:d#942D0CFF:"Message queue"  \
GPRINT:d:LAST:"current\:%8.2lf %s"  \
GPRINT:d:AVERAGE:"average\:%8.2lf %s"  \
GPRINT:d:MAX:"max\:%8.2lf %s\n" 

RRDTool Says:

OK

Code: Select all

Data Source Debug

/usr/local/bin/rrdtool create \
/usr/local/share/cacti/rra/proxy_sm_bytes_to_72.rrd \
--step 300  \
DS:sm_bytes_to:GAUGE:600:0:10000 \
DS:sm_msgsfrom:GAUGE:600:0:U \
DS:sm_msgsdiscard:GAUGE:600:0:U \
DS:sm_msgsquran:GAUGE:600:0:U \
DS:sm_msgsreject:GAUGE:600:0:U \
DS:sm_bytes_from:GAUGE:600:0:10000 \
DS:sm_msgsto:GAUGE:600:0:U \
DS:mess_queue:GAUGE:600:0:100 \
RRA:AVERAGE:0.5:1:500 \
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:500 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
Attachments
Screen.png
Screen.png (16.6 KiB) Viewed 2100 times
engeishi
Cacti User
Posts: 75
Joined: Sun Aug 23, 2009 12:03 pm
Location: Tokyo, Japan

Post by engeishi »

Try to get the value from the rrd file manualy using rrdfetch command as follows, and let us know the result.

Code: Select all

rrdtool fetch /usr/local/share/cacti/rra/proxy_sm_bytes_to_72.rrd AVERAGE -s -1h
If the gotten data has very small value shawn as the graph, maybe your data collection method have some problem.
Otherwise maybe wrong CDEF function is defined to the Data Source.
sharkys
Posts: 12
Joined: Sun Oct 05, 2008 11:17 am

Post by sharkys »

Results are following, now I understand why there is "m" as "mili" ...

Code: Select all

1251696300: nan 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan 6.6666666667e-03 0.0000000000e+00
1251696600: nan 3.0000000000e-02 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan 6.6666666667e-03 0.0000000000e+00
1251696900: nan 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan 1.3289036545e-02 0.0000000000e+00
1251697200: nan 2.6666666667e-02 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan 4.4296788483e-05 0.0000000000e+00
1251697500: nan 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan 0.0000000000e+00 0.0000000000e+00
1251697800: nan 2.6666666667e-02 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan 0.0000000000e+00 0.0000000000e+00
1251698100: nan 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan 1.3333333333e-02 0.0000000000e+00
1251698400: nan 2.6490066225e-02 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan 0.0000000000e+00 0.0000000000e+00
1251698700: nan 1.7660044150e-04 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan 6.6666666667e-03 0.0000000000e+00
1251699000: nan 3.9867109635e-02 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan 0.0000000000e+00 0.0000000000e+00
1251699300: nan 1.3289036545e-04 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan 3.3333333333e-03 0.0000000000e+00
1251699600: nan 2.9900332226e-02 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 nan 0.0000000000e+00 0.0000000000e+00
1251699900: nan nan nan nan nan nan nan nan
Normally results should not be so small, as script is returning following values :

Code: Select all

msgsfrom:2359 msgsto:331 msgsreject:0 msgsdiscard:0 msgsquran:0 bytes_from:336138K bytes_to:559611K mess_queue:0
sharkys
Posts: 12
Joined: Sun Oct 05, 2008 11:17 am

Post by sharkys »

My data template, if it will help...
Attachments
cacti_data_template_custom_-_unix_-_sendmail_mailstats.xml
(10.07 KiB) Downloaded 107 times
sharkys
Posts: 12
Joined: Sun Oct 05, 2008 11:17 am

Post by sharkys »

Btw - I don't have any CDEF function enabled ;-(
engeishi
Cacti User
Posts: 75
Joined: Sun Aug 23, 2009 12:03 pm
Location: Tokyo, Japan

Post by engeishi »

I have imported your template to my test environment.
I wrote a small script to output data, and set up Cacti to collect data and draw graph.
There are some minor problem, but it works fine like this figure...

The remaining suspicious point is the script output I think.
If it shows normal value as you presented, I have no idea why this happens.

Sorry I couldn't help you. :(
Attachments
mailstats.PNG
mailstats.PNG (17.35 KiB) Viewed 2021 times
sharkys
Posts: 12
Joined: Sun Oct 05, 2008 11:17 am

Post by sharkys »

Even according to the LOG, rights inputs are going from Script to RRD, but they are not saved correctly ???

Code: Select all

09/01/2009 07:40:19 AM - POLLER: Poller[0] CACTI2RRD: /usr/local/bin/rrdtool update /usr/local/share/cacti/rra/proxy_sm_bytes_to_72.rrd --template sm_msgsfrom:sm_msgsto:sm_msgsreject:sm_msgsdiscard:sm_msgsquran:mess_queue 1251783601:751:3:0:0:0:0
09/01/2009 07:40:19 AM - CMDPHP: Poller[0] Host[1] DS[72] CMD: sh /usr/local/share/cacti/scripts/sendmail-mailstats.sh, output: msgsfrom:751 msgsto:3 msgsreject:0 msgsdiscard:0 msgsquran:0 bytes_from:5582K bytes_to:305K mess_queue:0
I deleted associated RRD file and now let's see.
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

If the data is going in correctly, it is the graph template that is incorrect.

Somewhere in it you have either set it to Average, or are applying Per 5 Minute, etc, etc. Tinker with the graph template until you get the desired results.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
sharkys
Posts: 12
Joined: Sun Oct 05, 2008 11:17 am

Post by sharkys »

I got it already, thank you. It was necessary to delete RRD files.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests