[UPDATED July 15th 2017]
New version with remote desktop access monitoring
Trading applications should be able to run 24/7.
Unfortunately a software crash can always happen, usually when the software is pushed to its limits. Some trading applications can also have memory leaks and consume all available RAM: this will, sooner or later, generate a crash or let the server being unusable. To avoid these not so funny “surprises” we created a small tool named SpeedyAlert which will send and email when: – a program has crashed – the server is getting short in RAM or any other critical resource.
The latest version can be downloaded here, free of charge for our clients.
1/ How does it works
The application will scan new events every minute and will send an email if a process has crashed or if machine resources gets low.
Of course if the server itself is already stuck, if there is not a single byte of RAM available, then the Crash Alert application may not be able to send these alerts quickly enough (this kind of events is managed by our external monitoring system).
2/ Email setup
Because all anti-spam rules set by most email provider the application may not be able to send email without setting up correctly the email account you’re going to use to send alerts. The easier and safer is to create a dedicated email account for sending alert emails, which will be used only for this and won’t be used to host critical information. As an example we’ll show a working configuration with Gmail and Yahoo! Mail. We will use a Gmail or a Yahoo! Mail to send the alerts.
The first optional but recommended step is to create a dedicated account to send the alerts. For GMAIL and for Yahoo! Mail you have to allow “less secure apps”.
2.1/ GMAIL setup:
First thing to know, after logging in, Google may ask a verification (text message or a phone call). The machine you’re using to sign in has to be trusted by Google first.
Go to myaccount.google.com and find “Connected app & sites”:
Then allow less secure apps:
2.2/ Yahoo! Mail setup
Same principle, search for “Account parameters” and then “Account security”:
3/ Installation of SpeedyAlert
When you have a valid email account then you can install SpeedyAlert.
We recommend to let the “Automatically start on login” check box selected, so you won’t forget to manually launch it after a reboot or logoff/logon. If the required .Net 4 libraries are installed the installer will automatically download and install them.
Then start SpeedyAlert, enter the right login/password/SMTP server/Port/recipient, and test it:
We already set few processes names to be monitored, but unless you’re using NinjaTrader, TradeStation and Multicharts on the same machine your don’t need all of these.
You can update this field in adding/removing processs names separated by a comma.
A successful test will save the configuration in the file “My Documents\emailCred.xml”. This file is mainly in plain text with the email account password encrypted. Then you click on the Enable button, and that’s it…
5/ Examples of emails received
If something goes wrong you’ll receive emails with this kind of content shown below.
An application hang detected:
The program blahblah.exe version 220.127.116.11 stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Action Center control panel.
Process ID: 838
Start Time: 01d1d1419b3dc674
Termination Time: 6
Application Path: C:\Program Files\blahblah\blahblah.exe
An application crash
Faulting application name: Explorer.EXE, version: 6.1.7601.17567, time stamp: 0x4d672ee4
Faulting module name: MSVCR90.dll, version: 9.0.30729.6161, time stamp: 0x4dace4e7
Exception code: 0xc0000005
Fault offset: 0x000000000001e1ac
Faulting process id: 0x27cc
Faulting application start time: 0x01d1cb08e4e16f0e
Faulting application path: C:\Windows\Explorer.EXE
Faulting module path: C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_08e61857a83bc251\MSVCR90.dll
Report Id: 1a73351a-3d3e-11e6-a6ab-e0a0609d3d1a
An “Help, no more RAM!!!” warning:
Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: NinjaTrader.exe (2832) consumed 1539629056 bytes, explorer.exe (1260) consumed 41664512 bytes, and blahblah.exe (2500) consumed 26447872 bytes.
Successful remote log in:
subject: Successful RDP logon on server VMxxx\Administrator from New-York, USA on 6/26/2017 12:25:30 PM
content: Successful log on from IP address: 192.168.0.250 located in New-York, USA