Skip to contentSkip to conversation

bandwidth monitoring

DISCUSSION [email protected] 10 participants 16 messages Jan 6, 2005 – Jan 28, 2005 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello

Does somebody know a program for monitoring bandwidth by ip? I have one internet interface and I must monitor many ips adresses on this interface. I tried Ipac-ng and, I worked a lot to do this config but it seems not working this way.

thanx

#1 lore raw

Hello,

I have had good luck with a program called bandwidthd, available at
http://bandwidthd.sourceforge.net/

I know it's not netfilter related specifically but I found it met my needs where others failed.

J.N.

Quoted 9 lines · On Thu, 2005-01-06 at 11:28 -0500, [email protected] wrote:

Hello

Does somebody know a program for monitoring bandwidth by ip? I have one internet interface and I must monitor many ips adresses on this interface. I tried Ipac-ng and, I worked a lot to do this config but it seems not working this way.

thanx

#2 lore raw
In reply to [email protected]
Quoted 4 lines · On Thu, 2005-01-06 at 10:28, [email protected] wrote:

Does somebody know a program for monitoring bandwidth by ip? I have one internet interface and I must monitor many ips adresses on this interface. I tried Ipac-ng and, I worked a lot to do this config but it seems not working this way.

Ntop might do what you need. http://www.ntop.org. It can summarize and sort traffic by address/port/protocol, etc. I don't use it continuously but fire it up for a while if I think something is hogging the network.

Signature · 2 lines
  Les Mikesell
   [email protected]
#3 lore raw

ntop is great for *short term* monitoring. Generally it will become unmanageable if run for too long. If you want to monitor and keep stats over a longer period of time, bandwidthd will probably work better for you.

J.N.

Quoted 11 lines · Les Mikesell
Quoted 4 lines · On Thu, 2005-01-06 at 10:28, [email protected] wrote:

Does somebody know a program for monitoring bandwidth by ip? I have one internet interface and I must monitor many ips adresses on this interface. I tried Ipac-ng and, I worked a lot to do this config but it seems not working this way.

Ntop might do what you need. http://www.ntop.org. It can summarize and sort traffic by address/port/protocol, etc. I don't use it continuously but fire it up for a while if I think something is hogging the network.

#4 lore raw
In reply to [email protected]

Hello,

To run NTOP permanitly you just have to clear the stats nightly. I have
a php script that makes a HTTP connection, downloads the stats from NTOP and saves them in a mysql database. It then makes another connection and tells NTOP to reset the stats.

That keeps the memory and CPU usage low ... so you could run it continuously.

Michael.

Quoted 6 lines · [email protected] wrote:

Hello

Does somebody know a program for monitoring bandwidth by ip? I have one internet interface and I must monitor many ips adresses on this interface. I tried Ipac-ng and, I worked a lot to do this config but it seems not working this way.

thanx

Signature · 5 lines
Michael Gale
Lan Administrator
Utilitran Corp.

I make better friends with those who think for them selves
#5 lore raw

How many hosts and how much traffic are you running through it? I've wanted to come up with a solution similar to the one you've described to replace my current bandwidthd setup but I'm thinking that my network may be too large with too much traffic to support something like that without building a monster box just to capture the stats.

J.N.

Quoted 24 lines · Michael Gale

Hello,

To run NTOP permanitly you just have to clear the stats nightly. I have
a php script that makes a HTTP connection, downloads the stats from NTOP and saves them in a mysql database. It then makes another connection and tells NTOP to reset the stats.

That keeps the memory and CPU usage low ... so you could run it continuously.

Michael.

Quoted 9 lines · [email protected] wrote:

Hello

Does somebody know a program for monitoring bandwidth by ip? I have one internet interface and I must monitor many ips adresses on this interface. I tried Ipac-ng and, I worked a lot to do this config but it seems not working this way.

thanx

#10 lore raw
In reply to a message not in the archive

No problem ...

I just checked and actually I am using two scripts.

The first script:
--snip-- runntop -- executed by cron.
#!/bin/bash

/usr/bin/curl -k -s -s --digest -u ntopUP:ntopUP https://mis.utilitran.com/uploadscripts/ntopget.php > /dev/null

if [ "$?" == "0" ]; then
echo "File loaded" >> /dev/null
else
~/email "Error with NTOP update" [email protected] < /dev/null fi

sleep 5

/usr/bin/curl --basic -u admin:ntopadmin http://ntop.utilitran.com:3000/ntop/resetStats.html

