Hi Team,
I would like to view the output of command iftop to a file instead of it being displayed on the CLI. The need for this requirement is to monitor bandwidth usage of users. Please let me know if this is possible. Any help will be appreciated.
Thanks and regards, Shannon R
On Mon, Sep 24, 2012 at 04:40:46PM +0530, Shannon Rodrigues wrote:
The need for this requirement is to monitor bandwidth usage of users.
ntop?
On Mon, 24 Sep 2012 06:10:46 -0500, Shannon Rodrigues wrote: | Hi Team, | | I would like to view the output of command iftop to a file instead of it | being displayed on the CLI.
iftop is designed to be a real time view of network traffic. I don't think it's output would make much sense in a file.
Exactly what kind of report do you want to have generated?
Are you wanting to get a list of traffic to and from each address that communicates with your system, broken down by port? Are you wanting it to be divided into time intervals, or are you wanting totals?
You'd have to describe in much greater detail what it is you're wanting to get from a file dump, and it's likely that there are better tools out there already for what you're wanting.. ?
Jon
Hi Jon,
Thank you for your reply. In my typical setup, I want a tool which will display download rates of a particular user/ subnet. I am configuring download limiting rules to user/ subnet but unfortunately have no tool to verify whether the config is working or not.
Manually checking output of iftop is helpful, but I would like to push the output to a file so that I could verify this at the end of the day. Getting it listed by ports is not a necessity. Traffic to and from will solve my purpose. I would like the output of download rate of a user/ subnet to be written to a file for lets say a 5 second interval. Please let me know if there is more information you require from my side. I am a newbie to linux and any input provided by you and the team will be highly appreciated. :) Have a wonderful day ahead.
Thanks and regards, Shannon R
On Mon, Sep 24, 2012 at 6:59 PM, Jonathan Abbey jonabbey@arlut.utexas.eduwrote:
On Mon, 24 Sep 2012 06:10:46 -0500, Shannon Rodrigues wrote: | Hi Team, | | I would like to view the output of command iftop to a file instead of it | being displayed on the CLI.
iftop is designed to be a real time view of network traffic. I don't think it's output would make much sense in a file.
Exactly what kind of report do you want to have generated?
Are you wanting to get a list of traffic to and from each address that communicates with your system, broken down by port? Are you wanting it to be divided into time intervals, or are you wanting totals?
You'd have to describe in much greater detail what it is you're wanting to get from a file dump, and it's likely that there are better tools out there already for what you're wanting.. ?
Jon
--
Jonathan Abbey jonabbey@arlut.utexas.edu Applied Research Laboratories The University of Texas at Austin GPG Key: 71767586 at keyserver pgp.mit.edu, http://www.ganymeta.org/workkey.gpg
On Mon, 24 Sep 2012 10:51:08 -0500, Shannon Rodrigues wrote: | Hi Jon, | | Thank you for your reply. | In my typical setup, I want a tool which will display download rates of a | particular user/ subnet. I am configuring download limiting rules to user/ | subnet but unfortunately have no tool to verify whether the config is | working or not.
iftop doesn't know anything about what user is communicating, it just shows what ports and IP addresses are involved.
| Manually checking output of iftop is helpful, but I would like to push the | output to a file so that I could verify this at the end of the day. Getting | it listed by ports is not a necessity. Traffic to and from will solve my | purpose. | I would like the output of download rate of a user/ subnet to be written to | a file for lets say a 5 second interval.
Couldn't you use netstat (or ss, on more modern Linuxes) for that? Or tcpdump with some after the fact filtering?
iftop's claim to fame is real time curses-style graphing of traffic, there are plenty of tools for doing statistics gathering that would be more suitable for generating reports.
Jon
On 24/09/2012 17:08, Jonathan Abbey wrote:
On Mon, 24 Sep 2012 10:51:08 -0500, Shannon Rodrigues wrote: | Hi Jon, | | Thank you for your reply. | In my typical setup, I want a tool which will display download rates of a | particular user/ subnet. I am configuring download limiting rules to user/ | subnet but unfortunately have no tool to verify whether the config is | working or not.
iftop doesn't know anything about what user is communicating, it just shows what ports and IP addresses are involved.
| Manually checking output of iftop is helpful, but I would like to push the | output to a file so that I could verify this at the end of the day. Getting | it listed by ports is not a necessity. Traffic to and from will solve my | purpose. | I would like the output of download rate of a user/ subnet to be written to | a file for lets say a 5 second interval.
Couldn't you use netstat (or ss, on more modern Linuxes) for that? Or tcpdump with some after the fact filtering?
iftop's claim to fame is real time curses-style graphing of traffic, there are plenty of tools for doing statistics gathering that would be more suitable for generating reports.
I did actually do a bit of work on having iftop dump stats to a file for a particular project that I had.
I don't intend to ever release it, and as Jon says, other tools are almost certainly a better starting point, but if you're particularly interested have a look at iftop-dump in CVS.
Paul
I used bwmng to poll every .5 seconds and record the data in .csv format. The data was then consumed by gnuplot to make a graph.
http://sourceforge.net/projects/bwmng/
andy
On Mon, Sep 24, 2012 at 10:21 AM, Paul Warren pdw@ex-parrot.com wrote:
On 24/09/2012 17:08, Jonathan Abbey wrote:
On Mon, 24 Sep 2012 10:51:08 -0500, Shannon Rodrigues wrote: | Hi Jon, | | Thank you for your reply. | In my typical setup, I want a tool which will display download rates of a | particular user/ subnet. I am configuring download limiting rules to user/ | subnet but unfortunately have no tool to verify whether the config is | working or not.
iftop doesn't know anything about what user is communicating, it just shows what ports and IP addresses are involved.
| Manually checking output of iftop is helpful, but I would like to push the | output to a file so that I could verify this at the end of the day. Getting | it listed by ports is not a necessity. Traffic to and from will solve my | purpose. | I would like the output of download rate of a user/ subnet to be written to | a file for lets say a 5 second interval.
Couldn't you use netstat (or ss, on more modern Linuxes) for that? Or tcpdump with some after the fact filtering?
iftop's claim to fame is real time curses-style graphing of traffic, there are plenty of tools for doing statistics gathering that would be more suitable for generating reports.
I did actually do a bit of work on having iftop dump stats to a file for a particular project that I had.
I don't intend to ever release it, and as Jon says, other tools are almost certainly a better starting point, but if you're particularly interested have a look at iftop-dump in CVS.
Paul
______________________________**_________________ iftop-users mailing list iftop-users@lists.beasts.org http://lists.beasts.org/**mailman/listinfo/iftop-usershttp://lists.beasts.org/mailman/listinfo/iftop-users
Hi Jon,
Thank you for your reply. There seems to be some mis-understanding here. I am looking for a tool wherein I can view download speeds of a particular user/ subnet. iftop does provide me that but writing the output to a file is almost difficult to understand.
My requirement is not to know what the users are communicating. Just the total download speed is what I am looking for, but for a particular user/ subnet. vmstat gives me the WAN link download speed, but it does not solve my purpose.
Thanks and regards, Shannon R
On Mon, Sep 24, 2012 at 9:38 PM, Jonathan Abbey jonabbey@arlut.utexas.eduwrote:
On Mon, 24 Sep 2012 10:51:08 -0500, Shannon Rodrigues wrote: | Hi Jon, | | Thank you for your reply. | In my typical setup, I want a tool which will display download rates of a | particular user/ subnet. I am configuring download limiting rules to user/ | subnet but unfortunately have no tool to verify whether the config is | working or not.
iftop doesn't know anything about what user is communicating, it just shows what ports and IP addresses are involved.
| Manually checking output of iftop is helpful, but I would like to push the | output to a file so that I could verify this at the end of the day. Getting | it listed by ports is not a necessity. Traffic to and from will solve my | purpose. | I would like the output of download rate of a user/ subnet to be written to | a file for lets say a 5 second interval.
Couldn't you use netstat (or ss, on more modern Linuxes) for that? Or tcpdump with some after the fact filtering?
iftop's claim to fame is real time curses-style graphing of traffic, there are plenty of tools for doing statistics gathering that would be more suitable for generating reports.
Jon
--
Jonathan Abbey jonabbey@arlut.utexas.edu Applied Research Laboratories The University of Texas at Austin GPG Key: 71767586 at keyserver pgp.mit.edu, http://www.ganymeta.org/workkey.gpg
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I think you'd misunderstood -- he was saying that iftop doesn't allow you to distinguish which user is connecting, which is true. Though presumably what you meant is "which IP," which in many cases is good enough.
On 09/25/2012 02:20 AM, Shannon Rodrigues wrote:
Hi Jon,
Thank you for your reply. There seems to be some mis-understanding here. I am looking for a tool wherein I can view download speeds of a particular user/ subnet. iftop does provide me that but writing the output to a file is almost difficult to understand.
My requirement is not to know what the users are communicating. Just the total download speed is what I am looking for, but for a particular user/ subnet. vmstat gives me the WAN link download speed, but it does not solve my purpose.
Thanks and regards, Shannon R
On Mon, Sep 24, 2012 at 9:38 PM, Jonathan Abbey <jonabbey@arlut.utexas.edu mailto:jonabbey@arlut.utexas.edu> wrote:
On Mon, 24 Sep 2012 10:51:08 -0500, Shannon Rodrigues wrote: | Hi Jon, | | Thank you for your reply. | In my typical setup, I want a tool which will display download rates of a | particular user/ subnet. I am configuring download limiting rules to user/ | subnet but unfortunately have no tool to verify whether the config is | working or not.
iftop doesn't know anything about what user is communicating, it just shows what ports and IP addresses are involved.
| Manually checking output of iftop is helpful, but I would like to push the | output to a file so that I could verify this at the end of the day. Getting | it listed by ports is not a necessity. Traffic to and from will solve my | purpose. | I would like the output of download rate of a user/ subnet to be written to | a file for lets say a 5 second interval.
Couldn't you use netstat (or ss, on more modern Linuxes) for that? Or tcpdump with some after the fact filtering?
iftop's claim to fame is real time curses-style graphing of traffic, there are plenty of tools for doing statistics gathering that would be more suitable for generating reports.
Jon
--
Jonathan Abbey
jonabbey@arlut.utexas.edu mailto:jonabbey@arlut.utexas.edu Applied Research Laboratories The University of Texas at Austin GPG Key: 71767586 at keyserver pgp.mit.edu http://pgp.mit.edu, http://www.ganymeta.org/workkey.gpg
- -- - ---- _ _ _ _ ___ _ _ _ |Y#| | | |/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | | _| |novosirj@umdnj.edu - 973/972.0922 (2-0922) __/ Univ. of Med. and Dent.|IST/EI-Academic Svcs. - ADMC 450, Newark