[rrd-developers] Re: RRDtool 1.0.x: rrd_update --template broken ?

Tobias Oetiker oetiker at ee.ethz.ch
Sun May 8 21:33:45 MEST 2005


Hi Henrik,

if you are looking at the 1.0.x C API, note that you have to set
the optind variable to 0 before calling rrdupdate ...

you can use rrd_tool.c for inspiration

tobi
Today Henrik Stoerner wrote:

> I have some problems getting rrd_update to handle the --template option
> when using the C API.
>
> My first attempt was to use the same set of parameters that work with
> RRDtool 1.2.x. The debug output shows what's in the argv[] table passed
> to rrd_update():
>
> param 00: 'rrdupdate'
> param 01: '/var/lib/hobbit/rrd/tyge.sslug.dk/vmstat.rrd'
> param 02: '-t'
> param 03: 'cpu_r:cpu_b:cpu_w:mem_swpd:mem_free:mem_buff:mem_cach:mem_si:mem_so:dsk_bi:dsk_bo:cpu_int:cpu_csw:cpu_usr:cpu_sys:cpu_idl:cpu_wait'
> param 04: '1115570101:0:0:U:245988:6324:93144:462504:1:0:34:65:171:176:2:0:98:0'
> RRD error: opening 'cpu_r:cpu_b:cpu_w:mem_swpd:mem_free:mem_buff:mem_cach:mem_si:mem_so:dsk_bi:dsk_bo:cpu_int:cpu_csw:cpu_usr:cpu_sys:cpu_idl:cpu_wait':No such file or directory
>
> Huh ? So I tried merging -t and the ds-list into one:
>
> param 00: 'rrdupdate'
> param 01: '/var/lib/hobbit/rrd/tyge.sslug.dk/vmstat.rrd'
> param 02: '-t cpu_r:cpu_b:cpu_w:mem_swpd:mem_free:mem_buff:mem_cach:mem_si:mem_so:dsk_bi:dsk_bo:cpu_int:cpu_csw:cpu_usr:cpu_sys:cpu_idl:cpu_wait'
> param 03: '1115570401:0:0:U:245940:6472:96148:458436:0:0:42:62:177:103:0:0:99:0'
> RRD error: Not enough arguments
>
> I've tested it with RRDtool 1.0.49, but the CHANGES file for 1.0.50 does
> not mention anything about this being fixed.
>
>
> Henrik
>
> --
> Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
> Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
> Archive     http://lists.ee.ethz.ch/rrd-developers
> WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi
>

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker @ ISG.EE, ETL F24.2, ETH, CH-8092 Zurich
 / // _ \/ _ \/ /  System Manager, Time Lord, Coder, Designer, Coach
/_/ \.__/_.__/_/   http://people.ee.ethz.ch/oetiker +41(0)44-632-5286

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-developers
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-developers mailing list