if [ "$?" == "0" ]; then
echo "File loaded" >> /dev/null
else
~/email "Error with NTOP reset" [email protected] < /dev/null fi
--snip--

The first script makes a http request to a php web page that display no data. Then once that is successful it makes a http connections to ntop and resets the stats.

The second script ... that the first script calls, uses curl to make a http connection to the ntop server, download the stats and store them in a database. The scripts are kind of messy ... really my first attempt. You may notice that data_total is not being used .. that is because I am working on storing the total amounts somewhere .. but that is not done.

The second script:
--snip-- ntopget.php -- executed by http request
<?php
//
// The PHP curl module supports the received page to be returned in a variable // if told.
//

$dat=date('m:d:y-U');
$startphp="<?php\n";
$endphp="?>";

echo 'Preparing to download file<BR>';
$fp = fopen('/home/mis/htdocs/datafiles/ntop/data/' . $dat, 'w'); fwrite($fp,$startphp,strlen($startphp));
fclose($fp);

$fp = fopen('/home/mis/htdocs/datafiles/ntop/data/' . $dat, 'a');
$ch = curl_init("http://ntop.utilitran.com:3000/ntop/dumpData.html?language=php&view=long");

curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);

fclose($fp);

$fp = fopen('/home/mis/htdocs/datafiles/ntop/data/' . $dat, 'a'); fwrite($fp,$endphp,strlen($endphp));
fclose($fp);

echo 'Done downloading file<BR>';

include '/home/mis/htdocs/datafiles/ntop/data/' . $dat;

// Start of using array

              $db = mysql_connect("127.0.0.1", "ntop", "ntop") or 
die("Error ... check with network team");
              mysql_select_db("ntop",$db);

