View previous topic :: View next topic |
Author |
Message |
ksool Guru
Joined: 27 May 2006 Posts: 337 Location: Cambridge, MA
|
Posted: Sun Aug 27, 2006 11:07 pm Post subject: Command line connection monitor |
|
|
I'm trying to setup a little addon to conky that will show some stats about a given connection, i.e up rate, down rate, up total, down total.
Is there any command like program that can do this? Put in maybe the hosts and ports, and it gives out in simple text any of these stats?
Thanks. |
|
Back to top |
|
|
needles n00b
Joined: 27 Feb 2003 Posts: 31 Location: Downingtown, Pennsylvania - USA
|
Posted: Tue Aug 29, 2006 7:24 pm Post subject: |
|
|
ifconfig will do it for the local host.
Code: |
needles@metroid ~ $ /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:12:3F:56:DC:F4
inet addr:10.10.10.103 Bcast:10.10.0.255 Mask:255.255.0.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1692008 errors:0 dropped:0 overruns:0 frame:0
TX packets:941987 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:694220118 (662.0 Mb) TX bytes:910833569 (868.6 Mb)
Interrupt:16
|
So that gives you totals. As for rate information, I don't know if a command line tool that will monitor that sort of thing. It would be kind of annoying, as you would need to keep a terminal open with just the information anyway.
If you want something to give you this kind of information that you can watch in real time, look for some sort of GUI system monitoring applicaiton, like gkrellem, or any of the system monitor utils that come with desktop envirnments. (I use WindowMaker, and run wmnet for just such a purpose.)
As for stuff running on other hosts, and in particular, having specific services running on particular ports, you need a much more sophisticated solution for that. I would look at something like Hobbit.
http://hobbitmon.sourceforge.net/
Honestly, I think you really need to spend some time thinking about what your requirements really are, and I'm sure there's something out there than can fit the bill. |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Wed Aug 30, 2006 10:53 am Post subject: |
|
|
iptraf, bwmon, ntop, iptables with some voodoo. _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
|
Aeros n00b
Joined: 27 Aug 2006 Posts: 19 Location: Cape Town, South Africa
|
Posted: Wed Aug 30, 2006 1:58 pm Post subject: |
|
|
Yea, as I mentioned in my other post, I'm also looking for something like this. The difference is, I want mine to echo out a snapshot of the total up/downstreams per day, which I can then save and mail to admins.
You mentioned iptables twice now - how? I've studied iptables syntax again and can't figure out how to actually get it to output traffic use per day. |
|
Back to top |
|
|
Aeros n00b
Joined: 27 Aug 2006 Posts: 19 Location: Cape Town, South Africa
|
Posted: Thu Aug 31, 2006 7:07 am Post subject: |
|
|
By the way, to answer your question:
vnstat is a very nice util for bandwidth monitoring, per day/week/month etc.
Also,
http://martybugs.net/linux/ipac.cgi
Also seems quite powerful. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|