LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-08-2010, 12:42 PM   #1
dsollen
Member
 
Registered: Jun 2009
Posts: 56

Rep: Reputation: 15
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.
 
Old 12-08-2010, 03:22 PM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
tcpdump can do this for you. You can't specify a program, but you can watch a specific port.

I think netstat would be a sufficient tool.
 
Old 12-09-2010, 08:02 AM   #3
dsollen
Member
 
Registered: Jun 2009
Posts: 56

Original Poster
Rep: Reputation: 15
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.
 
Old 12-09-2010, 08:12 AM   #4
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bandwidth Monitoring Tools omgwtfbbqhax Linux - Networking 5 06-01-2010 10:46 PM
LXer: Network Bandwidth Monitoring Tools LXer Syndicated Linux News 0 12-21-2006 12:33 PM
network monitoring tools bandwidth beepee Linux - Networking 2 11-03-2006 06:13 AM
LXer: Opensource Bandwidth, Network and Servers Monitoring tools with Tutorials LXer Syndicated Linux News 1 08-23-2006 02:53 PM
Network Monitoring/Usage tools? rohang Linux - Networking 2 03-12-2004 06:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration