tools for monitoring network bandwidth usage of program/port?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
tools for monitoring network bandwidth usage of program/port?
I have a third party program (tightvnc) which I want to monitor and detect if it loses a connection with a client. I don't care if the client has the program open but isn't doing anything with it, I only want to know if the actual TCP connection is lost.
Since TCP takes forever to die on it's own I was thinking the best way to detect if a connection is lost is by bandwidth the bandwidth on the tcp port allocated to the VNC connection. Are there any tools built in to redhat (RHEL 5.2) which I could use to do this? Since I don't have full control of the operating system I would prefer to use built in tools rather then trying to get a new tool installed.
I'll look into Tcpdump. As soon as I can get to my linux computer I'll check to see if it comes by default on RHEL.
I had thought of netstat, but I looked through the man page and couldn't find an argument to get a data on the bandwidth used by each program. This seems like something netstat should have, so it's possible I'm just blind and missed it somehow. If you can tell me what arguments I should be using with netstat I would be happy to use it.
netstat will not show the bandwidth for each port, but it will show what ports are connected and the status. Once a socket drops the connection, the port should go to the TIME_WAIT state, and netstat will show this.
tcpdump won't necessary show the bandwidth, but the raw data going across the line. You can capture that and extrapolate your own metrics.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.