Bookmark and Share

Author Topic: Not displaying stats  (Read 19637 times)

0 Members and 1 Guest are viewing this topic.

Offline George34

  • PcWinTech Member
  • *
  • Join Date: Jun 2012
  • Posts: 8
  • Karma: 0
Not displaying stats
« on: June 21, 2012, 10:38:42 AM »
When I disconnect from a network, SIML does not show statistics in real time (Network Traffic monitor) or updated (Today's Totals monitor) upon reconnection.

This occurs:

1) Whether I reconnect to the same network or a different one.

2) Regardless of length of disconnect.

3) Whether disconnected by choice or failure of network.

I can re-enable the monitor by Stopping it for a bit (required time of stop varies) and Starting monitor again. This is, however, quite annoying and won't give me an accurate running total of data.

Any ideas, folks?
« Last Edit: June 21, 2012, 10:42:11 AM by George34 »

PcWinTech.com Forums

Not displaying stats
« on: June 21, 2012, 10:38:42 AM »

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: Not displaying stats
« Reply #1 on: June 21, 2012, 04:42:43 PM »
The program uses WinPcap to monitor the network packets.

When you disconnect winpcap gets killed. When you reconnect Windows gives the network a new id and the program has to have the list refreshed to get the new ID.

The best way to do it is when you are off the network click stop on the monitor. When reconnected open the monitor and hit refresh on the list and then start the monitor.

I tried finding a good way to have the program uto do this. But I found that it was annoying having it look on a timer when a person isnt on the network. :wink:

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline George34

  • PcWinTech Member
  • *
  • Join Date: Jun 2012
  • Posts: 8
  • Karma: 0
Re: Not displaying stats
« Reply #2 on: June 21, 2012, 05:10:16 PM »
The program uses WinPcap to monitor the network packets.

I understood this from the install, but thanks for the explanation. Some people out there frequently fail to pay attention. However, knowing that SIML uses WinPcap, doesn't mean I fully understand what WinPcap does itself, and I may not need to understand as I won't be writing anything that utilizes it myself anytime soon. :wink:

Is it the same WinPcap from http://www.winpcap.org/ or are there naming conflicts?

Quote from: Shane
When you disconnect winpcap gets killed. When you reconnect Windows gives the network a new id and the program has to have the list refreshed to get the new ID.

What 'new id'? The MAC remains the same and the IP (4 and 6?) does sometimes, although not always.

Quote from: Shane
The best way to do it is when you are off the network click stop on the monitor. When reconnected open the monitor and hit refresh on the list and then start the monitor.

Troublesome and annoying. Not to mention that that would take more power to the memory circuits and I can'na do eet Cap'n.

Quote from: Shane
I tried finding a good way to have the program [a]uto do this. But I found that it was annoying having it look on a timer when a person isnt on the network. :wink:

What is the limitation(s) that you find? Remember, I'm not a programmer, just curiosity. On second thought, after reading (or tying to) the WinPcap site, perhaps it's best if we don't get into the technical aspects of your line of work. I'll stick to the hardware and leave the programming to my father.

Quote from: Shane
Shane

Thanks,
George

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: Not displaying stats
« Reply #3 on: June 22, 2012, 09:23:36 PM »
Quote
Is it the same WinPcap from http://www.winpcap.org/ or are there naming conflicts?

Same one :-)

Quote
What 'new id'? The MAC remains the same and the IP (4 and 6?) does sometimes, although not always.

When I call the Windows API for the adapter list they get reordered every time you connect and disconnect.

Quote
Troublesome and annoying. Not to mention that that would take more power to the memory circuits and I can'na do eet Cap'n.

I havent updated the program in a while, havent needed to. Maybe I can find a better way to handle this :-)

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline George34

  • PcWinTech Member
  • *
  • Join Date: Jun 2012
  • Posts: 8
  • Karma: 0
Re: Not displaying stats
« Reply #4 on: June 23, 2012, 06:46:45 AM »

I havent updated the program in a while, havent needed to. Maybe I can find a better way to handle this :-)

Shane

Thanks and sorry for the trouble.

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: Not displaying stats
« Reply #5 on: June 23, 2012, 05:10:57 PM »
No problem at all :-)

Once I get some free time I will dive into it :wink:

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: Not displaying stats
« Reply #6 on: June 30, 2012, 06:55:42 PM »
I am looking into it now.

Right now the program handles when program comes out of sleep mode and it starts the monitor backup.

