It is currently April 19th, 2024, 5:09 pm

Reset network stats on computer startup

Get help with installing and using Rainmeter.
avhaz
Posts: 4
Joined: April 30th, 2011, 8:39 pm

Reset network stats on computer startup

Post by avhaz »

Hi, I'm really new to Rainmeter and I need some help.
I've been using Samurize until now and I'm now making a Rainmeter version of my configs and stumbled upon a problem.

In Samurize the total download and upload amounts start cumulating when I turn my computer on but in Rainmeter it shows much larger amounts so I'm guessing it starts the cumulation from later in the past.

I found out that you can reset the stats with !RainmeterResetStats, but is there a way to run it once when Rainmeter starts on windows strtup?

Thanks in advance.
User avatar
Falconer
Posts: 115
Joined: August 12th, 2009, 4:10 pm
Location: Behind you!

Re: Reset network stats on computer startup

Post by Falconer »

Hi avhaz, welcome to the forums! :welcome:

You could try using OnRefreshAction under the [Rainmeter] section of a skin. (see here, under "other settings:" http://rainmeter.net/cms/Skins-Rainmeter)

So if you put OnRefreshAction=!RainmeterResetStats under the [Rainmeter] section, that skin will clear the stats when it is first opened and when refreshed. That should include on system startup when rainmeter starts.

That is not quite the same as having the program clear the stats at startup, but it might work; you'll have to try it out. :)
avhaz
Posts: 4
Joined: April 30th, 2011, 8:39 pm

Re: Reset network stats on computer startup

Post by avhaz »

Thanks, that seems to do the job :-)
User avatar
santa_ryan
Posts: 397
Joined: June 22nd, 2010, 4:11 am

Re: Reset network stats on computer startup

Post by santa_ryan »

Or place a shortcut to rainmeter in the startup directory and put !RainmeterResetStats as an argument.
I have three rules when I'm trying to help you.
  • Don't get mad when you don't understand something
  • Be VERY specific with what you ask for.
    The more specific you are, the higher the quality of support you receive.
  • Do not just copy and paste what I put in examples and come back saying it doesn't work.
    It does work, but I purposely left blanks that you need to fill for your specific needs.
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Reset network stats on computer startup

Post by Chewtoy »

The problem with that is that you will reset the stats whenever you restart Rainmeter or refresh it, which might be several times a day.

What you really want is to check the date, see if it's the same as yesterday - if not: reset
I don't think, therefore I'm not.
avhaz
Posts: 4
Joined: April 30th, 2011, 8:39 pm

Re: Reset network stats on computer startup

Post by avhaz »

Well I don't really need to restart or refresh my configs after computer start as they are quite low maintenance so the launch parameter would propably be the best way for me.

Also my system is often up and running for almost a week or so without a restart, so the date checking wouldn't be very useful for me.

Another problem I ran into is that the network stats Rainmeter reports are about twice as high as they really are. I've tried different numbers for the interface but all of them either say 0 or the double value :(
User avatar
Falconer
Posts: 115
Joined: August 12th, 2009, 4:10 pm
Location: Behind you!

Re: Reset network stats on computer startup

Post by Falconer »

santa_ryan wrote:Or place a shortcut to rainmeter in the startup directory and put !RainmeterResetStats as an argument.
Good oh; I'd forgotten you could do that. :)
avhaz wrote: Another problem I ran into is that the network stats Rainmeter reports are about twice as high as they really are. I've tried different numbers for the interface but all of them either say 0 or the double value :(
I'm not a dev so I can't comment on how RM collects its Network stats... though, can you post your skin code (for the skin monitoring network)? And, just out of curiosity, what are you comparing RainMeter's numbers to?
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Reset network stats on computer startup

Post by Chewtoy »

avhaz wrote:Also my system is often up and running for almost a week or so without a restart, so the date checking wouldn't be very useful for me.
In that case it's easier. Just measure Uptime and if Uptime==0, then refresh the stats.
I don't think, therefore I'm not.
avhaz
Posts: 4
Joined: April 30th, 2011, 8:39 pm

Re: Reset network stats on computer startup

Post by avhaz »

Falconer wrote:And, just out of curiosity, what are you comparing RainMeter's numbers to?
I compare it to the numbers the Windows performance reporter (perfmon.exe) reports. I found another forum post that said something about the meter adding the numbers from the physical card and virtual interface on the network card together or something like that.
Anyway, the exact number isn't that important to me so I just ended up dividing the values by 2, it seems to be giving about the same numbers now that perfmon does.
Chewtoy wrote:In that case it's easier. Just measure Uptime and if Uptime==0, then refresh the stats.
Thanks, why didn't I think of that, so simple :D


Thanks all, I've got my configs pretty much identical to the way they were in Samurize and that's all I needed. No help needed here anymore :-)
muneeb_ejaz
Posts: 1
Joined: October 31st, 2014, 4:19 pm

Re: Reset network stats on computer startup

Post by muneeb_ejaz »

This is how you reset statistics on the network statistics

go to manage skin --> Settings tab --> reset statistics

and you are done.