From philippe at faure.ca Sun Nov 22 14:35:57 2015 From: philippe at faure.ca (philippe at faure.ca) Date: Sun, 22 Nov 2015 09:35:57 -0500 Subject: [Iftop-users] Simple text output Message-ID: <20151122143557.6246486.30079.28042@faure.ca> An HTML attachment was scrubbed... URL: From fred at fperrin.net Sun Nov 22 20:05:17 2015 From: fred at fperrin.net (=?UTF-8?B?RnLDqWTDqXJpYyBQZXJyaW4=?=) Date: Sun, 22 Nov 2015 20:05:17 +0000 Subject: [Iftop-users] Simple text output In-Reply-To: <20151122143557.6246486.30079.28042@faure.ca> References: <20151122143557.6246486.30079.28042@faure.ca> Message-ID: <56521FFD.3090809@fperrin.net> Hello Philippe, On 22/11/2015 14:35, philippe at faure.ca wrote: > Hello, > > I am looking to find a way to record data usage from a specific device > on my network. Ideally the out out would be a text file with the total > usage. Is there a way to have iftop run in the background and have it > update a file. Does the -t option to iftop do what you want? You would redirect the output to a log file or pipe it to a script. > If not, is there another utility that people know about the might be > able to help me? Another solution if you're trying to do traffic accounting is something like net-acct. On a students' network, we used to log something like (timestamp, source IP & port, destination IP & port, volume), and then use this to hunt bandwidth hogs. Cheers, Fred. From apo at gambaru.de Sun Nov 22 20:42:02 2015 From: apo at gambaru.de (Markus Koschany) Date: Sun, 22 Nov 2015 21:42:02 +0100 Subject: [Iftop-users] Simple text output In-Reply-To: <20151122143557.6246486.30079.28042@faure.ca> References: <20151122143557.6246486.30079.28042@faure.ca> Message-ID: <5652289A.2050309@gambaru.de> Am 22.11.2015 um 15:35 schrieb philippe at faure.ca: > > Hello, > > I am looking to find a way to record data usage from a specific device > on my network. Ideally the out out would be a text file with the total > usage. Is there a way to have iftop run in the background and have it > update a file. > > If not, is there another utility that people know about the might be > able to help me? there is also vnstat which logs accumulated traffic even on multiple interfaces. http://humdi.net/vnstat/ Regards, Markus -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 949 bytes Desc: OpenPGP digital signature URL: From philippe at faure.ca Sun Nov 22 23:55:01 2015 From: philippe at faure.ca (Philippe Faure) Date: Sun, 22 Nov 2015 18:55:01 -0500 Subject: [Iftop-users] Simple text output In-Reply-To: <5652289A.2050309@gambaru.de> References: <20151122143557.6246486.30079.28042@faure.ca> <5652289A.2050309@gambaru.de> Message-ID: <20151122185501.Horde.WQK4XoxBidK-zFe_StFuOw1@mail.faure.ca> Thank you for your suggestion, Unfortunately, vnstat doesn't have the provision (or at least I couldn't find it) to be able to limit the logging to 1 device. I am running iftop on a server and want to monitor 1 device on the network. Philippe Quoting Markus Koschany : > Am 22.11.2015 um 15:35 schrieb philippe at faure.ca: >> >> Hello, >> >> I am looking to find a way to record data usage from a specific device >> on my network. Ideally the out out would be a text file with the total >> usage. Is there a way to have iftop run in the background and have it >> update a file. >> >> If not, is there another utility that people know about the might be >> able to help me? > > there is also vnstat which logs accumulated traffic even on multiple > interfaces. > > http://humdi.net/vnstat/ > > Regards, > > Markus From philippe at faure.ca Mon Nov 23 01:49:39 2015 From: philippe at faure.ca (Philippe Faure) Date: Sun, 22 Nov 2015 20:49:39 -0500 Subject: [Iftop-users] Simple text output In-Reply-To: <56521FFD.3090809@fperrin.net> References: <20151122143557.6246486.30079.28042@faure.ca> <56521FFD.3090809@fperrin.net> Message-ID: <20151122204939.Horde.ka0mJYjAEVqrOcA5SUvTvQ1@mail.faure.ca> Hello Fr?d?ric, I had a look at iftop and the -t option doesn't exist. Well at least in the version that I have installed. I am running Ubuntu 14.04 LTS. Which is limited to iftop 1.0~pre2.5. Once I have first figured out how to update to the newer version of iftop without changing from the current LTS configuration, I will give the "-t" option a try. Thank you Philippe Quoting Fr?d?ric Perrin : > Hello Philippe, > > On 22/11/2015 14:35, philippe at faure.ca wrote: >> Hello, >> >> I am looking to find a way to record data usage from a specific device >> on my network. Ideally the out out would be a text file with the total >> usage. Is there a way to have iftop run in the background and have it >> update a file. > > Does the -t option to iftop do what you want? You would redirect the > output to a log file or pipe it to a script. > >> If not, is there another utility that people know about the might be >> able to help me? > > Another solution if you're trying to do traffic accounting is > something like net-acct. On a students' network, we used to log > something like > (timestamp, source IP & port, destination IP & port, volume), and then > use this to hunt bandwidth hogs. > > Cheers, > Fred. From andywolin at gmail.com Mon Nov 23 05:26:22 2015 From: andywolin at gmail.com (Andy Wolin) Date: Sun, 22 Nov 2015 22:26:22 -0700 Subject: [Iftop-users] Simple text output In-Reply-To: <20151122204939.Horde.ka0mJYjAEVqrOcA5SUvTvQ1@mail.faure.ca> References: <20151122143557.6246486.30079.28042@faure.ca> <56521FFD.3090809@fperrin.net> <20151122204939.Horde.ka0mJYjAEVqrOcA5SUvTvQ1@mail.faure.ca> Message-ID: Also take a look at 'bandwidth monitor next generation'. It is a similar command line tool that can log to a file or stdout. I used it to make plots of large downloads to benchmark various wireless router configurations. https://www.gropp.org/?id=projects&sub=bwm-ng Thanks, Andy On Sun, Nov 22, 2015 at 6:49 PM, Philippe Faure wrote: > Hello Fr?d?ric, > > I had a look at iftop and the -t option doesn't exist. Well at least in > the version that I have installed. > > I am running Ubuntu 14.04 LTS. Which is limited to iftop 1.0~pre2.5. > > Once I have first figured out how to update to the newer version of iftop > without changing from the current LTS configuration, I will give the "-t" > option a try. > > Thank you > > Philippe > > > > > > Quoting Fr?d?ric Perrin : > > Hello Philippe, >> >> On 22/11/2015 14:35, philippe at faure.ca wrote: >> >>> Hello, >>> >>> I am looking to find a way to record data usage from a specific device >>> on my network. Ideally the out out would be a text file with the total >>> usage. Is there a way to have iftop run in the background and have it >>> update a file. >>> >> >> Does the -t option to iftop do what you want? You would redirect the >> output to a log file or pipe it to a script. >> >> If not, is there another utility that people know about the might be >>> able to help me? >>> >> >> Another solution if you're trying to do traffic accounting is something >> like net-acct. On a students' network, we used to log something like >> (timestamp, source IP & port, destination IP & port, volume), and then >> use this to hunt bandwidth hogs. >> >> Cheers, >> Fred. >> > > > > > _______________________________________________ > iftop-users mailing list > iftop-users at lists.beasts.org > http://lists.beasts.org/mailman/listinfo/iftop-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fred at fperrin.net Mon Nov 23 16:50:32 2015 From: fred at fperrin.net (=?utf-8?Q?Fr=C3=A9d=C3=A9ric_Perrin?=) Date: Mon, 23 Nov 2015 16:50:32 +0000 Subject: [Iftop-users] Simple text output In-Reply-To: <20151122204939.Horde.ka0mJYjAEVqrOcA5SUvTvQ1@mail.faure.ca> (Philippe Faure's message of "Sun, 22 Nov 2015 20:49:39 -0500") References: <20151122143557.6246486.30079.28042@faure.ca> <56521FFD.3090809@fperrin.net> <20151122204939.Horde.ka0mJYjAEVqrOcA5SUvTvQ1@mail.faure.ca> Message-ID: <86oaekpsmf.fsf@antre.fperrin.net> Le lundi 23 ? 1:49, Philippe Faure a ?crit : > Hello Fr?d?ric, > > I had a look at iftop and the -t option doesn't exist. Well at least > in the version that I have installed. > > I am running Ubuntu 14.04 LTS. Which is limited to iftop 1.0~pre2.5. Looking at history, indeed the -t option was added sometimes between 1.0pre2 and 1.0pre4. You'll have to install a newer version. Debian has a 1.0pre4 package, so it would be a matter of recompiling under Ubuntu. I think if you need scripting, one of the package dedicated to traffic accounting might be better suited, that will be more robust than iftop. > Once I have first figured out how to update to the newer version of > iftop without changing from the current LTS configuration, I will give > the "-t" option a try. From philippe at faure.ca Wed Nov 25 23:47:38 2015 From: philippe at faure.ca (Philippe Faure) Date: Wed, 25 Nov 2015 18:47:38 -0500 Subject: [Iftop-users] Simple text output In-Reply-To: <86oaekpsmf.fsf@antre.fperrin.net> References: <20151122143557.6246486.30079.28042@faure.ca> <56521FFD.3090809@fperrin.net> <20151122204939.Horde.ka0mJYjAEVqrOcA5SUvTvQ1@mail.faure.ca> <86oaekpsmf.fsf@antre.fperrin.net> Message-ID: <20151125184738.Horde.Uos0BFd-jPzX49Elq6UE2A6@mail.faure.ca> I did manage to get it to work. There will be some scripting invovled. The issue that I have come across is that most traffic accounting packages that I have found seem to look at all data through an interface, and don't allow the user to limit the information to a single IP address. I will keep looking though. Thank you Philippe Quoting Fr?d?ric Perrin : > Le lundi 23 ? 1:49, Philippe Faure a ?crit : >> Hello Fr?d?ric, >> >> I had a look at iftop and the -t option doesn't exist. Well at least >> in the version that I have installed. >> >> I am running Ubuntu 14.04 LTS. Which is limited to iftop 1.0~pre2.5. > > Looking at history, indeed the -t option was added sometimes between > 1.0pre2 and 1.0pre4. You'll have to install a newer version. Debian has > a 1.0pre4 package, so it would be a matter of recompiling under Ubuntu. > > I think if you need scripting, one of the package dedicated to traffic > accounting might be better suited, that will be more robust than iftop. > >> Once I have first figured out how to update to the newer version of >> iftop without changing from the current LTS configuration, I will give >> the "-t" option a try.