[rrd-developers] rrdtool 1.3 cairo switch is done

Matthew Chambers matthew.chambers at vanderbilt.edu
Thu Jun 14 17:37:43 CEST 2007


> while looking at your FULL_SIZE_MODE code I find this:
> 
>         if (im->extra_flags & FULL_SIZE_MODE)
>             leg_y = leg_y_prev =
>                 leg_y - (int) (im->text_prop[TEXT_PROP_LEGEND].size *
> 1.8);
> 
> 
> this looks as if you are assuming too much ....note that you can
> not know the size of text by looking at the size attribute in
> rrdtool >= 1.2. You do actually have to measure it ...
> 

Then I'm confused.  This kind of calculation is used all over the graph code
in 1.2.23 (not my modifications).  I just extended its use.  Or are you
referring specifically to TEXT_PROP_LEGEND?


> I tried to reproduce the problem you reported, and I can't ... it all
>looks fine here ... are you sure you are using the latest trunk with cairo?
> also the labels you mention below do not match up with what you have in
> the graph ...

Yes, I used the latest trunk.  I had to download cairo and pango and stuff
to compile it. :)  Maybe the full graph definition will be better at
reproducing the problem, I accidently left out the end of it.  The full
command for that memory report on my Fenchurch00 machine is:

rrdtool graph - --start 1181831616 --end 1181835216 --width 450 --height 160
--lower-limit 0 --rigid --title 'Fenchurch00 Memory last hour'
--vertical-label Bytes --base 1024 --full-size-mode \
DEF:'mem_total'='${rrd_dir}/mem_total.rrd':'sum':AVERAGE \
CDEF:'bmem_total'=mem_total,1024,* \
DEF:'mem_shared'='${rrd_dir}/mem_shared.rrd':'sum':AVERAGE \
CDEF:'bmem_shared'=mem_shared,1024,* \ 
DEF:'mem_free'='${rrd_dir}/mem_free.rrd':'sum':AVERAGE \
CDEF:'bmem_free'=mem_free,1024,* \
DEF:'mem_cached'='${rrd_dir}/mem_cached.rrd':'sum':AVERAGE \
CDEF:'bmem_cached'=mem_cached,1024,* \ 
DEF:'mem_buffers'='${rrd_dir}/mem_buffers.rrd':'sum':AVERAGE \
CDEF:'bmem_buffers'=mem_buffers,1024,* \ 
CDEF:'bmem_used'='bmem_total','bmem_shared',-,'bmem_free',-,'bmem_cached',-,
'bmem_buffers',- \
AREA:'bmem_used'#$mem_used_color:'Memory Used' \ 
STACK:'bmem_shared'#$mem_shared_color:'Memory Shared' \ 
STACK:'bmem_cached'#$mem_cached_color:'Memory Cached' \ 
STACK:'bmem_buffers'#$mem_buffered_color:'Memory Buffered'
DEF:'swap_total'='${rrd_dir}/swap_total.rrd':'sum':AVERAGE \
DEF:'swap_free'='${rrd_dir}/swap_free.rrd':'sum':AVERAGE \
CDEF:'bmem_swapped'='swap_total','swap_free',-,1024,* \
STACK:'bmem_swapped'#$mem_swapped_color:'Memory Swapped' \
LINE2:'bmem_total'#$cpu_num_color:'Total In-Core Memory'

The standard output is piped back through PHP to send the image.  I've tried
it with full-size-mode off as well, and the legend spacing doesn't change.

HTH,
Matt



More information about the rrd-developers mailing list