From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,dbf78634d45eeb45,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1991-08-07 16:18:19 PST Path: gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!samsung!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!cmcl2!acf3!tihor From: tihor@acf3.NYU.EDU (Stephen Tihor) Newsgroups: comp.sys.dec Subject: Re: UPS advice, and how to do a remote shutdown (shutdown from C)? Message-ID: <23030005@acf3.NYU.EDU> Date: 7 Aug 91 18:14:00 GMT References: <1991Aug7.160101.23503@athena.mit.edu> Sender: notes@cmcl2.nyu.edu (Notes Person) Organization: New York University Nntp-Posting-Host: acf3.nyu.edu To shutdown a VMS system you will want to run a detached process since the shutdown code, by its nature, can not be ru8n successfully from say a batch job. You want something like the two examples below from our network triggered over temperature shutdown system. $!----------------------------------------------------------- $ SET NOON ! run detached shutdown process $ STOP SHUTDOWN $ RUN/UIC=SYSTEM/INPUT=CLUSTER$MANAGER:DET_SHUTDOWN.COM- /PROCESS_NAME="SHUTDOWN" - /OUTPUT=SYS$MANAGER:DET_SHUTDOWN.LOG SYS$SYSTEM:LOGINOUT $!----------------------------------------------------------- $ set noverify ! Detached shutdown procedure $ set noon $ request/to=central "Starting detached shutdown" $ ! Time reasons spindowndisks sitespecific backup autoreboot $ ! remove_node,reboot $ if p1 .eqs. "" then p1 = F$STRING(120) $ reason = "Temperature exceeds safe level in machine room" $ minutes = F$INTEGER(p1) $ define shutdown$inform_nodes 'F$GETSYI("SCSNODE")' $ @sys$system:shutdown 'minutes' "''reason'" NO YES "within half an hour" - YES "REMOVE_NODE,REBOOT_CHECK" ! YES "CLUSTER,REBOOT_CHECK" $ request/to=central "Detached shutdown aborted?"