Page 1 of 1

Bandwidth calculation in nagiosxi

Posted: Tue Feb 13, 2018 9:44 pm
by lizhi1989

Code: Select all

Using RRD file: /var/lib/mrtg/192.168.5.42_1.rrd
Input warning level(Mb/s): 50.00
Output warning level(Mb/s): 50.00
Input critical level (Mb/s): 80.00
Output critical level (Mb/s): 80.00
Fetching data with command: rrdtool fetch /var/lib/mrtg/192.168.5.42_1.rrd AVERAGE -s-10minutes | grep -vi "nan"
RRD File Data:
                            ds0                 ds1

1490043900: 1.7957144235e+06 1.1482139460e+05
1490044200: 2.3002856646e+06 1.3019000204e+05
Raw Input Traffic Value (b/s): 18402285.316800
Raw Output Traffic Value (b/s): 1041520.016320
Decimal Input Traffic Value (b/s): 18402285
Decimal Output Traffic Value (b/s): 1041520
Traffic IN scalar: 1000000
Traffic OUT scalar: 1000000
OK - Current BW in: 18.40Mbps Out: 1.04Mbps|in=18.402285Mb/s;50.00;80.00 out=1.041520Mb/s;50.00;80.00
Came across one of the post regarding bandwidth calculation, after going through the post and calculation very carefully, i still doesn't seems to understand how the value is convert from:

1490043900: 1.7957144235e+06 1.1482139460e+05
1490044200: 2.3002856646e+06 1.3019000204e+05

to

Raw Input Traffic Value (b/s): 18402285.316800
Raw Output Traffic Value (b/s): 1041520.016320

Anyone can help to explain this to me?

Re: Bandwidth calculation in nagiosxi

Posted: Wed Feb 14, 2018 3:38 pm
by cdienger
1490044200: 2.3002856646e+06 1.3019000204e+05 for example:

2.3002856646e+06 * 8(8bits per byte) = 18402285.3168 = 18.4Mbps
1.3019000204e+05 * 8 = 1041520.01632 = 1.04Mbps

Hope this helps clarify things!

Re: Bandwidth calculation in nagiosxi

Posted: Sun Feb 18, 2018 8:24 pm
by lizhi1989
Thank You!

Re: Bandwidth calculation in nagiosxi

Posted: Mon Feb 19, 2018 10:43 am
by tmcdonald
Did you have additional related questions or are we alright to close this up?