Close Server Console through DOS prompt

I'd like to be able to gracefully bring down the Domino Server through a bat program (or whatever) after the UPS has turned on. In other words when the PC server (windows 2003) loses power for x minutes I can have the UPS issue a DOS command. I would like to have it properly bring down Lotus.
apaclarkAsked:
Who is Participating?
 
oBdAConnect With a Mentor Commented:
Stopping the service will bring down the Notes service gracefully; I've implemented this before. A service is programmed to be stopped that way, stopping a service is not the same as killing it in Task Manager. When you're stopping the Notes service through "net stop" or services.msc, the SCM will tell the service to stop, which, in all likelihood, will run the exact same procedure as if you would type in "exit" in the console.
0
 
oBdACommented:
The basic command you need is "net stop <service name>"
To find the correct service name to stop, open a command prompt on the Notes server, enter
net start
This will show a list of running services.
Find the one for Domino, then use this name in the "net stop" command; if the name contains spaces, enclose it in quotes, like this (assuming "Domino Server" as service name):
net stop "Domino Server"
0
 
apaclarkAuthor Commented:
Yes, but isn't that the same as "X"ing out the window? I was looking for something that would end it in the sameway that "exit" would but issued outside of the console itself as the UPS software can only run windows commands.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
SysExpertCommented:
1) You have to make sure that the Domino  server is running as a service.

2) Test your Net stop  command manually to make sure it works.

Newer servers use longer names

net stop "lotus (notesdata)"

You made need the quote marks for any service name  wth spaces.

The name should be taken from the Service in Windows !

I hope this helps !
0
 
apaclarkAuthor Commented:
Excellent! Thanks
0
 
LotusDaveCommented:
But you can always issue console commands through dos using nserver.
At the dos prompt navigate to the folder containing the notes executables, say c:\notes.
Then issue the command Nserver -q
Which issues a q command to the console.
So the batch file would contain

cd c:\notes
nserver -q

0
 
apaclarkAuthor Commented:
Nice! I like that even better as we are not always in the habit of running the server as a service. This should work regardless of the startup method.
0
 
LotusDaveCommented:
Yes, it does work whether the server is running as a service or as an application.
Sometimes one or two threads might get stuck so I usually sleep for a couple of minutes then used nds to kill any threads that have not closed gracefully -

cd c:\notes
nserver -q
sleep 120
nsd -kill

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.