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

Alexandre DERUMIER aderumier at odiso.com
Fri Jan 11 17:45:27 CET 2013


>>AFAIK there is no easy way to add new values. Any ideas are welcome. 
Yes, adding ds in not easy, I have use scripts is past with my cacti rrds.
I'll try to refind them.

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

Oh, that's exactly what I need !  (where are the values skipped ?)

----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com>, pve-devel at pve.proxmox.com 
Envoyé: Vendredi 11 Janvier 2013 17:08:08 
Objet: RE: [pve-devel] adding a new value in rrd ? 

> 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