dbTalk Databases Forums  

D3/NT automated shutdown

comp.databases.pick comp.databases.pick


Discuss D3/NT automated shutdown in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Brian Bond
 
Posts: n/a

Default D3/NT automated shutdown - 01-03-2006 , 05:35 PM






In conjunction with the UPS monitoring software that comes with Windows
2000, I have set up a script that is executed when the power has been off
for three minutes. The script consists of "net stop D3vme", and then
blat.exe to send me email notification (all comm gear is on the UPS). After
the script is run, the UPS software then shuts down the computer.

I understand that the D3Tray program can also be used to automate this
procedure, but it appears that the console must be logged on in order for
that to work, and our console is typically not left logged on.

I don't know if my setup qualifies as a "best practice", but I certainly do
not want it to be a "worst practice". Is there any else or anything
different that I should be doing?

thanks





Reply With Quote
  #2  
Old   
Mark Brown
 
Posts: n/a

Default Re: D3/NT automated shutdown - 01-03-2006 , 08:20 PM






I would suggest that it is NEVER a good idea to simply stop the D3 service.
That will NOT force memory to flush or processes to log off properly.

If at all possible, it will always be better if you get a port logged on to
do a proper "shutdown". Even something as simple as:

for i = 1 to system(18)
execute "logoff ":i:" (z"
next i
data "Y"
chain "shutdown"

This will at least force the ports to all logoff, giving up their workspace
to overflow. Some steps actually writing to filespace will not allow
themselves to be broken, so this will keep you from creating GFEs
automatically.

Using the STOP to stop the service simply kills D3 and if it's in the middle
of pulling up a group or updating the overflow table, you're just out of
luck.


"Brian Bond" <brian (AT) XYZXYZXYZXYZbonanzapress (DOT) com> wrote

Quote:
In conjunction with the UPS monitoring software that comes with Windows
2000, I have set up a script that is executed when the power has been off
for three minutes. The script consists of "net stop D3vme", and then
blat.exe to send me email notification (all comm gear is on the UPS).
After the script is run, the UPS software then shuts down the computer.

I understand that the D3Tray program can also be used to automate this
procedure, but it appears that the console must be logged on in order for
that to work, and our console is typically not left logged on.

I don't know if my setup qualifies as a "best practice", but I certainly
do not want it to be a "worst practice". Is there any else or anything
different that I should be doing?

thanks







Reply With Quote
  #3  
Old   
Excalibur
 
Posts: n/a

Default Re: D3/NT automated shutdown - 01-03-2006 , 08:53 PM



Hi
I have seen mention of this tray program several times recently and must
admit I am not sure what it is supposed to be.
However for several years D3 has automatically shut down cleanly when the
server is shut down whether anyone is logged on or not. So if someone goes
to the server console on say XP professional without logging on and takes
the shutdown option D3 pops up a little window to say it is closing down
sweetly. The only problem that I have had is where some impatient twerp has
taken the option to stop immediately. Obviously this should only be taken
when one is trashing the disk with a complete reinstall or replacement.
I am pretty sure that a UPS program would initiate the same response as a
normal NT shutdown.
Peter McMurray
"Mark Brown" <mbrown (AT) drexelmgt (DOT) com> wrote

Quote:
I would suggest that it is NEVER a good idea to simply stop the D3
service.
That will NOT force memory to flush or processes to log off properly.

If at all possible, it will always be better if you get a port logged on
to
do a proper "shutdown". Even something as simple as:

for i = 1 to system(18)
execute "logoff ":i:" (z"
next i
data "Y"
chain "shutdown"

This will at least force the ports to all logoff, giving up their
workspace
to overflow. Some steps actually writing to filespace will not allow
themselves to be broken, so this will keep you from creating GFEs
automatically.

Using the STOP to stop the service simply kills D3 and if it's in the
middle
of pulling up a group or updating the overflow table, you're just out of
luck.


"Brian Bond" <brian (AT) XYZXYZXYZXYZbonanzapress (DOT) com> wrote in message
news:11rm2hq4cndca31 (AT) corp (DOT) supernews.com...
In conjunction with the UPS monitoring software that comes with Windows
2000, I have set up a script that is executed when the power has been
off
for three minutes. The script consists of "net stop D3vme", and then
blat.exe to send me email notification (all comm gear is on the UPS).
After the script is run, the UPS software then shuts down the computer.

I understand that the D3Tray program can also be used to automate this
procedure, but it appears that the console must be logged on in order
for
that to work, and our console is typically not left logged on.

I don't know if my setup qualifies as a "best practice", but I certainly
do not want it to be a "worst practice". Is there any else or anything
different that I should be doing?

