Problem with RRD Graph!

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
jason-duff
Posts: 1
Joined: Thu Nov 10, 2005 3:36 am

Problem with RRD Graph!

Post by jason-duff »

hallo people, i have a problem.
i use the RRD-tool for Networkanalysis.
I measure the traffic of the Interface etho.
then i graph it with the rrdtool graph funktion.
then i calculate the maximum traffic within the timespan.
I have a 2Mbs Interface.
Now i will calculate the percentage of the maximum traffic to this 2Mbps.
Example: my maximum traffic rate is 1Mbps .this is 50% of 2Mbps.
In sourcecode i try to do this with the VDEF:

Code: Select all

RRDs::graph("/space/mrtg/test/load.png",
     "--vertical-label= traffic in bps",
     "--title=Network Interface $Interface",
     "--width=600",
     "--height=200", 
     "--start=$begin",
     "--end= $end",
     "DEF:eth0r=$DB:ds1:MAX",
     "CDEF:eth0rb=eth0r,8,*",
     "CDEF:eth0tb=eth0t,8,*",
     "VDEF:ethomax=100,2000000,/eth0r,MAXIMUM,*",
     'HRULE:2000000#FF0000:100% bandwidth (2 Mbps)\n',
     'COMMENT:                  Average              Maximum          Current\n',
     "AREA:eth0rb#778899:Receive ",
     'GPRINT:eth0rb:AVERAGE:%12.2lf %sbps',
     'GPRINT:eth0rb:MAX:%12.2lf %sbps',
     'GPRINT:eth0rb:LAST:%12.2lf %sbps\n',) or
         die "graph failed ($RRDs::error)"
but it doesnt work. I make something wrong in the VDEF definition.
an idea????

thanks
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Is the forward slash in front of the def name correct:
,/eth0r
TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests