Kitz Forum

Broadband Related => Router Monitoring Software => Topic started by: WWWombat on May 09, 2014, 03:14:17 PM

Title: HG612 Modem Stats - not gathering stats
Post by: WWWombat on May 09, 2014, 03:14:17 PM
I thought it was well nigh on time that I should try running the newer version of ModemStats, and turn on the automatic logging. For a long time now, I've just relied on the old version, and irregular manual snapshots.

Unfortunately, it just doesn't seem to gather any stats, and displays nothing in the "Connection Stats" or "pbParams" tabs.

- Ronski's stats viewer is running fine, and lets me create a scheduled task
- I have turned on the "ongoing stats" task, with the "snapshot" task off
- Once I create the scheduled task, but before anything runs, the "display task info" page shows a "last result" of "1"
- At the next minute, a "HG612_Run.exe" process appears in the windows task manager. It doesn't disappear, and the "last result" shows as "267009"
- At the next minute, the "last result" changes to -2147216609. The results stay this way forever more, even though the last run time increments.

If I delete the scheduled task, the HG612_Run process continues to run. If I create the task again, then the first execution (ie the next minute) jumps straight to the last step of the list above.

If I manually end the HG612_Run process, the sequence starts at the second-last step.

As far as I can make out, 267009 = 0x41301, and means "The task is currently running."
-2147216609 = 0x8004131F (in 32 bits), which means "An instance of this task is already running."

I guess that means the first instance never runs to completion, and is stuck somewhere. Subsequent executions then fail to even start.

Any ideas where to look next?

Manually hitting the "Run snapshot stats" button does work.
And this is on Windows 7.
Title: Re: HG612 Modem Stats - not gathering stats
Post by: Bald_Eagle1 on May 09, 2014, 03:53:52 PM
Hi WWW & welcome to the forum.

I take it by newer version you mean 2.0?

I will be releasing v 2.1 in the very, very near future, subject to the results of a couple of final tests.

v 2.1 includes a bit more in the way of error handling, now hopefully closing the ongoing data harvesting program (HG612_stats.exe) rather than it end up 'stuck' in an unending loop.

I don't know whether you use a fast or a slow PC, but the program now has a user selectable option to accommodate fast PCs as 'sometimes' the PC attempts to harvest data before the modem can actually provide it.

You are welcome to try the v 2.1 pre-release beta versions, which no matter how hard I have tried, can't get them to fail or end up 'stuck' at my end.

If you do wish to try them out, let me know & I'll post them here.


 
Title: Re: HG612 Modem Stats - not gathering stats
Post by: WWWombat on May 09, 2014, 04:29:44 PM
Yes - the switch was to start using v2.0.

It is running on pretty modern hardware that I'd rate as "fairly fast" but not outlandish - an AMD A8-5600k at 3.6GHz, with 4 cores. The windows experience rates the processor & memory at 7.3 and 7.2. Is that enough to require a "fast" rating for the stats?

Should I expect HG612_Run to terminate at all? Does it trigger HG612_stats?

I can certainly give v2.1 a go, and see what happens...
Title: Re: HG612 Modem Stats - not gathering stats
Post by: WWWombat on May 09, 2014, 04:38:20 PM
And thanks for the welcome. It probably is about time I registered here too...
Title: Re: HG612 Modem Stats - not gathering stats
Post by: Bald_Eagle1 on May 09, 2014, 04:50:43 PM
Yes - the switch was to start using v2.0.

It is running on pretty modern hardware that I'd rate as "fairly fast" but not outlandish - an AMD A8-5600k at 3.6GHz, with 4 cores. The windows experience rates the processor & memory at 7.3 and 7.2. Is that enough to require a "fast" rating for the stats?


It's possibly fast enough to need some intervention.

I class my PC as 'reasonable' spec - Intel core i3U at 3.2 GHz

Its ratings are processor 7.0, memory 5.5 (3.00 GB RAM).

My system does NOT need any speed intervention, but some systems apparently do.

The PC speed setting is a very, very recent addition, so it's slightly experimental at the moment.


Quote
Should I expect HG612_Run to terminate at all? Does it trigger HG612_stats?


HG612_Run should indeed terminate (as should HG612_stats) & yes, it is simply the trigger to run HG612_stats 'silently' in the background.
There are other ways of doing it, but using HG612_Run as the trigger appears to work for all flavours of Windows, XP upward.



