Wednesday, December 23, 2009

TCP Monitoring

TCP Monitoring

Network programming may be direct low level TCP communication or high level like RMI, HTTP, Web services, and etc., we may need to debug the message what and how it delivers in TCP layer. This will help us to debug and dig to chase the right tail. Sometime, we may see data incorrectly in receiving end due to network issues and we will start correcting our implementaion in server and client.

tcpmon is an open-source utility to Monitor A TCP Connection. In which, we can see the TCP layer data goes out of the box and also the response comes from the server. I have started using this tool to understand the structure of the SOAP message and HTTP headers. Specifically while going with encryption like MTOM/XOP, this tool helped lot.

If you want to count or see the content get transmitted while using browser to connect web application also, this tool helps lot.

We have to place this tool in between the server and client. For instance, I have to connect to application http://www.javafundu.com:7001/checkTCP. Here are the steps


  1. Double click the downloaded tcpmon.jar from tcpmon.dev.java.net
    or run command java -jar tcpmon.jar

  2. In Create a New TCP Monitor connection, set Local port=8080, Server Name=javafundu.com, and Server Port=7001

  3. Click on Add Monitor. Now TCP monitoring started

  4. Start the browser, and type the URL as http://localhost:8080/checkTCP

  5. Now Request from browser and response of the same also captured in TCPMon and get displayed.




Reactions:

0 comments:

Post a Comment

Recent Posts

Unix Commands | List all My Posts

Texts

This blog intended to share the knowledge and contribute to JAVA Community such a way that by providing samples and pointing right documents/webpages. We try to give our knowledege level best and no guarantee can be claimed on truth. Copyright and Terms of Policy refer blogspot.com

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More