Jump to content

shinyb

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

388 profile views

shinyb's Achievements

Newbie

Newbie (1/14)

  1. Thanks for your responses guys, too bad nc "-z" option is not available in my centos 7; it fails with nc: invalid option -- 'z' I guess I'll have to stick with some other tool.
  2. The script should read from a file the list of hosts and ports to check. Example: server-1.dev.internal:443 server-2.prod.internal:25 For each line, the script should check TCP network connectivity between the server it's running on and that host:port combination and, in case it fails, find out the reason. Possible results for a check: - Success. - DNS record does not exist. (cannot resolve hostname) - Service not running (remote host is not listening on that port) - Connection rejected (remote host is listening on that port but network connection is rejected) - Timeout (remote host is listening on that port but network connection is timing out) Script's output will consist on a list of checks, results and the time it took for each one of them. Example: server-1.dev.internal:443 | Success | 3.4s server-2.prod.internal:25 | Service not running | 0.2s Note: Script is expecting a text file and is executed as: ./script_name <path-to-file>
×
×
  • Create New...