Quote
I can certainly give v2.1 a go, and see what happens...


O.K. I'll post the beta programs shortly, with a very brief guide on what the various ini file settings do.

Title: Re: HG612 Modem Stats - not gathering stats
Post by: Bald_Eagle1 on May 09, 2014, 05:10:24 PM
Here are the data harvesting/graphing beta programs.

See my next post for the GUI & its new settings.


Title: Re: HG612 Modem Stats - not gathering stats
Post by: Bald_Eagle1 on May 09, 2014, 05:12:01 PM
Here's the GUI program.

Please note that it is very new & still needs a very minor tweak here & there, but it does work.
Title: Re: HG612 Modem Stats - not gathering stats
Post by: Bald_Eagle1 on May 09, 2014, 05:14:17 PM
See the attached screenshots for the 'new' settings.

Ignore the fact that the task is disabled as this is from my testing version.


Different modems can now be selected, to include the new addition of the ZyXEL VMG8324-B10A.
The default is HG612.

Extensive error & extra debugging logging can be turned OFF to reduce file sizes, but I would advise leaving them ON for a while for testing/debugging purposes.


The location of the ongoing modem_stats.log can now be specified.
The default is still whatever was originally specified as the Ongoing stats folder.

ONGOING_ISRUNNING files are now 'always' deleted (unless the program crashes).
A record of these is mantained in a separate log whenever 2 task instances attempt to start during the same minute.
(This is a Windows bug. There is a Microsoft hotfix for it, but the program now handles it 'properly', so there is no real need to install the hotfix).

The vast majority of the event/error logs are now grouped in a folder named Event & Error Logs to make it 'easier' to find them.
That folder is not user selectable as it is always a sub-folder of the main folder.


HTH, but if not, please feel free to ask.

EDIT:

I run the programs with a SLOW PC Speed setting here, but you can choose MEDIUM or FAST if your PC is 'too' fast for the modem.

Please let me know how you get on with these programs, in case I need to make any final adjustments prior to final release.



Title: Re: HG612 Modem Stats - not gathering stats
Post by: WWWombat on May 09, 2014, 07:18:45 PM
A quick reply, as I have to play taxi driver shortly...

The PC is still showing the same symptoms, and do so with both fast & medium settings (didn't try slow yet).
No error files anywhere obvious, but I'll check more carefully later.
Title: Re: HG612 Modem Stats - not gathering stats
Post by: kitz on May 09, 2014, 08:22:47 PM
Quote
If I delete the scheduled task, the HG612_Run process continues to run.

How did you delete the scheduled task? via the gui or via windows?

When I updated to v2 I deleted the scheduled task from within windows task manager rather than the GUI..
I actually started everything fresh aside from transfering across my Ongoing_stats & Current_stats folders.


Basically everything I did when upgrading is in the step by step guide here (http://www.kitz.co.uk/routers/hg612stats_setup.htm), only Id first removed the task as detailed at the bottom of the page.

Hiyas btw.. theres a name I recognise from elsewhere ;)   Nice to see you here :)
Title: Re: HG612 Modem Stats - not gathering stats
Post by: Ronski on May 09, 2014, 10:29:28 PM
Hi WWWombat, nice to see you on the forums.

Sorry to hear your having problems, only thing I can think of at the moment is that it's possible your anti virus is blocking the programs from running, so would be worth checking there.

The other thing which could shed some light on the problem is running HG612_stats.exe directly from a cmd prompt, this allows you to see whats happening. But if there are no logs at all then it suggests the programs not being run for some reason.
Title: Re: HG612 Modem Stats - not gathering stats
Post by: Bald_Eagle1 on May 09, 2014, 10:53:36 PM
It might just be worth renaming/deleting the existing modem_stats.log & allowing the program to create a new one from scratch.

you could always run HG612_stats.exe directly.
By doing that you should see the output from the program that might give a clue as to how far it gets.



Alternatively, from a command prompt, from within the Scripts folder you could direct the output to a file for easier viewing by typing this:-

HG612_stats.exe > HG612_stats.TXT


Title: Re: HG612 Modem Stats - not gathering stats
Post by: WWWombat on May 10, 2014, 07:26:12 PM
@Kitz

Do you mean task manager (which seems to be the windows tool to monitor/kill applications & processes) or task scheduler?

