NextPVR Forums

Full Version: Is NRecord running?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For some time I have had a problem with NRecord stopping about once a week overnight usually at the end of the EPG scan. The easy way to get NPVR back working is to reboot but there is often half a dozen failed recordings by the time I realise there is a problem. Another solution is to Stop then Start the NPVR service which could be put into a batch file with NPVRServiceControl.exe stop then start. What I am looking for is a command to detect if NRecord is running then if not I can restart the NPVR service. This would be so easy in Linux but seems difficult under Windows.
Even under Windows it's easy as hell.

Just open the computer management and navigate to the "service" settings. Search for the NPVR Recording service and doubleclick it. On an english system there should be a tab like recovery. There you can enter, that nrecord is restarting automatically after an error.
With this setting i never had again any problem with nrecord (ok, if i made shit within the config.xml ... but that's another story).
With the proper admin right this wil return errorlevel 0 if it is running.

tasklist NRecord | find /i /n "NRecord"

Martin
Thanks Martin. However I think the actual syntax should be :-

tasklist | find /i /n "NRecord"

This does return errorlevel "0" when NRecord is running and "1" when not running so is the starting point I need.
ShiningDragon Wrote:Search for the NPVR Recording service and doubleclick it. On an english system there should be a tab like recovery. There you can enter, that nrecord is restarting automatically after an error.

Sub, would you think this is really a good/safe thing to do? Any potential problems it may cause?
I dont know. It's not something I've ever tested.
roy Wrote:Sub, would you think this is really a good/safe thing to do? Any potential problems it may cause?
I have set it to do so, and for next failure I'v set the whole computer to reboot. I seems to work.
Sorry to ShiningDragon as I mis read your original post and being a Linux Sysadmin for over 10 years was looking for a batch file solution as that is similar to how it would be done in Linux. I have been running my batch file for several days as wakeup.bat and has already caught a NRecord failure. This particular failure left NPVR.exe "not responding" so I need to also kill then start NPVR.exe. However before I do that I am going to disable my batch file and try ShiningDragon's solution to see how that behaves. If my NRecord crashes cause NTray or NPVR to also crash then I could use the "Run Program" option to run a batch file to restart these also.
sub Wrote:I dont know. It's not something I've ever tested.

Hi Sub,
I'm experiencing the same problem. I don't know if it is resolved.

Anyway, I thought I'd send you my logs.

My last successful recording ended at 6am.

The system seemed to be busy doing EPG updates later. (7:33am)

The next recordings after that all failed.

I'm running 2.2.6 on XP-Pro.