Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Rebooting using telnet from a VMS box

Sk Noorul Hassan
Regular Advisor

Rebooting using telnet from a VMS box

Hi,

Please find the steps require to reboot a server(with proprietary o/s)from a VMS server using Telnet attached herewith. Is it possible to simulate the steps on to a DCL script ?
27 REPLIES
Ian Miller.
Honored Contributor

Re: Rebooting using telnet from a VMS box

You may find the scripting capabilties of kermit are sufficent for this.

____________________
Purely Personal Opinion
Jan van den Ende
Honored Contributor

Re: Rebooting using telnet from a VMS box

Hassan,

I do not know what is hidden behind that menu.

If is is a
$ @SYS$SYSTEM:SHUTDOWN
, then it will NOT work.

If, however, it is a
$ MCR SYSMAN SHUT NODE REBOOT
then it should work OK.

hth

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Sk Noorul Hassan
Regular Advisor

Re: Rebooting using telnet from a VMS box

Jan/Ian,

The server which I want to reboot sitting on a VMS server using Telnet is not a VMS box. It is defined inside my VMS server in UCX database not in NCP. If u can please guide me.
Volker Halle
Honored Contributor

Re: Rebooting using telnet from a VMS box

Hi,

asking the same question again will probably get you the same answers:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=982892

You cannot do 'scripting' with OpenVMS TELNET.

KERMIT is most likely the best tool to do this. Please have a look here:

http://www.columbia.edu/kermit/ck80.html

Volker.
Robert Gezelter
Honored Contributor

Re: Rebooting using telnet from a VMS box

Hassan,

I concur with the others. C-Kermit is more than likely the best tool for what you are trying to accomplish.

In its most simple use, it is functionally equivalent to TELNET. However, it is fully scriptable. The scripting capability is fully described in the published book about C-Kermit.

- Bob Gezelter, http://www.rlgsc.com
Sebastian Bazley
Regular Advisor

Re: Rebooting using telnet from a VMS box

The book (and Kermit) are very good, and Kermit is probably the easiest route to automating the process.

Alternatively, if you have any Perl skills in your organisation, it should be possible to use Perl to script the reboot.

Note that you can cannot generally redistribute Kermit - see the Columbia web-site for details:

http://www.columbia.edu/kermit/licensing.html
Wim Van den Wyngaert
Honored Contributor

Re: Rebooting using telnet from a VMS box

If the other box is a *nix you can try nohup.

Wim
Wim
Wim Van den Wyngaert
Honored Contributor

Re: Rebooting using telnet from a VMS box

Correct Jan's statement to :
mc sysman shut node /auto

And it doesn't work on my system because I kill all users.

Better to go with a detached process.

Wim
Wim
Joseph Huber_1
Honored Contributor

Re: Rebooting using telnet from a VMS box

Hassan, is the telnet protocol a hard requirement ?
I suppose if system has telnet, then it also has rsh or rexec available (or ssh):
then You simply cann send a single shutdown comand (whatever it is).
http://www.mpp.mpg.de/~huber
Sk Noorul Hassan
Regular Advisor

Re: Rebooting using telnet from a VMS box

Thanks for your suggestions. As far as KERMIT is concerned, I am not in a position to load it on my VMS boxes.

To use rsh or rexec, I do not have any single reboot/shutdown command to send. It is a menu driven proprietary o/s. To reboot I need to login using telnet and then selcting options as per requirement as attached in my question. Is there any other way to achive it.
Volker Halle
Honored Contributor

Re: Rebooting using telnet from a VMS box

You can certainly write your own TELNET client program - I know there was an example in the HP internal TIMA database once.