When I create & delete the task, in the normal course of things, it is with the GUI tool. I can see the task in the Windows task scheduler, where I have turned on logging to watch the results there, but I don't do any manipulation there.

However, I'm not sure what happened when I first started V2; if I ever ran the task on this PC it was a long, long time ago. When I did use it, I'm sure it was a different PC, and it had problems in making the PC unusable so I stopped it. As I didn't think I needed to do anything to stop an old V1 task, I did nothing... but come to think of it, the first time I looked at the task manager (the one that lets you kill processes), I have a feeling that there were two HG612_Run.exe processes that needed killing.

How can I check that I haven't left something lying around?
Title: Re: HG612 Modem Stats - not gathering stats
Post by: WWWombat on May 10, 2014, 07:42:50 PM
@Ronski & @BE

There's no AV running on here at the moment.

I already renamed the old modem_stats.log file, as the old format wasn't liked by the GUI tool; my main tests were carried out with an empty Ongoing_Stats folder.

With running the HG612_stats.exe manually, I get a perfectly good result. It runs through the 38 steps (why not 39?), and creates the two expected logfiles in Ongoing_Stats, alongside an ERROR logfile with a line showing "reply(config.Shell) O.K. Status = 1. " I then get to see the data in the two tabs of the GUI tool.

Running it a second time adds a line to the modem_stats.log file

So the problem seems to be that HG612_Run never actually starts HG612_stats, or at least doesn't do so in a way that works, or gets included in the windows task manager.
Title: Re: HG612 Modem Stats - not gathering stats
Post by: Ronski on May 10, 2014, 07:56:53 PM
The stats logging is only triggered by a scheduled task, so to see if anything is left laying around have a look through the scheduled tasks in task scheduler.

Try manually editing the scheduled task via task scheduler so that it runs HG612 stats.exe directly.

I have a vague idea someone else had a problem with the Run program.
Title: Re: HG612 Modem Stats - not gathering stats
Post by: kitz on May 10, 2014, 08:05:48 PM
@Kitz

Do you mean task manager (which seems to be the windows tool to monitor/kill applications & processes) or task scheduler?


