NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Richard I on July 05, 2024, 08:15:44 PM

Title: Reboot from Running NT Application
Post by: Richard I on July 05, 2024, 08:15:44 PM
Hello,
I have the need to reboot a running NT app on a virtual Server, ideally from a button's server side code.
The application is running as a service so will/ should  restart.
I have searched the WinEvent5 documentation for clues without success

I want to do this to refresh memory lost through leakage.
 
Thanks in anticipation...
Richard
NT 14.23
Title: Re: Reboot from Running NT Application
Post by: Alberto on July 06, 2024, 08:46:06 AM
Hi Richard I
I have memory leaks too
What Im doing is Halt(ed) it at midhight
Title: Re: Reboot from Running NT Application
Post by: Richard I on July 06, 2024, 06:36:12 PM
Thanks Alberto
Im trying to prevent users needing to RDP onto the Amazon Virtual server
Hence the need to reboot from a running app
Not sure that Halt would work, because "Halt" is a shut down without a restart
Richard
Title: Re: Reboot from Running NT Application
Post by: Bruce on July 08, 2024, 06:31:14 PM
Let's not use the phrase "reboot" since that implies a machine restart.

If it's a service you should use the RestartService method call (for the gSelfSelfservice object).
If it's an EXE see CHAIN, then HALT

Of course the better solution is to figure out why your code is leaking memory, and fix that. The server itself doesn't leak memory.
Title: Re: Reboot from Running NT Application
Post by: Richard I on July 10, 2024, 01:30:17 AM
Thanks Bruce,
I note your comment regarding terminology, but FYI the Amazon Console gives the option to "Reboot"  selected running EC2 Instances.
Research has told me that Microsoft Defender and its  antimalware subsidiary can cause memory leakage.
Eliminating them has proved difficult.
Cheers
Richard

 
Title: Re: Reboot from Running NT Application
Post by: Jane on July 10, 2024, 09:20:13 AM
BTW, you can always reboot a Windows computer with the command line:

shutdown /r /f /t 0

(May need to run asAdministrator)

Type shutdown /? at a command prompt for other options.

Title: Re: Reboot from Running NT Application
Post by: Richard I on July 10, 2024, 04:52:16 PM
Thank you Jane,
very straight forward as always

I have taken on board Bruce's caution and will await his elucidation  before implementing.
Kind regards,

Richard
Title: Re: Reboot from Running NT Application
Post by: Bruce on July 10, 2024, 08:15:58 PM
hey, if you want to reboot the machine, who am I to stop you...