[ale] lightweight testing for remote services

Keith Hopkins hne at hopnet.net
Fri Mar 21 08:47:17 EST 2003


Hi folks,

  Anyone know a lightweight way to test if a service (dns,http,ssh,insert-your-favorite-protocol-here) is being serviced on a remote server?

  Currently, I have something like this in a shell script as...

#!/bin/bash
REMOTE=10.0.0.1
PORT=53
PORTNAME=domain
while true
do
  nmap -p $PORT $REMOTE | grep $PORTNAME
  if [ ! $? = 0 ]; then
    # Do something important
  fi
  sleep 5
done

  This works, but each time nmap/grep runs, it chews more CPU than I want to give to this process.  Anyone know a "lighter" way?

-- 
Lost in Tokyo,
  Keith


_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale






More information about the Ale mailing list