So two ways I can try and see if I can get this fixed.

1. See if I can find the code that can read the network adapter connection state. When an adapter disconnects or has a cable unplugged the monitor will stop, when the adapter is connected again it will start the monitor.

2. If I cant find any way to read the state of the adapter I can see if WinPcap reports anything that could let me know when it does.

I will let you know how it goes :wink:

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline George34

  • PcWinTech Member
  • *
  • Join Date: Jun 2012
  • Posts: 8
  • Karma: 0
Re: Not displaying stats
« Reply #7 on: June 30, 2012, 07:12:00 PM »
Cool, thanks, Shane. Let me know if there's any info you could use from me, be glad to help.

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: Not displaying stats
« Reply #8 on: June 30, 2012, 07:14:58 PM »
I will have a test here soon.

I use WMI to pull the connection name like "Local Area Connection"

Well it also has a connection status :-)

So I will have a 5 sec timer that will check the connection status, if it isnt connected it will stop the monitor. When it is connected it will start it back up :-)

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline George34

  • PcWinTech Member
  • *
  • Join Date: Jun 2012
  • Posts: 8
  • Karma: 0
Re: Not displaying stats
« Reply #9 on: June 30, 2012, 07:30:53 PM »
Do you mean that SIML (I assume you would transfer the same to SIM) will check for an active connection every 5 seconds?

Or that while it is checking for a connection it will terminate (hibernate?) if one is not registered within 5 seconds of beginning the check?

If the latter, how often would it check?

For both, would this be taxing on resources and make it counterproductive at all?

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: Not displaying stats
« Reply #10 on: June 30, 2012, 07:32:54 PM »
It will check every 5 sec the current network adapter, and only if you already have the monitor started.

If the connection is disconnected it will click the stop button. When the connection comes back online it will then click the start button. :wink:

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline George34

  • PcWinTech Member
  • *
  • Join Date: Jun 2012
  • Posts: 8
  • Karma: 0
Re: Not displaying stats
« Reply #11 on: June 30, 2012, 07:48:54 PM »
So, for me, since it loads at startup, if I am not connected, it is still looking for a connection. I guess that's basically the function I was asking for, or at least a good way to fix the issue I was complaining about.

But when reading your previous post, I found another question in my brain: Would what I was requesting cause the program to be a resource hog?

Offline Shane

  • Top Geek, err uh Dog.
  • PcWinTech Administrator
  • PcWinTech Guru
  • *******
  • Join Date: Jul 2008
  • Posts: 16,846
  • Location: USA
  • Karma: 523
  • "Knowledge should be shared not hidden."
Re: Not displaying stats
« Reply #12 on: June 30, 2012, 07:52:35 PM »
It shouldnt hurt resources, but while you and I test we will keep an eye out.

Here is a test exe. Replace the exe you have with this one.

I dont know how it will do for startup, but once running kill your connection and see if the monitor stops. Then reconnect and see if it starts back up :wink:

Shane
(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline George34

  • PcWinTech Member
  • *
  • Join Date: Jun 2012
  • Posts: 8
  • Karma: 0
Re: Not displaying stats
« Reply #13 on: June 30, 2012, 08:13:41 PM »
Simple test, and it works. I'll repost whether it works on boot tomorrow.

Thanks, Shane!

[Edit:] Slight issue when changing networks tonight. Maybe due to my using sleep mode (first time using) instead of the usual hibernate or shutdown.
« Last Edit: June 30, 2012, 11:29:21 PM by George34 »

Offline George34

  • PcWinTech Member
  • *
  • Join Date: Jun 2012
  • Posts: 8
  • Karma: 0
Re: Not displaying stats
« Reply #14 on: July 07, 2012, 07:20:47 AM »
Sorry about the wait for status update, I've been somewhat busy.

Anyways, the newer version works ok, with a few hangups that weren't in the last:

  • When resuming from Sleep Mode, the program usually (but not always) freezes.
  • When coming back from Hibernate, an error about SIML already running appears (screenshot attached). Might this be a Windows problem, though?
  • Sometimes, during normal usage and for an unknown reason, the program just stops responding. This is noticed because of no activity and confirmed when clicking on the monitors, because they become subdued.

Thanks for all the effort and sorry about the trouble. But hey, if it were broken, why would we fix it?

PcWinTech.com Forums

Re: Not displaying stats
« Reply #14 on: July 07, 2012, 07:20:47 AM »

 

email