Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
TOC
TOC
Include Page
KBCOMMON:KB-CSSstyle
KBCOMMON:KB-CSSstyle

...

ParameterValueExample
logfileFull path to the logfile that will be used to log the script outputlogfile=C:\Charon\myds20_shutdown.log
mode'opa0'mode=opa0
osEither Tru64 or VMSos=Tru64
servicename

CHARON instance service name.

(warning) When using "opa0" mode, the service is stopped by a "power off" or the "F6" key. If this operation does not succeed (cannot connect to console or "F6" key not enabled for example), it is then stopped using a Windows service command.

servicename=myds20
usernameDefines the remote username that will be used to connect to the console of the CHARON instance (if not already logged in)

For OpenVMS: username=system

For Tru64: username=root

password

Defines the password in clear text that will be used to connect to the console.

The password can be also stored in an encrypted clixml file as described below.

(warning) If password is sent then clixml (below) value must be set to "none"

password=12345

clixml

(warning) do not use, password is not encrypted

A new version will be provided soon

Defines the full path of the clixml file that contains the encrypted password (password parameter must then not be set).

To create this file, open a "cmd.exe " window and then run :

C:\Users\Administrator> cd C:\Charon

C:\Charon> powershell

PS C:\Charon> "<password>" | export-clixml <file>


Example:

PS C:\Charon> "12345" | export-clixml C:\Charon\myds20pwd.clixml

(warning) The clixml file is bound to the user and system where it is created! It will not be valid for another user or another system.

clixml=C:\Charon\myds20pwd.clixml

clixmlsys

(warning) do not use, password is not encrypted

A new version will be provided soon

Defines the full path of the clixml file that contains the encrypted password (password parameter must then not be set) for the "system" account. Used in case of integration with Windows shutdown.

(info) If not specified, clixml is used or the combination of username/password (see above)

(warning) The clixml file has to be created as "system" user using "psexec" utility. It is bound to the "system" user and the system where it is created! It will not be valid for another user or another system.

clixml=C:\Charon\myds20pwdsys.clixml
portDefines the port to access the console (same as the one defined in the configuration file).port=10003
prompt

Defines the prompt at the shell level of the guest operating system. Used to check the user is connected.

Notes:

  • If the prompt contain spaces, it is necessary to add them in the configuration file
  • The prompt must not contain any escape character.

prompt=myds20>

timelimitsecDefines the maximum number of seconds the script can run (default = 180 seconds). This value depends on the time needed to shutdown properly the operating system.timelimitsec=600
windowwidth

Optional parameters used to resize the window when running with service user ("system" account).

Useful during Windows shutdown to check operations executed.

Width = 132 and Height = 32 by default. BufferHeight set 2000 lines by default.

windowwidth=120
windowheightwindowheight=50

...


Div
classcommandline

c:\Windows\system32>C:\charon\charon_cleanshutdown.ps1 -config C:\charon\myds20vms.ini

Charon clean shutdown

Name            Value
----            -----
clixmlsys       C:\Charon\myds20vmssys.clixml
waitbeforestop  10
windowwidth     132
servicename     ds20vms
username        system
prompt          VMS084>
windowheight    50
timelimitsec    180
os              VMS
mode            opa0
clixml          C:\Charon\myds20vms.clixml
port            10003
logfile         C:\Charon\myds20vms_shutdown.log