foreach ($ntopHash as $key => $value) {

        $addme = strpos($key,"192.168.7");
        $data = array();

        if ( $addme !== FALSE )
        {

array_push($data,$key); array_push($data,$ntopHash[$key]['hostResolvedName']); array_push($data,$dat); array_push($data,$ntopHash[$key]['ethAddressString']); array_push($data,$ntopHash[$key]['firstSeen']); array_push($data,$ntopHash[$key]['lastSeen']); array_push($data,$ntopHash[$key]['averageRcvdThpt']); array_push($data,$ntopHash[$key]['averageSentThpt']); array_push($data,$ntopHash[$key]['averageTThpt']); array_push($data,$ntopHash[$key]['icmpSent']); array_push($data,$ntopHash[$key]['icmpRcvd']); array_push($data,$ntopHash[$key]['IP']['FTP']['sendLoc']); array_push($data,$ntopHash[$key]['IP']['FTP']['rcvdLoc']); array_push($data,$ntopHash[$key]['IP']['FTP']['sentRem']); array_push($data,$ntopHash[$key]['IP']['FTP']['rcvdFromRem']); array_push($data,$ntopHash[$key]['IP']['HTTP']['sentLoc']); array_push($data,$ntopHash[$key]['IP']['HTTP']['rcvdLoc']); array_push($data,$ntopHash[$key]['IP']['HTTP']['sentRem']); array_push($data,$ntopHash[$key]['IP']['HTTP']['rcvdFromRem']); array_push($data,$ntopHash[$key]['IP']['DIFFHTTP']['sentLoc']); array_push($data,$ntopHash[$key]['IP']['DIFFHTTP']['rcvdLoc']); array_push($data,$ntopHash[$key]['IP']['DIFFHTTP']['sentRem']); array_push($data,$ntopHash[$key]['IP']['DIFFHTTP']['rcvdFromRem']);

array_push($data,$ntopHash[$key]['IP']['RDP']['sentLoc']); array_push($data,$ntopHash[$key]['IP']['RDP']['rcvdLoc']); array_push($data,$ntopHash[$key]['IP']['RDP']['sentRem']); array_push($data,$ntopHash[$key]['IP']['RDP']['rcvdFromRem']); array_push($data,$ntopHash[$key]['IP']['DNS']['sentLoc']); array_push($data,$ntopHash[$key]['IP']['DNS']['rcvdLoc']); array_push($data,$ntopHash[$key]['IP']['DNS']['sentRem']); array_push($data,$ntopHash[$key]['IP']['DNS']['rcvdFromRem']); array_push($data,$ntopHash[$key]['IP']['Mail']['sentLoc']); array_push($data,$ntopHash[$key]['IP']['Mail']['rcvdLoc']); array_push($data,$ntopHash[$key]['IP']['Mail']['sentRem']); array_push($data,$ntopHash[$key]['IP']['Mail']['rcvdFromRem']); array_push($data,$ntopHash[$key]['IP']['DHCP-BOOTP']['sentLoc']); array_push($data,$ntopHash[$key]['IP']['DHCP-BOOTP']['rcvdLoc']); array_push($data,$ntopHash[$key]['IP']['DHCP-BOOTP']['sentRem']); array_push($data,$ntopHash[$key]['IP']['DHCP-BOOTP']['rcvdFromRem']); array_push($data,$ntopHash[$key]['IP']['SNMP']['sentLoc']); array_push($data,$ntopHash[$key]['IP']['SNMP']['rcvdLoc']); array_push($data,$ntopHash[$key]['IP']['SNMP']['sentRem']); array_push($data,$ntopHash[$key]['IP']['SNMP']['rcvdFromRem']); array_push($data,$ntopHash[$key]['IP']['NNTP']['sentLoc']); array_push($data,$ntopHash[$key]['IP']['NNTP']['rcvdLoc']); array_push($data,$ntopHash[$key]['IP']['NNTP']['sentRem']); array_push($data,$ntopHash[$key]['IP']['NNTP']['rcvdFromRem']); array_push($data,$ntopHash[$key]['IP']['SSH']['sentLoc']); array_push($data,$ntopHash[$key]['IP']['SSH']['rcvdLoc']); array_push($data,$ntopHash[$key]['IP']['SSH']['sentRem']); array_push($data,$ntopHash[$key]['IP']['SSH']['rcvdFromRem']); array_push($data,$ntopHash[$key]['IP']['Messenger']['sentLoc']); array_push($data,$ntopHash[$key]['IP']['Messenger']['rcvdLoc']); array_push($data,$ntopHash[$key]['IP']['Messenger']['sentRem']); array_push($data,$ntopHash[$key]['IP']['Messenger']['rcvdFromRem']);

        foreach ( $data as $key => $value ) {

        $data_table = $data_table . '\'' . $value . '\',';

        }

        for ($i=0;$i<6;$i++) {

        $data_total = $data_total . '\'' . $data_table[$i] . '\',';

        }


        $data_table = substr($data_table,0,(strlen($data_table)-1));
        $data_total = substr($data_total,0,(strlen($data_total)-1));

                // Here we upload the data into the daily table

                $sql = "INSERT INTO ntop_daily VALUES ($data_table)";

                $result = mysql_query($sql) or die("Error ..... check 

with network team " . mysql_error());

                if ( $result === FALSE )
                {
                exec('/home/mis/email "NTOP Nightly Update FAILED" "The 
NTOP nightly update failed" \&/> /dev/null');
                }

        }

unset($data_table);
unset($data_total);
unset($data);
unset($result);

}

              mysql_close($db);

?>
--snip--

Quoted 31 lines · Marek Dohojda

Can I see that script?

---
01001101011000010111001001100101011010110010000001000100010011110110100001101111011010100110010001100001

Quoted 19 lines · Michael Gale

Hello,

To run NTOP permanitly you just have to clear the stats nightly. I
have a php script that makes a HTTP connection, downloads the stats from NTOP and saves them in a mysql database. It then makes another connection and tells NTOP to reset the stats.

That keeps the memory and CPU usage low ... so you could run it continuously.

Michael.

Quoted 6 lines · [email protected] wrote:

Hello

Does somebody know a program for monitoring bandwidth by ip? I have one internet interface and I must monitor many ips adresses on this interface. I tried Ipac-ng and, I worked a lot to do this config but it seems not working this way.

thanx

Signature · 5 lines
Michael Gale
Lan Administrator
Utilitran Corp.

I make better friends with those who think for them selves
#6 lore raw
In reply to J. Nerius

Hello,

I am not sure I follow ... NTOP takes care of providing the stats, so
if you firewall box or ntop server can handle your network.

The storage box can be what and where ever ... for example you could have a low end box somewhere on the network that makes the http connection, downloads the stats and stores them in a database.

Then you only need a simple method to display them when needed. If you are a large company it might be easier to setup multiple ntop servers and have all the stats stored in a central location.

Michael.

Quoted 30 lines · J. Nerius

How many hosts and how much traffic are you running through it? I've wanted to come up with a solution similar to the one you've described to replace my current bandwidthd setup but I'm thinking that my network may be too large with too much traffic to support something like that without building a monster box just to capture the stats.

J.N.

Quoted 19 lines · Michael Gale

Hello,

To run NTOP permanitly you just have to clear the stats nightly. I have
a php script that makes a HTTP connection, downloads the stats from NTOP and saves them in a mysql database. It then makes another connection and tells NTOP to reset the stats.

That keeps the memory and CPU usage low ... so you could run it continuously.

Michael.

Quoted 6 lines · [email protected] wrote:

Hello

Does somebody know a program for monitoring bandwidth by ip? I have one internet interface and I must monitor many ips adresses on this interface. I tried Ipac-ng and, I worked a lot to do this config but it seems not working this way.

thanx

Signature · 5 lines
Michael Gale
Lan Administrator
Utilitran Corp.

I make better friends with those who think for them selves
#7 lore raw

Hello,

My concern was for the amount of resources NTOP would end up using with the currently volume of traffic we have going through any one link.

Basically, there will be at least 3000 hosts totaling around 25 megabits of traffic at any given time. In my experience with ntop for short-term monitoring, I found that in these circumstances, the process size and cpu utilization were quite high.

I've been using bandwidthd to collect data and then just rsyncing that data to a different server that actually graphs the data. I'd like to use ntop for it's detailed tracking capabilities, but given the resource utilization issues I've seen in the past, am not sure how feasible this would be.

How many hosts and how much traffic is currently going through your setup? It's very possible that I may just need to tweak settings somewhere to improve performance.

J.N.

Quoted 27 lines · Michael Gale

Hello,

I am not sure I follow ... NTOP takes care of providing the stats, so
if you firewall box or ntop server can handle your network.

The storage box can be what and where ever ... for example you could have a low end box somewhere on the network that makes the http connection, downloads the stats and stores them in a database.

Then you only need a simple method to display them when needed. If you are a large company it might be easier to setup multiple ntop servers and have all the stats stored in a central location.

Michael.

Quoted 9 lines · J. Nerius

How many hosts and how much traffic are you running through it? I've wanted to come up with a solution similar to the one you've described to replace my current bandwidthd setup but I'm thinking that my network may be too large with too much traffic to support something like that without building a monster box just to capture the stats.

J.N.

On Thu, 2005-01-06 at 13:09 -0700, Michael Gale wrote:

#8 lore raw

Ahhh .. I see now. Our setup is rather small and we only have about 10 megabits max at any given time -- usually much less.

Here is the command I use to start ntop:
ntop -4 -a /home/ntopwatch/webaccess --daemon -i eth1,eth2 -o -n -p userprolist -s -u ntopwatch -w 192.168.7.1:3000 -M -P /home/ntopwatch/

My userprolist:
FTP=ftp|ftp-data
HTTP=http|www|https|3128
DIFFHTTP=8080|8888
RDP=3389
DNS=name|domain
NBios-IP=netbios-ns|netbios-dgm|netbios-ssn
Mail=pop-2|pop-3|pop3|kpop|smtp|imap|imap2
DHCP-BOOTP=67-68
SNMP=snmp|snmp-trap
NNTP=nntp
SSH=22
Gnutella=6346|6347|6348
Kazaa=1214
WinMX=6699|7730
DirectConnect=0
eDonkey=4661-4665
Messenger=1863|5000|5001|5190-5193

But the box which is running ntop is:
Dual PIII 1.4Ghz with 1GB of RAM.

Michael.

Quoted 52 lines · J. Nerius

Hello,

My concern was for the amount of resources NTOP would end up using with the currently volume of traffic we have going through any one link.

Basically, there will be at least 3000 hosts totaling around 25 megabits of traffic at any given time. In my experience with ntop for short-term monitoring, I found that in these circumstances, the process size and cpu utilization were quite high.

I've been using bandwidthd to collect data and then just rsyncing that data to a different server that actually graphs the data. I'd like to use ntop for it's detailed tracking capabilities, but given the resource utilization issues I've seen in the past, am not sure how feasible this would be.

How many hosts and how much traffic is currently going through your setup? It's very possible that I may just need to tweak settings somewhere to improve performance.

J.N.

Quoted 24 lines · Michael Gale

Hello,

I am not sure I follow ... NTOP takes care of providing the stats, so
if you firewall box or ntop server can handle your network.

The storage box can be what and where ever ... for example you could have a low end box somewhere on the network that makes the http connection, downloads the stats and stores them in a database.

Then you only need a simple method to display them when needed. If you are a large company it might be easier to setup multiple ntop servers and have all the stats stored in a central location.

Michael.

Quoted 9 lines · J. Nerius

How many hosts and how much traffic are you running through it? I've wanted to come up with a solution similar to the one you've described to replace my current bandwidthd setup but I'm thinking that my network may be too large with too much traffic to support something like that without building a monster box just to capture the stats.

J.N.

On Thu, 2005-01-06 at 13:09 -0700, Michael Gale wrote:

Signature · 5 lines
Michael Gale
Lan Administrator
Utilitran Corp.

I make better friends with those who think for them selves
#11 lore raw
In reply to [email protected]

http://bandwidthd.sourceforge.net/

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: Thursday, January 06, 2005 8:28 AM
To: [email protected]
Subject: bandwidth monitoring

Hello

Does somebody know a program for monitoring bandwidth by ip? I have one internet interface and I must monitor many ips adresses on this interface. I tried Ipac-ng and, I worked a lot to do this config but it seems not working this way.

thanx

########################################################
This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.

[email protected]
MailScanner at bandwidthco.com is for your absolute protection.
########################################################

########################################################
This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.

[email protected]
MailScanner at bandwidthco.com is for your absolute protection.
########################################################

#12 lore raw
In reply to [email protected]

I´m acctualy using hotsanic to make this.

http://hotsanic.sourceforge.net/

it have features to monitore other things as well...

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: Thursday, January 06, 2005 2:28 PM
To: [email protected]
Subject: bandwidth monitoring

Hello

Does somebody know a program for monitoring bandwidth by ip? I have one internet interface and I must monitor many ips adresses on this interface. I

tried Ipac-ng and, I worked a lot to do this config but it seems not working

this way.

thanx

#13 lore raw
In reply to [email protected]
Quoted 9 lines · * [email protected] ([email protected]) wrote:

Hello

Does somebody know a program for monitoring bandwidth by ip? I have one internet interface and I must monitor many ips adresses on this interface. I tried Ipac-ng and, I worked a lot to do this config but it seems not working this way.

thanx

Long term bandwidth usage can be tracked using MRTG. (stored data + daemon + http server + web based gui)

Instantaneous bandwidth usage can be tracked using iftop. (ncurses)

Signature · 8 lines
Ranjeet Shetye
Senior Software Engineer
Zultys Technologies
Ranjeet dot Shetye at Zultys dot com
http://www.zultys.com/
 
The views, opinions, and judgements expressed in this message are solely those of
the author. The message contents have not been reviewed or approved by Zultys.
#14 lore raw
Quoted 8 lines · Ranjeet Shetye
Quoted 7 lines · * [email protected] ([email protected]) wrote:

Hello

Does somebody know a program for monitoring bandwidth by ip? I have one internet interface and I must monitor many ips adresses on this interface. I tried Ipac-ng and, I worked a lot to do this config but it seems not working this way.

Quoted 7 lines
Quoted 2 lines

thanx

Long term bandwidth usage can be tracked using MRTG. (stored data + daemon + http server + web based gui)

Instantaneous bandwidth usage can be tracked using iftop. (ncurses)

You can try our bastion-firewall-stats-addon, it's GPL and it uses rrdtool to do the graphical stats. It's very easy to use, but you have to use bastion-firewall to use it.

Another good option it's using something like Cacti to have an interface to Rrdtool. It has scripts to monitor interfaces and can do all kind of graphs.

Regards.

Signature · 12 lines
Jose Maria Lopez Hernandez
Director Tecnico de bgSEC
[email protected]
bgSEC Seguridad y Consultoria de Sistemas Informaticos
http://www.bgsec.com
ESPAÑA

The only people for me are the mad ones -- the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn, burn
like fabulous yellow Roman candles.
                -- Jack Kerouac, "On the Road"
#15 lore raw

monitoring

In reply to Ranjeet Shetye

Hello all,

some question about report program:

1) I use of BandwidthD monitoring program. this program is IP based and shows all trafic throgh text&graphic mode but this program hasn't a good performance. I want a program such as it with good performance.

2) I use MRTG prgram on cache-server . this program shows all traffic but I want a program that shows all traffic that the end-user get from internet & cache separately.

Thanks

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#16 lore raw

Re: monitoring

Try SAWMIL but I think it is commercial

Quoted 16 lines · Alireza Yazdani

Hello all,

some question about report program:

1) I use of BandwidthD monitoring program. this program is IP based and shows all trafic throgh text&graphic mode but this program hasn't a good performance. I want a program such as it with good performance.

2) I use MRTG prgram on cache-server . this program shows all traffic but I want a program that shows all traffic that the end-user get from internet & cache separately.

Thanks

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Signature · 1 line
__ Radien__