bmcapture process stops monitoring sometimes #30
Comments
Similar issues reported on Windows 7 after waking from hibernation. Errors in log file on windows relating to bpf compilation problems (see http://codebox.org.uk/forum/posts/list/0/28934.page#40454) which do not appear on OSX, so this may be 2 separate problems |
I see this on Win7 and Win10, with Bitmeter 0.8.0. It happens after shutdown as well as hibernate. The forum link above shows a blank page for me. Restarting the service restarts data capture. I tried setting up a scheduled task to restart the process on Workstation Unlock event but it had no effect. I couldn't find a reason (hard to troubleshoot scheduled tasks; you have to add your own error logging etc.), but suspect it's around elevated permissions. I also tried putting the restart batch file in the Startup group (and learned this pro tip: WorkaroundCreate a shortcut to this batch file and under Advanced properties check "Run as administrator", and run on-demand as needed.
Yesterday I found a post somewhere on Stack Overflow or Server Fault about a possible race condition with services using winpcap. I can't find it again (on a different computer and no access to browser history), but the gist of it was that you needed to start winpcap after the dependent service. I remember it because that order seemed odd to me, because it's the reverse of how I normally think of dependencies. |
Finally found the log file (should have read the FAQ first, sorry), it doesn't say much:
The same faq shows |
I have a working scheduled task! Fix was to use the Powershell Restart-Service cmdlet instead of my batch file. For debugging the scheduled task you might want/need to enable task history logging. I have it set to trigger on Startup (30s delay), Logon, and Workstation Unlock, and runs under SYSTEM account with highest privileges. Only condition is "run only if any network connection" The command is simply To test:
The task definition for easy importing: https://gist.github.com/maphew/3c58576f50ebd7513fa6 |
It is an old topic but the problem is current. There is a simpler solution I have found. Simply making the batch file as nominated and running as Admin works, but we're lazier than that right? First, to clarify - Go to the Task Scheduler and right click in Library and Create Basic Task. Describe it as you like, but use this info: @:: restart-bitmeter-capture-service.bat, save in BitMeter OS install folder no arguments or start-in info needed All other defaults are OK, as best I remember. Hope this helps. Enjoy! Edit: Nope, forgot to add a trigger for "On Log on of any user". You need this too! Just edit properties of the task and add it on the trigger tab. |
bmcapture process stops monitoring sometimes (on OSX, and possibly others, all pcap thread stop, leaving only main thread running)
The text was updated successfully, but these errors were encountered: