Monitoring TCP/IP Socket Listener

Discussions

General J2EE: Monitoring TCP/IP Socket Listener

  1. Monitoring TCP/IP Socket Listener (4 messages)

    Hi,

    I have a small java application which creates a server socket and listens on a particular port. (A Multi threaded socket listener program).
    I want to monitor this listener, whether it is listening or failed, once it is stops listening, i need to send a alert to the console.

    What is the best approach for this scenario?

    Regards,
    Jeyakumar C.K

    Threaded Messages (4)

  2. Monitoring TCP/IP Socket Listener[ Go to top ]

    Hi,I have a small java application which creates a server socket and listens on a particular port. (A Multi threaded socket listener program). I want to monitor this listener, whether it is listening or failed, once it is stops listening, i need to send a alert to the console.What is the best approach for this scenario?Regards,Jeyakumar C.K

    Create a Thread which actually tries to poll the application at regular intervals, and if it fails to establish sucessfull connect, alert the console..!
  3. Monitoring TCP/IP Socket Listener[ Go to top ]

    Create a Thread which actually tries to poll the application at regular intervals, and if it fails to establish sucessfull connect, alert the console..!
    .

    Polling in the sense...?
    Can you please give me some more detail in the technical side of polling.

    Regards,
  4. Monitoring TCP/IP Socket Listener[ Go to top ]

    Create a Thread which actually tries to poll the application at regular intervals, and if it fails to establish sucessfull connect, alert the console..!
    .Polling in the sense...? Can you please give me some more detail in the technical side of polling.Regards,

    By 'polling', he simply means trying to make a TCP connection to the server.

    This could be extended to seeing if your server actually responds to a your request with some valid data (ie. the TCP connection is up and your application is running), or even extend the protocol to allow the server to return detailed system status information in response to a 'STATUS'-type message.

    HTH
    Kit
  5. Monitoring TCP/IP Socket Listener[ Go to top ]

    Hi Jeyakumar;

    You can create a Thread, which runs 24*7 and tries to connect to your server (Via TCP) at regular intervals (say every 5 minutes), and you can check whether your server application is up and running by determining the result from each connect attempt and alert accordingly.

    Regards;
    Jyothish