Oops I did mean task scheduler..   :-[  I linked to a guide where I showed how to manually amend the HG612 Stats Program from within Task Scheduler.

Quote
Task Scheduler -  Manual changes to Windows Task Scheduler can be done via

    Control Panel > All Control Panel Items > Administrative Tools

Click the "Task Scheduler Library" folder (not Local) and look for "HG612 Stats Program"
Title: Re: HG612 Modem Stats - not gathering stats
Post by: Bald_Eagle1 on May 10, 2014, 09:42:51 PM

With running the HG612_stats.exe manually, I get a perfectly good result. It runs through the 38 steps (why not 39?)


I might add a dummy 39th step just for you.
I wonder if any of the younger readers know what we're on about ???


Quote
, and creates the two expected logfiles in Ongoing_Stats, alongside an ERROR logfile with a line showing "reply(config.Shell) O.K. Status = 1. "


That ERROR file is the wrong one.
That line should end up in the file of the same name, but in the Event & Error Logs folder.

I had forgotten to direct that information to the correct file in the 'new' logs folder  :-[

That shouldn't have caused a problem though & I have fixed it now that you have alerted me to it.



Quote
I then get to see the data in the two tabs of the GUI tool.

Running it a second time adds a line to the modem_stats.log file

So the problem seems to be that HG612_Run never actually starts HG612_stats, or at least doesn't do so in a way that works, or gets included in the windows task manager.

Do you actually have HG612_Run.exe in the Scripts folder?

I have attached a definitely working copy just in case it's missing/corrupted.




What happens if you double-click HG612_Run.exe directly from the Scripts folder?

You shouldn't see anything on screen, but it should run HG612_stats.exe silently, with the various log files updated accordingly.



One thing that MIGHT cause the task not to run is how it was set up via the GUI.

If you chose not to enter a password, but you actually use one when logging in to Windows, the task would have been set up, but probably not to run.


See the attached screenshot of the Task Scheduler's 'General' tab - from my own Windows 7 machine.
I need to enter a username & password when logging in to Windows, but the task was created with the Run whether user is logged on or not option already selected.


It might be handy if you could post a copy of your HG612_stats.ini file for us to have a close look - just in case..........

Title: Re: HG612 Modem Stats - not gathering stats
Post by: Bald_Eagle1 on May 11, 2014, 12:13:34 AM
I know you have mentioned that you don't have an AV program running, but do you have a firewall running (ZoneAlarm etc.) that might be blocking HG612_Run.exe, but not blocking HG612_stats.exe?


Title: Re: HG612 Modem Stats - not gathering stats
Post by: WWWombat on May 11, 2014, 12:19:02 AM
Just tried double-clicking on HG612_Run, and that works fine. Windows first asks me to confirm that it is allowed to run, immediately followed by checking that HG612_stats is allowed to run.

I'll double-check options tomorrow, to see if it is something to do with this interactive check, the login, or the firewall.

Ta
Title: Re: HG612 Modem Stats - not gathering stats
Post by: Bald_Eagle1 on May 11, 2014, 12:31:42 AM
May be a UAC setting?

http://windows.microsoft.com/en-gb/windows/turn-user-account-control-on-off#1TC=windows-7

See the attached for the setting on my own Windows 7 machine.

Title: Re: HG612 Modem Stats - not gathering stats
Post by: Bald_Eagle1 on May 11, 2014, 08:56:12 AM
Just tried double-clicking on HG612_Run, and that works fine. Windows first asks me to confirm that it is allowed to run, immediately followed by checking that HG612_stats is allowed to run.

I'll double-check options tomorrow, to see if it is something to do with this interactive check, the login, or the firewall.

Ta


Has manually running & allowing those programs now permanently triggered it all into 24/7 action?

If so, that will be useful information to note for any new users who might experience a similar issue.

It may even be required whenever one of those programs is updated (for *some* users).



My AV program (AVG) used to occasionally do that when I updated one or other of the programs, something to do with AVG's identity protection checks.

Title: Re: HG612 Modem Stats - not gathering stats
Post by: Ronski on May 11, 2014, 09:24:57 AM
Just tried double-clicking on HG612_Run, and that works fine. Windows first asks me to confirm that it is allowed to run, immediately followed by checking that HG612_stats is allowed to run.

I'll double-check options tomorrow, to see if it is something to do with this interactive check, the login, or the firewall.

Ta

I believe you should now find it will run ok, although when it asks you is there an option to remember your choice?

I seem to remember having something similar on my works pc, had to run the current stats,  and HG612 stats manually and ok them,  don't recollect a problem with HG612 run though. We do use AVG at work so it may have been that rather than windows.

Title: Re: HG612 Modem Stats - not gathering stats
Post by: WWWombat on May 11, 2014, 01:52:15 PM
My UAC setting matched yours, BE.

Manually triggering the program did not cause it to spring into action - it only runs when I trigger it manually, and continues to not run otherwise.

However, I have got it to trigger, somewhat...

I deleted the task, and re-created it with no password whatsoever. In that guise, HG612_Run seems to execute. It then triggers HG612_stats, which triggers a pop-up confirmation because the publisher could not be identified. I've left this manual for now, and will get back to see what happens later (I'm not sure how to undo my choice, once I tell it to no longer ask me).

(Obviously without changing the manual pop-up, I can't logout and check that logging works - failure could then be caused by password or by pop-up.)

When I delete the task, and re-schedule it with my normal password, the problem returns.

Any ideas?

I think I should try setting either HG612_Run or HG612_stats so that it no longer asks for permission to execute. Any preferences for which I should set first?

(Also, I do notice one thing: When I give HG612_stats permission to run (ie scheduled without password), I get 3 beeps on the audio, about 3 seconds later. Is this to be expected?)
Title: Re: HG612 Modem Stats - not gathering stats
Post by: Bald_Eagle1 on May 11, 2014, 02:28:48 PM

I think I should try setting either HG612_Run or HG612_stats so that it no longer asks for permission to execute. Any preferences for which I should set first?


Both need permission to execute.
I can't imagine it will make any difference which one gopes first, but in order of program flow, HG612_Run is first & Hg612_stats is second.

You might need to stop any logging attempts/delete the task again first.


This isn't a problem that I'm familiar with.
Does this link give any clues:-

http://www.sevenforums.com/tutorials/124367-open-file-security-warning-unblock-file.html





Quote
(Also, I do notice one thing: When I give HG612_stats permission to run (ie scheduled without password), I get 3 beeps on the audio, about 3 seconds later. Is this to be expected?)



The HG612's raw logging in data includes a bell/beep character that isn't displayed via Telnet access.

Depending on the debugging / event logging options selected, the program will sometimes display that character & thus you can hear it.


When HG612_stats.exe is running 'silently' (via HG612_Run.exe or directly via the 'appropriate' Task Scheduler settings), we don't see it & we also don't hear it.


For my own curiosity, once you have told Windows to no longer ask you whether to run the programs or not, why would you wish to undo your choice?


Title: Re: HG612 Modem Stats - not gathering stats
Post by: WWWombat on May 11, 2014, 06:36:15 PM
For my own curiosity, once you have told Windows to no longer ask you whether to run the programs or not, why would you wish to undo your choice?
Long term, I won't want to.

However, to work out the cause of this issue, I should probably try things out with the different combinations of permission, so we can work out what the real cause is, and warn other in future. To do that, I need to be able to give permission to one, but not the other, and then undo my choice to swap over.

"completeness" is probably the answer.
Title: Re: HG612 Modem Stats - not gathering stats
Post by: Ronski on May 11, 2014, 07:45:15 PM
Perhaps one way to do it is to create a system restore point, then do your testing and then restore.

Any chance of a screen shoot of what pops up - just use the snipping tool?
Title: Re: HG612 Modem Stats - not gathering stats
Post by: Chrysalis on May 15, 2014, 07:13:26 PM
Bald eagle, if I upgrade to this version does it have all the fixes you made for me included?
Title: Re: HG612 Modem Stats - not gathering stats
Post by: Bald_Eagle1 on May 15, 2014, 07:54:03 PM
Bald eagle, if I upgrade to this version does it have all the fixes you made for me included?



Yes, it should include them, plus a few other 'improvements'.

It was actually your feedback/issues that prompted some of the changes.
Thanks for flagging them up for me.

v 2.1 final public release is due this week, including RONSKI's updated GUI that enables the new options, such as choosing a FAST PC setting to slow the programs down to the speed that the modem can actually provide the stats (clearly needed for your super-duper speed PC).


Unless the programs actually crash & end up 'stuck' (they shouldn't as I've included more/better handling code), there will be no more leftover ONGOING_ISRUNNING files either.
The events that caused those will now be included in a new log file to keep a record.

An updated ini file is needed to make the most of the new options.
A template with default settings will be included in v 2.1 or using the updated GUI will create one.

The attached screenshot shows that my PC's speed has been set to SLOW as that works best with my setup.

The MEDIUM PC Speed setting might work O.K. for your setup, but I reckon the FAST PC Speed setting is possibly the most appropriate setting to use as the best compromise between speed & reliability.



Title: Re: HG612 Modem Stats - not gathering stats
Post by: Ronski on May 15, 2014, 08:34:51 PM
v 2.1 final public release is due this week, including RONSKI's updated GUI that enables the new options, such as choosing a FAST PC setting to slow the programs down to the speed that the modem can actually provide the stats.

The new version is up on Freeware files now as I've just uploaded it, BE1 you have email if you've not yet seen it yet. I'm sure BE1 will create a new thread for V2.1 (http://forum.kitz.co.uk/index.php?topic=13974.msg262659#msg262659) shortly  ;D
Title: Re: HG612 Modem Stats - not gathering stats
Post by: Chrysalis on May 15, 2014, 09:09:45 PM
sounds good.
Title: Re: HG612 Modem Stats - not gathering stats
Post by: Bald_Eagle1 on May 16, 2014, 08:20:17 AM
sounds good.



I'd be really interested to see your CURRENT_ERROR.LOG_file_ERROR.TXT & ONGOING_ERROR.LOG_file_ERROR.TXT logs to see how the new settings are coping with your fast PC.

You'd need Extensive error logging & Extra debugging info turned ON for us to see all the relevant & detailed info.

The 2 named files above can rapidly grow in size, so once we are certain that everything is fine, you could turn those logging options off & then compare how things 'change' program performance-wise (just in case turning them off speeds things up too much).

   

Title: Re: HG612 Modem Stats - not gathering stats
Post by: NewtronStar on May 17, 2014, 12:07:27 AM
V2.1 has been working well here after update as of yesterday on Vista and Windows 8.1 on my slow PC.

Thankyou BE1
Title: Re: HG612 Modem Stats - not gathering stats
Post by: Bald_Eagle1 on May 17, 2014, 12:55:59 AM
Thanks for the deedback, NS.

That's good to hear, especially for W 8.1 as I don't have that myself for testing on.