Empty4 Monitoring Tool

Post Reply
User avatar
tomele
Administrator
Posts: 1166
Joined: Tue May 17, 2016 3:40 pm
Location: Germany, Forest of Odes, Defending the Limes

Empty4 Monitoring Tool

Post by tomele »

Hi @all.

Here is a little tool that monitors one or more Empty4 terminals. If terminals crash or the computer restarts, it automatically restarts the monitored Empty4 terminals. It is very valuable for VPS installations as well as local PCs.

It was part of the installation of my former VPS provider W2Cloud. They closed their business and I have switched my live trading to Eaymon's VPS now. I agree with Steve that Eaymon's VPS is highly recommendable. It's fast and very affordable. The monitoring tool is a perfect complement.

I have W2Cloud's written permission to publish the monitor tool here. Use it this way:

1. The attached archive contains a folder "Monitor". Copy the folder to the root of your hard drive or SSD.
2. Create a link to "Monitor.exe" in your startup folder to run it at Windows start (or see below).
3. Inside the program you can add/remove terminals you want to monitor. GP is pre-configured.
4. Test it by closing monitored terminals and waiting some seconds.

----------------------------------------------------

Usage notes

The following behaviour is normal: If you close the program, all monitored programs get closed as well. If you close the program's config page, all monitored programs get closed and restarted.

You must allow Monitor to open all monitored programs by itself. If you have some or all of the monitored programs open when you start Monitor, it will be out of sync and permanently maximize the monitored programs. So close them all before starting Monitor.

I ran into a problem with a workstation running 12(!) terminals. Apparently running Monitor directly from the autostart folder was too early for this machine and things got messed up. I have written the attached batch file "StartMonitor" to get around this. If you encounter problems with Monitor messing things up on start, do this: Download the "StartMonitor" archive and extract the contained batch file "StartMonitor.bat" into your "Monitor" folder. Then add a link to the batch file instead of a link to "Monitor.exe" to your startup folder. The next time your computer starts, a window will appear for 60 seconds and thereafter the monitor program will start delayed.

----------------------------------------------------

Mandatory additional steps for Eaymon's FX VPS and other MS Server 2012/2016 based services

I have learned that adding links to the startup folder doesn't work as expected on MS Server 2012/2016 systems. Due to the security architecture, no program will run before the user logs in. I tried every trick like startup scripts, scheduler tasks and even running programs as system services. Nothing worked. Programs are either running in the background session and are invisible to the user or don't run at all. The only workaround I found is to automatically log in the user at system startup. If you want to run any program after a 2012/2016 server reboot, you must follow these steps:

First download Microsoft's genuine program AutoLogon to your local PC. Open the downoaded archive and copy/paste the contained program autologon.exe to your VPS desktop (or somewhere else on your VPS). Run the program inside your VPS. A window with three input fields will show up. The first two (username and domain) will be pre-filled. Enter your VPS password in the third one and click "Enable". From now, each time your VPS starts, your user account will be automatically logged in and everything in your startup folder will be executed. You can always reverse this setting with AutoLogon's "Disable" button.

Now you don't want your account to stay unlocked for days and weeks. The risk is tiny, as a hacker would need physical access to the servers, but you never know. You want the user account to log out again when everything is running. Easiest way is to use the screensaver lock screen. Right click on the VPS desktop and select "Personalize". In the Personalization window, click on "Screen Saver" in the lower right corner. Select "Blank" as screen saver and set it to your preferred timeout (mine is 5 minutes). Activate "On resume, display logon screen" and click "OK". From now on, your account will always be locked after the specified inactivity time. Which it should anyway, if you will ever forget to end your remote session. If your account is locked, you can enter your password or simply end and re-open your remote session.

This little trick opens the door to not only run Monitor on startup. Now you could also simply add links to all your Empty4 terminals to start them after reboot. Or use other monitoring tools like the more sophisticated "Restart On Crash" if you have issues with Monitor.

----------------------------------------------------

If you have other issues, post them here. Maybe I have an answer/workaround.

Have fun.

.
You do not have the required permissions to view the files attached to this post.
Happy pippin, Thomas :-BD

It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so.
(Mark Twain)

Keep the coder going: Donate
User avatar
WorldsEnd
Trader
Posts: 95
Joined: Fri Aug 29, 2014 7:36 pm

Empty4 Monitoring Tool

Post by WorldsEnd »

Thx Thomas!
That little program is working nicely and perfectly useful in case something goes wrong with my VPS instance. I had this happen in the past two or three times and had to wait until I got home to get my systems online again. This thingy is doing the job for me. Perfect :good:
Just one thing I noted, the monitor is constantly maximizing my normally minimized Empty4 terminals. I assume there is nothing you can do here, right? Looks like it‘s system behaviour.
User avatar
tomele
Administrator
Posts: 1166
Joined: Tue May 17, 2016 3:40 pm
Location: Germany, Forest of Odes, Defending the Limes

Empty4 Monitoring Tool

Post by tomele »

tomele wrote:Just one thing I noted, the monitor is constantly maximizing my normally minimized Empty4 terminals. I assume there is nothing you can do here, right? Looks like it‘s system behaviour.
It doesn't do that in two installations I use it. If the terminals are shut down, it opens them maximized. But if they are running and minimized, it does nothing. On my side at least.
Happy pippin, Thomas :-BD

It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so.
(Mark Twain)

Keep the coder going: Donate
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Empty4 Monitoring Tool

Post by SteveHopwood »

Another fabulous tool Thomas. Thanks very much. :clap: :clap: :clap: :clap: :clap:

:xm: :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
tomele
Administrator
Posts: 1166
Joined: Tue May 17, 2016 3:40 pm
Location: Germany, Forest of Odes, Defending the Limes

Important information for FX VPS users

Post by tomele »

Hi @all.

The Monitor program only works on Eaymon's FX VPS and other MS server 2012/2016 based services with two additional steps. They are fully outlined in post 1.

Stay well and safe.
Happy pippin, Thomas :-BD

It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so.
(Mark Twain)

Keep the coder going: Donate
Post Reply

Return to “Utilities”