[pve-devel] adding a new value in rrd ?

Dietmar Maurer dietmar at proxmox.com
Fri Jan 11 17:08:08 CET 2013


> I would like to known how to add a new value in rrds ?

AFAIK there is no easy way to add new values. Any ideas are welcome.

> I have added $template  value in pvestatd:
> 
> update_qemu_status{
>  $data = "$d->{uptime}:$d->{name}:$ctime:$d->{cpus}:$d->{cpu}:" .
>                 "$d->{maxmem}:$d->{mem}:" .
>                 "$d->{maxdisk}:$d->{disk}:" .
>                 "$d->{netin}:$d->{netout}:" .
>                 "$d->{diskread}:$d->{diskwrite}:$template";
> 
> }
> 
> But I have an error on rrd update
> 
> rrdcached[2185]: queue_thread_main: rrd_update_r
> (/var/lib/rrdcached/db/pve2-vm/163) failed with status -1.
> (/var/lib/rrdcached/db/pve2-vm/163: found extra data on update argument:
> 1)
> 
> 
> also, I look into rrd with rrdtool,
> I see 10 values stored
> (maxcpu,cpu,maxmem,mem,maxdisk,disk,netin,netout,diskread,diskwrite)
> 
> <row><v>xxx</v><v>xxx</v><v>xxx</v><v>xxx</v><v>xxx</v><v>xxx</v><v
> >xxx</v><v>xx</v><v>xxx</v><v>xxx</v></row>
> 
> But they are 13 values (14 with my new template values) in
> update_qemu_status.
> 
> Where are stored $d->{uptime}:$d->{name}:$ctime ?

We skip the first values - we just need them in RAM (pmxcfs).






More information about the pve-devel mailing list