Posted on 2012-08-10
Last Modified: 2012-10-14
Hi guys.

I hope you can help me with this one.
I need to monitor some services. For example I need to check if a SMTP service is up. Can I just send a telnet command like:

"Telnet 25" and If I get a response then it Is up.

A need a kind of method to send data to a URL/IP on a specific port number and send a command/data and retrieve an answer and based on the answer I do some logic(I can do this part fine).
Question by:databoks
    LVL 1

    Accepted Solution

    yes, you can simply try a telnet connect to a tcp port to monitor TCP services like SMTP, IMAP, POP3 e.g., if you receive any response the service is up and listening.

    in most cases this is enough to monitor services, the huge effort to send/receive data only helps in a minority of failures and even then it is propably not accurate.

    i suggest monitoring the listening state of the TCP services with a simple telnet command.
    LVL 8

    Author Comment

    Thank you.

    So the telnet and so forth is fine. What about a Exchange server that doesn't use POP3 but recieves emails directly? How do I handle this one?
    LVL 13

    Expert Comment

    Why don't you integrate a monitoringserver? (You can install this even on your own pc). Easy to view what is running and what not. Sends messages that a particular service is down. An example of an easy to set up, scalable monitoringtool is Cacti.
    LVL 8

    Author Comment

    Well i need to have this running all the time and it has to be done remotely. Also I want the program to send a SMS when problem occurres
    LVL 1

    Assisted Solution

    there are monitoring solutions that provide all this but maybe in your specific case it is the best solution to develop it on your own, it depends on your needs.

    to monitor the exchange server you would monitor the SMTP (TCP:25) port on your hub transport server.
    LVL 8

    Author Comment

    I will get back after some tests.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now