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

Alexandre DERUMIER aderumier at odiso.com
Mon Jan 14 11:36:44 CET 2013


> then broadcast to 
> PVE::Cluster::broadcast_rrd("pve2.3-vm/$vmid", $data) 
> instead 
> PVE::Cluster::broadcast_rrd("pve2-vm/$vmid", $data) 

>>Yes, we only change the broadcast name. 

But if I only change the broadcast , it'll recreate an new empty rrd ..?

$data = "$d->{uptime}:$d->{name}:$template:$ctime:$d->{cpus}:$d->{cpu}:" .
        "$d->{maxmem}:$d->{mem}:" .
        "$d->{maxdisk}:$d->{disk}:" .
        "$d->{netin}:$d->{netout}:" .
        "$d->{diskread}:$d->{diskwrite}";

PVE::Cluster::broadcast_rrd("pve2.3-vm/$vmid", $data)


or do you want:

$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}";

PVE::Cluster::broadcast_rrd("pve2-vm/$vmid", $data)

$data2 = "$template";
PVE::Cluster::broadcast_rrd("pve2.3-vm/$vmid", $data2)


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

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Lundi 14 Janvier 2013 10:59:29 
Objet: RE: [pve-devel] adding a new value in rrd ? 

> 
> I have try to rename 
> /var/lib/rrdcached/db/pve2-vm -> /var/lib/rrdcached/db/pve2.3-vm (So I 
> keep old rdds in the directory) 

we keep writing values to old files. I do not want to generate a new file. 

> then broadcast to 
> PVE::Cluster::broadcast_rrd("pve2.3-vm/$vmid", $data) 
> instead 
> PVE::Cluster::broadcast_rrd("pve2-vm/$vmid", $data) 

Yes, we only change the broadcast name. 



More information about the pve-devel mailing list