You need some kind of scripting possibility and this can only be provided by an already existing program (KERMIT would the tool to use - why can't you ?) or by a new program to be written...

You could also try to experiment with outbound TELNET devices, though I don't know if your version of UCX/TCPIP correctly works with them. Then it might be able to read/write from such a TNA: device using DCL - IF this can be done in line mode.

Volker.
Sk Noorul Hassan
Regular Advisor

Re: Rebooting using telnet from a VMS box

Yes Volker,
I am able to create on TNA1: device using TELNET/CREATE_SESSION IP Address [port] [unit]

Now what should me my approach ?
Volker Halle
Honored Contributor

Re: Rebooting using telnet from a VMS box

Can you try $ SET HOST/DTE/ESC=D TNAx: ? Do you get to your FEP and the menue ?

Does OPEN/READ/WRITE x TNAx: also work and can you then READ x line and WRITE x command ?

Using KERMIT would be really much easier...

Volker.
Sk Noorul Hassan
Regular Advisor

Re: Rebooting using telnet from a VMS box

Volker, I am getting Connected message but not my FEP menu.
Volker Halle
Honored Contributor

Re: Rebooting using telnet from a VMS box

I tried this and it works for me:

TELNET> create_sess vaxvms 23
%TELNET-S-CRSES, Session created on TNA397
TELNET> Exit
AXPVMS $ set host/dte/esc=d tna397:

%REM-I-TOQUIT, connection established

Press Ctrl/D to quit, Ctrl/@ for command mode

{ {

Welcome to OpenVMS/VAX Operating System, Version V6.2

Username:


Did you specify the IP address of your FEP and port 23 ? Can you just try it with your local host or another OpenVMS system ?

Volker.
Sk Noorul Hassan
Regular Advisor

Re: Rebooting using telnet from a VMS box

Volker,

For any other VMS server also I am not getting the login prompt as described in your answer. Yes I mentioned the FEP ip address & port 23
Volker Halle
Honored Contributor

Re: Rebooting using telnet from a VMS box

This is what I said:


You could also try to experiment with outbound TELNET devices, though I don't know if your version of UCX/TCPIP correctly works with them


I can confirm that I also can't get the username prompt of a remote OpenVMS server, if I use the outbound TELNET device from an OpenVMS VAX V6.2 UCX V4.2 ECO 1 system.

Back to square 1: why can't you use KERMIT ?

Volker.
Sk Noorul Hassan
Regular Advisor

Re: Rebooting using telnet from a VMS box

Hi all,

Sorry for the delayed response. I went through the various sites as suggested by you all. Although I could not install kermit in my VAX/VMS server due, it helped me in gaining knowledge on Kermit software.

Thanks
Wim Van den Wyngaert
Honored Contributor

Re: Rebooting using telnet from a VMS box

I would check what the menu is exactly doing. If you try to reboot a node via the network, the protocol (IP) may shutdown before the node is crashed and thus the reboot sequence may get aborted.

You should have a way to login on the console port (e.g. console manager or cockpit).

Wim
Wim
Phil.Howell
Honored Contributor

Re: Rebooting using telnet from a VMS box

if you cannot use kermit...
you could write your own
you should create the telnet session as suggested above, then check that you can access your server using set host /dte
you then have to write a program to simulate your interaction with the tna device
there are programs in older sys$examples called DTE* that you can use as a template.
Phil
Robert Gezelter
Honored Contributor

Re: Rebooting using telnet from a VMS box

Hassan,

In one of your earlier messages, you said that you "could not install Kermit". What is the precise nature of the problem?

Kermit is a normal user-mode program and does not require any privileges. You should not have encountered any problem (this is true both for the very outdated VAX Kermit and all versions of C-Kermit).

- Bob Gezelter, http://www.rlgsc.com
Phillip Thayer
Esteemed Contributor

Re: Rebooting using telnet from a VMS box

Hassan,

Try this command in TCPIP:

TCPIP> CREATE_SESSION ip-address 23 /PERMANENT/PROTOCOL=TELNET 999

This will create a TNA999: device to use to interact with the FEP. Then you can use a DCL Open command as follows:

OPEN/READ/WRITE FEP_CHAN TNA999:

Then you can read using the command:

READ FEP_CHAN LINE

and useing the f$loc lexical function you look for your menu prompts. Once you get your menu prompts, then use

WRITE FEP_CHAN "menu-option-desired"

To send the proper menu selection to your FEP. If you were to write LINE ot the secreen each time it is read you would simply echo the menu to the VMS terminal running the DCL procedure and allow the user to enter the menu selection they wanted. Each time they enter a menu selection you would go to the top of your code logic that reads and echos the menu to the VMS terminal.

This should do what you are looking for and more. If your FEP shutsdown the TNA999: will be closed automaticall and you can execute the DCL procedure again when it finishs rebooting.

One other caveat, you may need to use a number other than 999 unless there is a way that someone knows to determine how he can get a number greater than the dynamic numbers used by TELNET.

Phil
Once it's in production it's all bugs after that.
Sebastian Bazley
Regular Advisor

Re: Rebooting using telnet from a VMS box

You can do something like:

$ PIPE TELNET /CREATE host 23 >tempfile

the file will contain something like:

%TELNET-S-CRSES, Session created on TNA27

You can read the tempfile to find the TNA device and use that.

S.
P.S. There's probably a bootstrap version of Kermit written in DCL somewhere ;-)
Robert Gezelter
Honored Contributor

Re: Rebooting using telnet from a VMS box

Hassan,

Concerning Sebastian's comment, C-Kermit binaries are available via the Kermit www site at:
http://www.columbia.edu/kermit/ck80binaries.html

These can be downloaded directly via the www and used.

The Kermit Project home page is itself at
http://www.columbia.edu/kermit

The Kermit site contains complete documentation, albeit is in a less well formatted version than the book. The book is also easily available, and fairly complete.

- Bob Gezelter, http://www.rlgsc.com