> thing I have come up with is create a new RRD for every array and then > graph that. There has to be a way given a hash of arrays: > > $combined{$NameOfGraph} = @rrdfiles > > that I can generate the equivalent of the below. the length of > @rrdfiles > changes depending on the $NameOfGraph.
Why not something like this? You might want to dynamically define a line for the total, though. my @args = ( $NameOfGraph, "--title", "APstats", "--start", "now-48h", "--width=300", "--height=75", "--vertical-label=Active Users", '--lazy' ); my $i = 0; foreach ( @rrdfiles ) { push @args, ( "DEF:a$i=$_:auth:MAX", "DEF:g$i=$_:guest:MAX", "VDEF:amax$i=a$i,LAST", "VDEF:aavg$i=a$i,AVERAGE", "VDEF:gmax$i=g$i,LAST", "VDEF:gavg$i=g$i,AVERAGE", "AREA:a$i#00C000:auth$i", "GPRINT:amax$i:\%6.2lf \%Susers", "AREA:g$i#00C0FF:guest$i:STACK", "GPRINT:gmax$i:\%6.2lf \%Susers"); $i += 1; } RRDs::graph( @args ); Steve Steve Shipway ITS Unix Services Design Lead University of Auckland, New Zealand Floor 1, 58 Symonds Street, Auckland Phone: +64 (0)9 3737599 ext 86487 DDI: +64 (0)9 923 6487 Mobile: +64 (0)21 753 189 Email: s.ship...@auckland.ac.nz Please consider the environment before printing this e-mail : 打印本邮件,将减少一棵树存活的机会
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users