CDEF convert Bits into MBPS
Moderators: Developers, Moderators
CDEF convert Bits into MBPS
Hello All
I have a cdef defined cdef=CURRENT_DATA_SOURCE,1000000,/ such as to convert bits/second into megabits /second
I cannot get it to display on my graph and I would really apreciate if someone could show me how to do it!!!
Thanks,
I have a cdef defined cdef=CURRENT_DATA_SOURCE,1000000,/ such as to convert bits/second into megabits /second
I cannot get it to display on my graph and I would really apreciate if someone could show me how to do it!!!
Thanks,
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Post your resulting graph syntax using debug under graph management.
TheWitness
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?
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?
Here it is Thanks
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
DEF:a="/var/www/cacti/rra/sample_traffic_in_134.rrd":traffic_in:AVERAGE \
DEF:b="/var/www/cacti/rra/sample_traffic_in_134.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdeff=b,8,* \
CDEF:cdefbc=b,1000000,/ \
AREA:cdefa#00CF00:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total In\: 17.98 MB\n" \
LINE1:cdeff#002A97:"Outbound" \
GPRINT:cdeff:LAST:"Current\:%8.2lf %s" \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total Out\: 187.79 MB" \
COMMENT:"Port Speed 100000000 Bits/sec" \
COMMENT:"" \
GPRINT:cdefbc:AVERAGE:"%8.2lf %s"
RRDTool Says:
OK
I guess my cdef troubles comes from where it is highlithed in red
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
DEF:a="/var/www/cacti/rra/sample_traffic_in_134.rrd":traffic_in:AVERAGE \
DEF:b="/var/www/cacti/rra/sample_traffic_in_134.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdeff=b,8,* \
CDEF:cdefbc=b,1000000,/ \
AREA:cdefa#00CF00:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total In\: 17.98 MB\n" \
LINE1:cdeff#002A97:"Outbound" \
GPRINT:cdeff:LAST:"Current\:%8.2lf %s" \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total Out\: 187.79 MB" \
COMMENT:"Port Speed 100000000 Bits/sec" \
COMMENT:"" \
GPRINT:cdefbc:AVERAGE:"%8.2lf %s"
RRDTool Says:
OK
I guess my cdef troubles comes from where it is highlithed in red
a template that will do the conversion
Doesnt someone have a template that will convert bits per second into megabits per second Thanks. This is the template I am using.
Interface - Traffic (bits/sec, Total Bandwidth)
Interface - Traffic (bits/sec, Total Bandwidth)
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
It's more a querkynees in the interface. The cdefbc likely does not work right?
TheWitness
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?
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?
Yes thats what I am guessing
Damn cdefbc lol
Hi all,
trying to use the following to convert to megabits/sec (Mbps):
I'm ending up with graphs like this:
Why is it showing 50m ? It should be showing like 1Mbps or .253 Mbps or 8.34Mbps.
TIA!
trying to use the following to convert to megabits/sec (Mbps):
Code: Select all
cdef=CURRENT_DATA_SOURCE,8,*,1048576,/
Why is it showing 50m ? It should be showing like 1Mbps or .253 Mbps or 8.34Mbps.
TIA!
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
Hi
50m means 0.050
What GPRINT type are you using in your graph template ?
50m means 0.050
What GPRINT type are you using in your graph template ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Hi. I am using the 'Normal' GPRINT. Something I fooled around with is the 'unit-exponent' value for the graph. I changed it to 0 and now it shows on the Y-axis, 0.1.
Is that the correct location to change this?
I changed the GPRINT to 'Exact Numbers' and everything now shows 0 where in the graph above, it shows 457.29m and 554.13u etc.
Thanks for your help.
Is that the correct location to change this?
I changed the GPRINT to 'Exact Numbers' and everything now shows 0 where in the graph above, it shows 457.29m and 554.13u etc.
Thanks for your help.
Who is online
Users browsing this forum: No registered users and 3 guests