From: gartmann@immunbio.mpg.de Sent: Friday, March 23, 2001 4:07 AM To: Info-VAX@Mvb.Saic.Com Subject: Re: Alpha or Vax has to check if a Sun server is still alive HOW In article <99dv5j$9g5$1@news1.xs4all.nl>, "anonymous" writes: >I need to check every hour if a Sun station is still up and running. >And if not than the DCL procedure should page or sms or something like that. >But how do I start, > >Should I try a ping every hour, or and rsh command or an rlogin command. >Has anyone done this before, and if so can you email me what you have done. >I think it is not that difficult but I dont know where to start, We do something similar here. We use "ping" to check whether certain computers are up. And then a while ago I posted my program to control a voice-modem (http://www.immunbio.mpg.de/groups/gartmann/phone.zip) . Here we do (I stripped off some stuff): $ ! $ ASSIGN "LTA6:" phdev $ ! $ SET NOON ! because of unsuccessfull PING $ dphone == "$mpi_exe:phone_message" $label1: $ MULTINET PING my_host /QUIET/DATA=4/NUM=1 $ IF .NOT. $status $ THEN $ now = F$TIME() $ dnow = F$CVTIME( now, "COMPARISON", "DATETIME") $ dday = F$CVTIME( now, , "WEEKDAY") $ dstart = F$CVTIME("09:00:00", "COMPARISON", "DATETIME") $ dstop = F$CVTIME("18:00:00", "COMPARISON", "DATETIME") $ IF dnow .GTS. dstart .AND. dnow .LTS. dstop .AND. dday .NES. "Sunday" - .AND. dday .NES. "Saturday" $ THEN $ dphone diskb:[prg.mpi.data]prt39.vox 6 123 456 1234567 $ ELSE $ dphone diskb:[prg.mpi.data]prt39.vox 6 321 654 7654321 989898 $ ENDIF $ EXIT $ ENDIF $ WAIT 00:00:10.00 $ GOTO label1 $ EXIT Regards, Christoph Gartmann -- --------------------------------------------------------------------+ | Max-Planck-Institut fuer Phone : +49-761-5108-464 Fax: -452 | | Immunbiologie | | Postfach 1169 Internet: gartmann@immunbio.mpg.de | | D-79011 Freiburg, FRG | +--------- http://www.immunbio.mpg.de/home/english/menue.html ---------+