[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: host status

[Administrative note:  We've been having some problems on one of our hosts
that mails out the SLUG mail.  Until we get it figured out, it may delay
SLUG mail.]

    Date: Mon, 12 Nov 90 13:36:08 PST
    From: bruno@oz.geology.washington.edu (Steve Willis)

      I'm trying to find a hopefully portable way to determine if some specified
    host is accessable on the net (say for ftp).  Something similar to:
      (host-up "warbucks") ==> t if host is accessable, nil if not.
      There is a (chaos:host-up host) function, but it only works for stuff on
    the chaos net. Is there a logical equivalent for all known nets??

1.  A host might be up/down for Chaos, for IP, and/or for DECNET, all 

2.  Within each of those, the host may be up or down for each service.
Within IP (TCP, ICMP, ...), it may be up for SMTP (mail) but down for FTP.

3.  If what you want to know is whether the host is actually running, and
you know the host is running IP, then you probably can best test it with
something like (TCP:SEND-ICMP-ECHO (NET:PARSE-HOST "<host-name>")
				:TIMEOUT (* 10 60))   ; 10 seconds, I think
(I think all Internet hosts are supposed to do the echo but maybe some don't.)

4.  If what you really want is to know if you can make, say, a file connection
to it, then you should probably try to make the file connection and just wrap
a CONDITION-CASE around it like so:
	  (ERROR <handle the error ERR yourself>))

You could specialize on the ERROR to handle different types of errors
differently.  However, there are all sorts of errors that could occur that
you probably wouldn't think about so you should probably have an ERROR clause.