thanks









Reply With Quote
  #4  
Old   
Tony Gravagno
 
Posts: n/a

Default Re: D3/NT automated shutdown - 01-03-2006 , 10:09 PM



Don't "net stop D3vme". To my knowledge D3 does not process Service
Stop requests in order to execute a controlled shutdown. So killing
the service is like a brutal crash, and there's no guarantee that your
data will be flushed.

Since this is being done in the background you may not be able to use
a program like AccuTerm to launch a session and then script a
shutdown. The way to this properly is to login to a user called
SHUTDOWN-MANAGER which executes a logon macro to send a warning to
users, waits about 30 seconds, then does a "shutdown (y". This is
pretty much what D3Tray does, it telnets in, executes the shutdown,
then disconnects.

How you connect into D3 is up to you. You can write code around the
AccuTerm communications DLL. You can write code using third-party
Telnet/socket interfaces (ip*works, Catalyst, etc) and "hand code" the
exchange. You can use D3TCL. You can use tools like FlashCONNECT or
mv.NET to send a message to an open connection. You can also compile
a D3 BASIC program as a Windows EXE - this program just does a
"execute '!z shutdown (y' ", so D3 shuts down from a phantom while the
current process disconnects. Lots of ways to skin this cat.

I have lots of code that does functions like this (wrappers around
AccuTerm for complex functions, VB6 routines, .NET routines, etc.).
I'd be happy to sell a simple, appropriate, and very inexpensive
solution to whomever is interested. As an example, I have a routine
I'm working on which addresses the problem of the D3 VME losing frames
and requiring manual maintenance. This is a real pain for VARs with a
lot of D3NT sites. It does a shutdown on D3, swaps the VME with a
clean version, reboots, runs some cleanup code, then goes to sleep
until it's time to do it again. I started this for Jeff Caspari and
he's publicly discussed offering it as a free solution to others. I'm
testing it now. (RD says they have a fix for the problem in v7.4.6.)

BTW, since we're here, as far as scripting stuff goes: When booting D3
many of us need different services available for communications, but
those services are not needed when D3 is down. So I use the
user-coldstart and user-shutdown macros to handle these processes
outside of D3. Here are my macros:
=========
'user-coldstart'
n
!net start FlashCONNECT
!net start "mv.NET Database Session Service"
!net start "mv.NET Session Manager Service"
to www330a
www-manager start
to dm

'user-shutdown'
n
to www330a
www-manager stop
to dm
rem Backup latest development updates:
NebulaSave
!net stop FlashCONNECT
!net stop "mv.NET Session Manager Service"
!net stop "mv.NET Database Session Service"
=========

Notice that the services are stopped in the opposite order that they
are started. I do similar things for other MV environments. For
example, rather than allowing Windows to start all services on its
own, here is my startup script for Unidata:
=========
net start uddbms6.0
net start udnfa6.0
net start udinetd6.0
net start unirpc
net start udtelnetd6.0
rem net start udserial6.0
net start uddbms6.0
=========

For jBASE I use this:
=========
jlicserver start
jauthserver start -V
jadminserver start -V
jslimserver start
=========

Unidata and other MV environments are much more forgiving than D3, and
stopping the services with a similar macro is all that's required to
bring it down.

If I'm doing web development I have similar macros for starting and
stopping IIS. These can be invoked from the MV environment too but I
choose to keep them outside. The point is, I have no reason to run
IIS on my system unless I'm doing some sort of web development.:
=========
'startweb.vbs'
set IISOBJ = getObject("IIS://localhost/w3svc/1")
IISOBJ.Start
set IISOBJ = nothing

'stopweb.vbs'
set IISOBJ = getObject("IIS://localhost/w3svc/1")
IISOBJ.Stop
set IISOBJ = nothing
=========

Finally, having unintentionally shifted the focus here from shutting
down D3 to the advantages of using macros: If I need to VPN into a
client system, here is my macro to stop the Windows firewall, start
the Cisco VPN firewall, then start the Cisco VPN Client. This helps
if I need to fire-up my MV environment, exchange data with a client
from MV or otherwise, then close down. Note this one is not entirely
automated as it does ask which remote site I want to connect to:
=========
netsh firewall set opmode mode=disable
net start CVPND
"C:\Program Files\Cisco Systems\VPN Client\ipsecdialer.exe"
=========
Disconnecting from VPN just takes takes a click on an icon that does
this:
=========
net stop CVPND
netsh firewall set opmode mode=enable

----------
HTH.
T


"Brian Bond" wrote:

