Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Brett Knuchel on August 27, 2003, 11:09:40 AM
-
Our SME Server is connected to the net via dialup. At some stage down the track we are looking to convert to ADSL, however we need to know what sort of usage (in terms of traffic, not time) we are having as many ADSL plans in Australia have usage limits which if you exceed you pay an excess usage charge (very expensive usually). Unfortunately our current ISP will not provide these details (won't be staying with them once our current contract is up). I need to know all traffic going out and preferably also all traffic coming in through the dialup connection over a period of time. I am not interested in real time reporting as we are looking at usage per month not per minute.
-
Here is my tought:
In /var/log/messages there must be a line every time it connects, and every time it disconnects.
You can write a script (grep something - write to file) that tracks these connection times, and have your time on line available.
My 0.02
Cheers.
Marc
-
There is a progam called netprobe for linux with a web interface. It records traffic passing through your network card so even if you are on dial up you can record it as it comes in and out of your network. There is a how to install it on this site so if you do a search you should find something. If not e-mail me and i will get the links for you. Only thing is unless the new version does logs you will have to record your totals manually
-
Marc wrote:
>
> Here is my tought:
>
> In /var/log/messages there must be a line every time it
> connects, and every time it disconnects.
>
> You can write a script (grep something - write to file) that
> tracks these connection times, and have your time on line
> available.
I am not looking for time online as our ISP does provide that. I am looking for download and upload traffic reports. This reports need to cover an extended period of time - I am not looking for real time reporting.
-
Krusty wrote:
>
> There is a progam called netprobe for linux with a web
> interface. It records traffic passing through your network
> card so even if you are on dial up you can record it as it
> comes in and out of your network. There is a how to install
> it on this site so if you do a search you should find
> something. If not e-mail me and i will get the links for you.
> Only thing is unless the new version does logs you will have
> to record your totals manually
I have looked at netprobe 0.5 and there are a few problems with it.
Firstly it records for a maximum of two days. I am looking for usage preferably over a month but at least a week.
Secondly I need to discriminate between traffic going through our dialup connection and internal traffic. Netprobe seems to me to only monitor traffic through the network card on the server and doesn't discriminate between internal and external traffic.
-
data usage
cat /var/log/messages* |grep 'IP tran'> /tmp/IP
and may be easiest to run that through a spreadsheet to sort and count
and for time
cat /var/log/messages |grep duration
regards
stephen noble
dungog.net/sme
-
stephen noble wrote:
>
>
> data usage
> cat /var/log/messages* |grep 'IP tran'> /tmp/IP
> and may be easiest to run that through a spreadsheet to sort
> and count
>
> and for time
> cat /var/log/messages |grep duration
>
Does not work as none of the messages contain the text "IP tran" or "duration".
I suspect it is because I am now using dialmon to connect. I also noted that in the messages the amount transmitted and the duration is not reported on every disconnection. It seems to depend on the method of disconnection as to whether it is reported or not.