Page 1 of 1
inbound and outbound Byte count
Posted: Tue Nov 03, 2020 5:02 pm
by MelsStudios
Hello !
We need to evaluate the traffic on a serveur for a period of time.
we would like to measure the byte count of traffic to get an estimate of the total byte countr for a month.
I have ncpa agent installed on my windows server, I get some inbound and outbound trafic.
I went on a graph, clicked on the 3 bars and downloaded the xml or csv file but i am not sure how I can select a specific period of time.
would you guys have a suggestion how I could do it ?
Thank you !
Re: inbound and outbound Byte count
Posted: Wed Nov 04, 2020 4:09 pm
by ssax
There isn't currently a report that will show you this, you could run this command to access the data:
- Change the HOSTNAME/SERVICENAME to what it is on the filesystem (do it for both the inbound and the outbound RRDs
Code: Select all
rrdtool graph dummy -s -1month -e now DEF:test=/user/local/nagios/share/perfdata/HOSTNAME/SERVICENAME.rrd:1:AVERAGE PRINT:test:AVERAGE:'average - %.0lf'
Re: inbound and outbound Byte count
Posted: Wed Nov 04, 2020 5:26 pm
by MelsStudios
Thanks for your reply.
We would be looking for the sum of that data for a month, not the average..
would it be possible with rrdtool ?
Thanks you
Re: inbound and outbound Byte count
Posted: Thu Nov 05, 2020 5:20 pm
by ssax
According to this you should be able to:
http://rrdtool.vandenbogaerdt.nl/total.php
What is the output of these commands against your RRD?
Code: Select all
rrdtool graph dummy -s -1month -e now DEF:ds0=/usr/local/nagios/share/perfdata/HOSTNAME/SERVICENAME.rrd:1:AVERAGE VDEF:ds0total=ds0,TOTAL PRINT:ds0total:"Total %lf"
Code: Select all
rrdtool graph dummy -s -1month -e now DEF:ds0=/usr/local/nagios/share/perfdata/HOSTNAME/SERVICENAME.rrd:1:AVERAGE VDEF:ds0average=ds0,AVERAGE CDEF:ds0modified=ds0,UN,ds0average,ds0,IF VDEF:ds0total=ds0modified,TOTAL PRINT:ds0total:"Total %lf"
Re: inbound and outbound Byte count
Posted: Fri Nov 06, 2020 11:56 am
by MelsStudios
Code: Select all
rrdtool graph dummy -s -1month -e now DEF:ds0=/usr/local/nagios/share/perfdata/HOSTNAME/SERVICENAME.rrd:1:AVERAGE VDEF:ds0total=ds0,TOTAL PRINT:ds0total:"Total %lf"
0x0
Total 503343,656667
Code: Select all
rrdtool graph dummy -s -1month -e now DEF:ds0=/usr/local/nagios/share/perfdata/HOSTNAME/SERVICENAME.rrd:1:AVERAGE VDEF:ds0average=ds0,AVERAGE CDEF:ds0modified=ds0,UN,ds0average,ds0,IF VDEF:ds0total=ds0modified,TOTAL PRINT:ds0total:"Total %lf"
0x0
Total 5536780,223333
It looks like it is working,
I don't understand the difference between those 2 commands though.
The outpout is in bytes, right ?
Thanks again.
Re: inbound and outbound Byte count
Posted: Mon Nov 09, 2020 4:15 pm
by ssax
Hmm, I'm not really sure what the differences are based on that page, I'm also not sure which is proper. What does your current bandwidth checks show for it?
The data should be in octets. So I think the raw query would show octets and need to be converted into whatever you want from there.
Re: inbound and outbound Byte count
Posted: Tue Nov 10, 2020 9:56 am
by MelsStudios
Hi,
Currently Inbound is Bytes_recv was 2.02 MB/s.
Re: inbound and outbound Byte count
Posted: Wed Nov 11, 2020 6:53 pm
by ssax
I'm not sure either of those is proper, they aren't really adding up based on the info that link provided the output should be in octets, so in order to get octets into Mb you need to multiply it by 8 and then divide by 1000000. When doing that with your numbers they are small I don't think either of them are correct. You could reach out to the RRDtool devs or the guy who wrote that article and see if they can provide any insight but I'm out of ideas given existing functionality.