Quote:
In conjunction with the UPS monitoring software that comes with Windows
2000, I have set up a script that is executed when the power has been off
for three minutes. The script consists of "net stop D3vme", and then
blat.exe to send me email notification (all comm gear is on the UPS). After
the script is run, the UPS software then shuts down the computer.

I understand that the D3Tray program can also be used to automate this
procedure, but it appears that the console must be logged on in order for
that to work, and our console is typically not left logged on.

I don't know if my setup qualifies as a "best practice", but I certainly do
not want it to be a "worst practice". Is there any else or anything
different that I should be doing?

thanks





Reply With Quote
  #5  
Old   
Homer L. Hazel
 
Posts: n/a

Default Re: D3/NT automated shutdown - 01-03-2006 , 11:06 PM



Greetings,

D3/NT comes with a TCL command line processor, I think it's called D3TCL.
You execute with some
parameters from the ACS shutdown parameters and it causes D3 to Shutdown as
though you had
entered the "SHUTDOWN" command at TCL as DM.

It works nice, but I had some problems when the power came back on before
things were complete.

Something did not get set properly. The client actually had to do a real
SHUTDOWN, then shutdown
and reboot the W2K server before everything was all right.

Larry Hazel

"Excalibur" <excalibur21 (AT) bigpond (DOT) com> wrote

Quote:
Hi
I have seen mention of this tray program several times recently and must
admit I am not sure what it is supposed to be.
However for several years D3 has automatically shut down cleanly when the
server is shut down whether anyone is logged on or not. So if someone
goes
to the server console on say XP professional without logging on and takes
the shutdown option D3 pops up a little window to say it is closing down
sweetly. The only problem that I have had is where some impatient twerp
has
taken the option to stop immediately. Obviously this should only be taken
when one is trashing the disk with a complete reinstall or replacement.
I am pretty sure that a UPS program would initiate the same response as a
normal NT shutdown.
Peter McMurray
"Mark Brown" <mbrown (AT) drexelmgt (DOT) com> wrote in message
news:whGuf.9508$ka.187 (AT) tornado (DOT) socal.rr.com...
I would suggest that it is NEVER a good idea to simply stop the D3
service.
That will NOT force memory to flush or processes to log off properly.

If at all possible, it will always be better if you get a port logged on
to
do a proper "shutdown". Even something as simple as:

for i = 1 to system(18)
execute "logoff ":i:" (z"
next i
data "Y"
chain "shutdown"

This will at least force the ports to all logoff, giving up their
workspace
to overflow. Some steps actually writing to filespace will not allow
themselves to be broken, so this will keep you from creating GFEs
automatically.

Using the STOP to stop the service simply kills D3 and if it's in the
middle
of pulling up a group or updating the overflow table, you're just out of
luck.


"Brian Bond" <brian (AT) XYZXYZXYZXYZbonanzapress (DOT) com> wrote in message
news:11rm2hq4cndca31 (AT) corp (DOT) supernews.com...
In conjunction with the UPS monitoring software that comes with Windows
2000, I have set up a script that is executed when the power has been
off
for three minutes. The script consists of "net stop D3vme", and then
blat.exe to send me email notification (all comm gear is on the UPS).
After the script is run, the UPS software then shuts down the computer.

I understand that the D3Tray program can also be used to automate this
procedure, but it appears that the console must be logged on in order
for
that to work, and our console is typically not left logged on.

I don't know if my setup qualifies as a "best practice", but I
certainly
do not want it to be a "worst practice". Is there any else or anything
different that I should be doing?

thanks











Reply With Quote
  #6  
Old   
Brian Bond
 
Posts: n/a

Default Re: D3/NT automated shutdown - 01-04-2006 , 11:36 AM



With the example below, should there be a check in place so that the line
running the process will not log itself off in the middle of things?

I originally had something similar in place using D3TCL, but in testing
realized that the job was killing itself in the middle of shutting things
down (d-uh!).





"Mark Brown" <mbrown (AT) drexelmgt (DOT) com> wrote

Quote:
I would suggest that it is NEVER a good idea to simply stop the D3 service.
That will NOT force memory to flush or processes to log off properly.

If at all possible, it will always be better if you get a port logged on
to do a proper "shutdown". Even something as simple as:

for i = 1 to system(18)
execute "logoff ":i:" (z"
next i
data "Y"
chain "shutdown"

This will at least force the ports to all logoff, giving up their
workspace to overflow. Some steps actually writing to filespace will not
allow themselves to be broken, so this will keep you from creating GFEs
automatically.

