I recently need to check if a particular application is online and listening on a particular set of ports. I figured that the best way to do this was to periodically issue some socket connects onto those ports. If I got an exception, then clearly there would be an issue.

This was all running on a CentOS Linux machine, so I opted for a Python script, have a look at my sample below

Share