Close

Automatically restart

Like to see something in a future release? Post your suggestions here.

Moderator: Staff

no avatar
vlim13
 
Posts: 1
Joined: Wed Apr 13, 2011 2:44 pm

Automatically restart

by vlim13 » Wed Apr 13, 2011 2:48 pm

Hi,

I find that Vitamin D work really well, but there are times that it crashes on me. Aside from having it run as a service, is there a way for the software to restart itself instead of just displaying "Vitamin D has encountered a problem and needs to shut down"? That way we wouldn't miss any recording while it's waiting for user input.

Also, do you anticipate any H.264 support for Axis cameras in the near future?

Thanks!

no avatar
JPElectron
 
Posts: 48
Joined: Tue May 31, 2011 12:52 am

Re: Automatically restart

by JPElectron » Tue May 31, 2011 12:59 am

If you leave the main window closed, but don't log off, it's still running and I find crashing is way less of a problem...

If/when it does break, I use the following...
Keep Running checks that the process is running, and a batch file restarts it and sends me an email...

; Keep Running v1.2 Configuration File

; full path of executable to be started for the first time
Start=

; wait X seconds before checking for the first time
Delay=10

; full path of executable to be checked
Detect=C:\Program Files (x86)\Vitamin D Video\Vitamin D Agent.exe

; check the running processes list every X seconds
Interval=45

; full path of executable to be re-launched
Launch=C:\AUTOMATION\keeprunalarm.bat

; reboot if the detected process quits
Reboot=No

File "keeprunalarm.bat" as follows...

@ECHO OFF
CLS
IF EXIST C:\AUTOMATION\keeprunalert.txt goto done

ECHO. NOTIFYING OF PROBLEM at %DATE% %TIME%
ECHO NOTIFYING OF PROBLEM at %DATE% %TIME% >> keeprunlog.txt
ECHO.
ECHO Turn on strobe...
C:\AUTOMATION\R2Xctrl.exe 1, 2, On
ECHO Send an email...
C:\AUTOMATION\sendEmail.exe -f [email protected] -t [email protected] -u "server4 PROBLEM" -m "server4 reports vitamin D is DOWN" -s 192.168.0.4
ECHO Already sent > keeprunalert.txt
goto :done

:done
ECHO EXITING.
ECHO.
SLEEP 2
EXIT

User avatar
Semper Vaporo
 
Posts: 331
Joined: Sat Oct 09, 2010 11:51 am

Re: Automatically restart

by Semper Vaporo » Tue May 31, 2011 9:57 am

JPElectron wrote:If you leave the main window closed, but don't log off, it's still running and I find crashing is way less of a problem...

If/when it does break, I use the following...
Keep Running checks that the process is running, and a batch file restarts it and sends me an email...

; Keep Running v1.2 Configuration File

; full path of executable to be started for the first time
Start=

; wait X seconds before checking for the first time
Delay=10

; full path of executable to be checked
Detect=C:\Program Files (x86)\Vitamin D Video\Vitamin D Agent.exe

; check the running processes list every X seconds
Interval=45

; full path of executable to be re-launched
Launch=C:\AUTOMATION\keeprunalarm.bat

; reboot if the detected process quits
Reboot=No

File "keeprunalarm.bat" as follows...

@ECHO OFF
CLS
IF EXIST C:\AUTOMATION\keeprunalert.txt goto done

ECHO. NOTIFYING OF PROBLEM at %DATE% %TIME%
ECHO NOTIFYING OF PROBLEM at %DATE% %TIME% >> keeprunlog.txt
ECHO.
ECHO Turn on strobe...
C:\AUTOMATION\R2Xctrl.exe 1, 2, On
ECHO Send an email...
C:\AUTOMATION\sendEmail.exe -f [email protected] -t [email protected] -u "server4 PROBLEM" -m "server4 reports vitamin D is DOWN" -s 192.168.0.4
ECHO Already sent > keeprunalert.txt
goto :done

:done
ECHO EXITING.
ECHO.
SLEEP 2
EXIT



I assume you mean the first part of your missive is a file named 'KeepRunning", but what do we do with this file? Is there a file extension to the name? Where does it go? How is it linked into the system.

What is R2Xctrl.exe? Is that something that comes with Windows or something we would need to download from someplace? Same with SendEmail.exe? Where did the "C:\AUTOMATION" folder/directory come from? Is it created by some download someplace on the web, or is it native to some flavour of Winders?

Could the "Start=" line in the "KeepRunning" file be used to start VDV on bootup?
Semper Vaporo,

no avatar
JPElectron
 
Posts: 48
Joined: Tue May 31, 2011 12:52 am

Re: Automatically restart

by JPElectron » Tue May 31, 2011 12:59 pm

You make the C:\AUTOMATION folder yourself (or any folder for that matter) and put these things in it...

http://www.jpelectron.com/readme/keeprun.asp
http://caspian.dotconf.net/menu/Software/SendEmail

R2Xctrl.exe is used to trigger a relay, which I have connected to a strobe light in my office...
Software from: http://www.jpelectron.com/sample/JPElec ... relays.zip
Relay hardware from: http://www.controlanything.com/Relay/Device/R210RS
Strobe light from: http://www.allelectronics.com/make-a-st ... HER/1.html

Yes, you could change this example so keeprun.exe launches VDV for you and restarts it, but I prefer to know when/if it crashed and restart it myself
(I should note, a crash hasn't happened to me in a long awhile, using the latest version, even with some instances that I know are recording too many cameras)
Use the example INI below, and then put a shortcut to keeprun.exe in your startup folder, or make a scheduled task to run it as startup...
Note that VDV will only start recording your cameras if they were "turned on" to record the last time VDV was running (which in the case of a crash it probably was)

; Keep Running v1.2 Configuration File

; full path of executable to be started for the first time
Start=C:\Program Files (x86)\Vitamin D Video\Vitamin D Video.exe

; wait X seconds before checking for the first time
Delay=45

; full path of executable to be checked
Detect=C:\Program Files (x86)\Vitamin D Video\Vitamin D Agent.exe

; check the running processes list every X seconds
Interval=60

; full path of executable to be re-launched
Launch=C:\Program Files (x86)\Vitamin D Video\Vitamin D Video.exe

; reboot if the detected process quits
Reboot=No

User avatar
ryan
 
Posts: 1015
Joined: Wed Aug 25, 2010 2:52 pm
Location: Palo Alto, California

Re: Automatically restart

by ryan » Fri Jun 03, 2011 2:35 am

Hi JPElectron,

The strobe light is a cool project, thanks for sharing! That would make for a great "Person detected at front door" alert.

Glad to hear that the latest version has been stable for you. If you do experience any crashes be sure to submit a bug report from inside the app and we will do our best to help.

You mention not logging off helping avoid crashes - If you actually do log off all of the programs executed by that user should be closed, perhaps appearing as a crash if windows forces the close before things could be successfully brought down. If you use fast user switching and simply 'switch' users but remain logged in, this shouldn't cause any problems for VDV to remain running. Unless of course a different user logs on and runs something that takes over all of the available CPU. :-)
Learn more about Sighthound Video in our support pages - Reference Guide | All Articles
Are you a developer? Check out our cloud APIs - Demo | Docs


Return to Feature Requests