Using the STOP to stop the service simply kills D3 and if it's in the
middle of pulling up a group or updating the overflow table, you're just
out of luck.





Reply With Quote
  #7  
Old   
Mark Brown
 
Posts: n/a

Default Re: D3/NT automated shutdown - 01-04-2006 , 12:02 PM



You are absolutely correct. I didn't deal with that issue. But seeing as
you were bright enough to catch it...

For i = 0 to system(18)
if i # system(12) then execute "logoff ":i:" (z"
next i
data 'Y'
chain 'shutdown'

Mark


"Brian Bond" <brian (AT) XYZXYZXYZXYZbonanzapress (DOT) com> wrote

Quote:
With the example below, should there be a check in place so that the line
running the process will not log itself off in the middle of things?

I originally had something similar in place using D3TCL, but in testing
realized that the job was killing itself in the middle of shutting things
down (d-uh!).





"Mark Brown" <mbrown (AT) drexelmgt (DOT) com> wrote in message
news:whGuf.9508$ka.187 (AT) tornado (DOT) socal.rr.com...
I would suggest that it is NEVER a good idea to simply stop the D3
service. That will NOT force memory to flush or processes to log off
properly.

If at all possible, it will always be better if you get a port logged on
to do a proper "shutdown". Even something as simple as:

for i = 1 to system(18)
execute "logoff ":i:" (z"
next i
data "Y"
chain "shutdown"

This will at least force the ports to all logoff, giving up their
workspace to overflow. Some steps actually writing to filespace will not
allow themselves to be broken, so this will keep you from creating GFEs
automatically.

Using the STOP to stop the service simply kills D3 and if it's in the
middle of pulling up a group or updating the overflow table, you're just
out of luck.







Reply With Quote
  #8  
Old   
Dave Weaver
 
Posts: n/a

Default Re: D3/NT automated shutdown - 01-04-2006 , 12:14 PM



For D3 ...
System(18) = number of ports on system --- OK
System(12) = system time in milliseconds --- WRONG!
Should not system(12) be system(22) ????
System(22) = port number of current process.

Dave Weaver, Weaver Consulting


Reply With Quote
  #9  
Old   
Mark Brown
 
Posts: n/a

Default Re: D3/NT automated shutdown - 01-04-2006 , 06:37 PM



I guess I need new glasses, or better typing skills.


"Dave Weaver" <weaver22 (AT) pacbell (DOT) net> wrote

Quote:
For D3 ...
System(18) = number of ports on system --- OK
System(12) = system time in milliseconds --- WRONG!
Should not system(12) be system(22) ????
System(22) = port number of current process.

Dave Weaver, Weaver Consulting




Reply With Quote
  #10  
Old   
Tony Gravagno
 
Posts: n/a

Default Re: D3/NT automated shutdown - 01-05-2006 , 05:10 AM



"Excalibur" wrote:
Quote:
Hi
I have seen mention of this tray program several times recently and must
admit I am not sure what it is supposed to be.
D3Tray was a cute utility written by Pierre Trinephi when he was
working in the Pick Systems office in Paris. After he came to the US
to work at PS/RD, he only made a few enhancements to it, but it was
always (and probably still is) available on the RD freeware site. At
some point someone at RD decided to call it a D3 component, but that
was very wrong. No one maintains, supports, or enhances it. It
certainly does not go through the RD Engineering/QA process (maybe
that's a good thing these days), and it would be worthless to file bug
or enhancement action items on it. I personally think it was rude of
anyone at RD to suggest that Pierre's pet project should be "adopted"
into the product. That could have been a compliment, but it wasn't.
In any case, you might find it in your product, on your distribution
CD, and/or with RD FTP freeware. While it was a great proggie in its
time, someone with the knowledge can write similar code for low or no
cost and in very little time.

Quote:
However for several years D3 has automatically shut down cleanly when the
server is shut down whether anyone is logged on or not. So if someone goes
to the server console on say XP professional without logging on and takes
the shutdown option D3 pops up a little window to say it is closing down
sweetly.
Your words "cleanly" and "sweetly" bear re-evaluation. You'll notice
D3 comes down much faster when the system is being shutdown under it
like this. That's no accident, D3 may be trying to do a fast flush
but that's about all it's going to get done before Windows gets tired
of waiting and takes it down brutally. There is an elegant way for
applications to intercept the Windows OnQueryShutdown signal, stop it,
do some wrapup, then re-initiate the shutdown. This is what D3Tray
and some of my routines do. But that's not what D3 does, so be
careful about how sweet that little warning box looks.

Bottom line, shutdown D3, don't let the system crash it for you.
T


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.