![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
In a posting several weeks ago, I inquired about automating a D3 shutdown. The program below was submitted as a solution. FOR I = 0 TO SYSTEM(18) IF I NE SYSTEM(22) THEN EXECUTE "LOGOFF ":I:" (Z" NEXT I DATA 'Y' CHAIN 'SHUTDOWN' The program is run as user "ADMINISTRATOR_" with SYS2 privileges. It is called from this three-line [edited] shutdown script: [send an email "shutdown started..."] C:\PROGRA~1\D3\D3Programs\D3Tcl.exe -d SYSPROG -c "RUN BP AUTOMATED.SHUTDOWN" [send an email "shutdown finished..."] I installed the code, but due to some 24x7 scheduling conflicts, I hadn't been able to test it (but given that the old program didn't work, I was certainly no worse off having a new program that didn't work either...) Cutting to the chase, we had a bad storm this weekend and the power went out. I know the UPS script worked, since I received a "shutting down" email, but I never received the following "finished" email. After bringing the system back up, I had some time to actually run the new D3 shutdown program. It hangs, apparently in a permanent manner, when it chains to "shutdown". The UPS monitor finally gives up waiting for it and shuts the server down anyway. Any thoughts? Thanks. |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
"shutdown" is a basic program in dm,bp,. If the data "Y" is causing the problem, you could make your own that does the pre-shutdown stuff... |
#5
| |||
| |||
|
#6
| |||
| |||
|
#7
| |||
| |||
|
|
As Scott B. pointed out, since a SHUTDOWN should log off all lines anyway, why bother with the LOGOFFs? Also, why not shut down the D3 VME directly from the OS using: C:\{InstallDir}\D3VME.EXE /STOP You can check your D3 Books on line (help file) for more details, but it appears to me that this will perform the same function as a SHUTDOWN command from within D3. This should also be much easier to implement with your UPS shutdown script. Kevin Powick |
![]() |
| Thread Tools | |
| Display Modes | |
| |