16:48:09 [INFO ] Using 'C:\Charon\myds20vms_shutdown.log' as log file / append
16:48:09 [INFO ] Execution date : 27-avr.-2020 16:48:09
16:48:09 [INFO ] Script version : 27-Apr-20 V2.0 (MD5: 4BA97792A105C9E0E484850B88B866F8 )
16:48:09 [INFO ] Powershell version : 5.1.14409.1018
16:48:09 [INFO ] Computer name : WIN2008BM
16:48:09 [INFO ] Username : Administrateur
16:48:09 [INFO ] Windows version : Microsoft Windows Server 2008 R2 Standard
16:48:09 [INFO ] Administrator mode : True
16:48:09 [INFO ]
16:48:09 [INFO ] 'opa0' will be used
16:48:09 [INFO ] Service 'ds20vms' is Running (Display name: ds20vms)
16:48:09 [INFO ] Using 'C:\Charon\myds20vms.clixml' as credentials file.
16:48:09 [INFO ] No putty session active.
16:48:09 [INFO ] Connecting to OPA0 console, port 10003
16:48:09 [INFO ] Sending CRLF...
16:48:09 [INFO ] Time limit: 16:51:09. Seconds remaining: 180
16:48:12 [RCVD ]
16:48:12 [RCVD ] Welcome to OpenVMS (TM) Alpha Operating System, Version V8.4
16:48:12 [RCVD ]
16:48:12 [RCVD ] Username:
16:48:12 [INFO ] Got: [Username: ]
16:48:12 [INFO ] Sending VMS username...
16:48:12 [INFO ] Username sent
16:48:12 [INFO ] Time limit: 16:51:09. Seconds remaining: 176
16:48:16 [RCVD ] system
16:48:16 [RCVD ] Password:
16:48:16 [INFO ] Got: [Password: ]
16:48:16 [INFO ] Sending password, try #1 of 3
16:48:16 [INFO ] Password sent
16:48:18 [INFO ] Time limit: 16:51:09. Seconds remaining: 171
16:48:21 [RCVD ]
16:48:21 [RCVD ] %LOGIN-S-LOGOPRCON, login allowed from OPA0:
16:48:21 [RCVD ] Welcome to OpenVMS (TM) Alpha Operating System, Version V8.4
16:48:21 [RCVD ] Last interactive login on Monday, 27-APR-2020 15:46:31.39
16:48:21 [RCVD ] Last non-interactive login on Thursday, 2-APR-2020 08:18:02.76[c\Z
16:48:21 [INFO ] Got: [ Last non-interactive login on Thursday, 2-APR-2020 08:18:02.76[c\Z]
16:48:22 [INFO ] Case unknown: [ Last non-interactive login on Thursday, 2-APR-2020 08:18:02.76[c\Z]. Retrying...
16:48:24 [INFO ] Time limit: 16:51:09. Seconds remaining: 165
16:48:27 [RCVD ] [0c
16:48:27 [INFO ] Got: [[0c]
16:48:27 [INFO ] Case unknown: [[0c]. Retrying...
16:48:29 [INFO ] Time limit: 16:51:09. Seconds remaining: 160
16:48:33 [RCVD ]
16:48:33 [RCVD ] %SET-W-NOTSET, error modifying OPA0:
16:48:33 [RCVD ] -SET-I-UNKTERM, unknown terminal type
16:48:33 [RCVD ] VMS084>
16:48:33 [INFO ] Got: [ VMS084> ]
16:48:33 [INFO ] Found prompt.
16:48:33 [INFO ] Sending VMS shutdown...
16:48:33 [INFO ] Command sent
16:48:38 [INFO ] Time limit: 16:51:09. Seconds remaining: 151
16:48:42 [RCVD ] @SYS$MANAGER:CHARON_SHUTDOWN.COM
16:48:42 [RCVD ] $ PURGE /KEEP=20 SYS$MANAGER:CHARON_SHUTDOWN.LOG
16:48:42 [RCVD ] $ RUN /DETACH SYS$SYSTEM:LOGINOUT.EXE /INPUT=SYS$MANAGER:CHARON_SHUTDOWN -
16:48:42 [RCVD ] /OUTPUT=SYS$MANAGER:CHARON_SHUTDOWN.LOG /UIC=[1,4]
16:48:42 [RCVD ] %RUN-S-PROC_ID, identification of created process is 0000011F
16:48:42 [RCVD ] $ ENDIF
16:48:42 [RCVD ] $ ENDIF
16:48:42 [RCVD ] $ EXIT
16:48:42 [RCVD ] VMS084>
16:48:42 [RCVD ]
16:48:42 [RCVD ]
16:48:42 [RCVD ] SHUTDOWN -- Perform an Orderly System Shutdown
16:48:42 [RCVD ] on node VMS084
16:48:42 [RCVD ]
16:48:42 [RCVD ] %SHUTDOWN-I-OPERATOR, this terminal is now an operator's console
16:48:42 [RCVD ] %SHUTDOWN-I-DISLOGINS, interactive logins will now be disabled
16:48:42 [RCVD ] %SET-I-INTSET, login interactive limit = 0, current interactive value = 1
16:48:42 [RCVD ] %SHUTDOWN-I-STOPQUEUES, the queues on this node will now be stopped
16:48:42 [RCVD ] %%%%%%%%%%% OPCOM 27-APR-2020 15:47:36.02 %%%%%%%%%%%
16:48:42 [RCVD ] Message from user SYSTEM on VMS084
16:48:42 [RCVD ] %JBC-E-OPENERR, error opening SYS$COMMON:[SYSEXE]QMAN$MASTER.DAT;
16:48:42 [RCVD ]

... (truncated)

16:48:42 [RCVD ]
16:48:42 [RCVD ] VMS084>
16:48:42 [INFO ] Got: [ VMS084> ]
16:48:42 [INFO ] Found prompt, waiting for shutdown to start...
16:48:47 [INFO ] Time limit: 16:51:09. Seconds remaining: 142
16:48:51 [RCVD ]
16:48:51 [RCVD ] SYSTEM SHUTDOWN COMPLETE
16:48:51 [RCVD ]
16:48:51 [RCVD ] halted CPU 0
16:48:51 [RCVD ]
16:48:51 [RCVD ] halt code = 5
16:48:51 [RCVD ] HALT instruction executed
16:48:51 [RCVD ] PC = ffffffff8008fa84
16:48:51 [RCVD ] P00>>>
16:48:51 [INFO ] Got: [P00>>>]
16:48:51 [INFO ] Sending 'power off'...
16:48:52 [INFO ] Service ds20vms is stopped
16:48:52 [INFO ] Script ended.

(question) RCVD messages correspond to the received data from the OPA0 console.

...