[comp.os.vms] Wollongong WIN/TCP Problem: No automated procedure to stop the process

tran@versatc.UUCP (Tony Tran) (08/03/88)

Under Wollongong Win/TCP V3.0 or 3.2, there is no command procedure or program
to stop the Wollongong software. According to katie@twg.com (Wollongong Tech
Support), you have to do something like:

	1. ifconfig ep0 down
	2. Do a "show system", and issue the command: "stop/id=xxx" where xxx
	   are the process id of enet <-> inet and INET_SERVERS processes
	3. Kill any ftp users processes

Has anybody developed any command procedure that automatically stops the Wollongong
software, something like stopinet.com ?

I have defined a symbol that orderly shuts down the VAX, but can't seem to
incorporate the above features, and as a result, doesnot *cleanly* shutdown
the VAX (when I forget to do the 3 items above manually).

Tony Tran

-- 
UUCP: {pyramid|ubvax!vsi1}!versatc!tran     Tony Tran
Versatec, 2805 Bowers Avenue, Santa Clara, Calif 95051 (408)982-4317

iglesias@orion.cf.uci.edu (Mike Iglesias) (08/04/88)

In article <292@versatc.UUCP> tran@versatc.UUCP (Tony Tran) writes:
>Under Wollongong Win/TCP V3.0 or 3.2, there is no command procedure or program
>to stop the Wollongong software. According to katie@twg.com (Wollongong Tech
>Support), you have to do something like:
>
>	1. ifconfig ep0 down
>	2. Do a "show system", and issue the command: "stop/id=xxx" where xxx
>	   are the process id of enet <-> inet and INET_SERVERS processes
>	3. Kill any ftp users processes
>
>Has anybody developed any command procedure that automatically stops the Wollongong
>software, something like stopinet.com ?
>
>I have defined a symbol that orderly shuts down the VAX, but can't seem to
>incorporate the above features, and as a result, doesnot *cleanly* shutdown
>the VAX (when I forget to do the 3 items above manually).

In the year or two I've been running WIN/TCP, I've never had to do anything
special to shutdown WIN/TCP when shutting down the VAX.  I've used
WIN/TCP v2.3 thru v3.2 and several versions of VMS.  Just do whatever
you need to do and run SYS$SYSTEM:SHUTDOWN.COM.  If you want to be
somewhat orderly, ifconfig ep0 down.  After all, you're going to shut
the system down, so who cares if enet <-> inet and INET_SERVERS is
still running?  You can can always write a DCL command script or
program to find enet <-> inet and INET_SERVERS and kill them off,
but it sounds like a waste of programmer time to me.


Mike Iglesias
University of California, Irvine

carl@CITHEX.CALTECH.EDU (Carl J Lydick) (08/08/88)

 > Under Wollongong Win/TCP V3.0 or 3.2, there is no command procedure or
 > program to stop the Wollongong software. According to katie@twg.com
 > (Wollongong Tech Support), you have to do something like: 
 > 
 > 	1. ifconfig ep0 down
 > 	2. Do a "show system", and issue the command: "stop/id=xxx" where xxx
 > 	   are the process id of enet <-> inet and INET_SERVERS processes
 > 	3. Kill any ftp users processes
 >                     
 > Has anybody developed any command procedure that automatically stops the
 > Wollongong software, something like stopinet.com ? 

No, I haven't, but it's easy to do.

 > I have defined a symbol that orderly shuts down the VAX, but can't seem to
 > incorporate the above features, and as a result, does not *cleanly* shutdown
 > the VAX (when I forget to do the 3 items above manually). 

The following does more or less what you want.  Since I don't know how the
ifconfig command is defined, and am not sure about the process names and/or
images run by the various processes, you'll have to make a few changes to
get it to work.  After fixing it to work for you, insert a record into
SYS$MANAGER:SYSHUTDWN.COM that executes it.  I've assumed that you have to
delete the processes in step 2 before you delete those in step 3.  If not,
you can combine the two loops.  Please let me know if this helps.

$	SET NOON
$	SET COMMAND WINTCP:IFCONFIG	!This probably needs changing
$	IFCONFIG EP0 DOWN
$	CONTEXT = 0
$ LBL1:	PID = F$PID(CONTEXT)
$	IF PID .EQS. "" THEN GOTO LBL2
$	PROC = F$GETJPI(PID,"PRCNAM")
$! You may have to change the process names in the following command
$	IF PROC .EQS. "enet <-> inet" .OR. PROC .EQS. INET_SERVERS" THEN -
$		STOP/ID='PID'
$	GOTO LBL1
$ LBL2:	PID = F$PID(CONTEXT)
$	IF PID .EQS. "" THEN EXIT
$	IMAG = F$GETJPI(PID,"IMAGNAME")
$	IMAG = F$ELEMENT(0,";",IMAG)
$! Check to see that the process is running the the image we expect
$! Substitute the appropriate image name for WIN/TCP in the next command
$	IF IMAG .NES. "win_disk:win_directory]win_ftp_server" THEN GOTO LBL2
$	PROC = F$GETJPI(PID,"PRCNAM")
$	USER = F$GETJPI(PID,"USERNAME")
$	USER = F$EXTRACT(0,F$LOCATE(" ",USER),USER)
$! Check whether the process has the right name
$! $	IF (USER .EQS. "SYSTEM" .AND. -
		F$EXTRACT(0,5,PROC) .EQS. "<Ftp_" .AND. -
		F$EXTRACT(F$LENGTH(PROC)-1,1) .EQS. ">") .OR. -
		(PROC .EQS. "<Ftp_" + USER + ">") THEN -
$! If both process name and image are correct, stop the process
$	STOP/ID='PID'
$	GOTO LBL2