It is currently April 20th, 2024, 5:16 am

Track Download Traffic Usage

General topics related to Rainmeter.
User avatar
Dave_W
Posts: 37
Joined: April 20th, 2009, 10:58 am

Re: Track Download Traffic Usage

Post by Dave_W »

scoop6274 wrote:Thanks for the answer, that clarifies things. However, there is still the issue of getting the month to reset correctly. Is there anyway it could be dependent upon the an IfEqual=#Month# instead of worrying about the number of days in the month.
Just to be clear, the issue with my solution doesn't turn on the number of days in the month - it turns on whether or not you switch on your computer on the first of each month. If you habitually switch on your computer each day (I tend to) then no problems other than holidays, and a middle-click the first time you switch on after your holiday will solve the problem. That's why I never thought about it any further (well, that and it didn't work when first I asked about it...).
scoop6274 wrote:Couldn't it read the information like it does for the calendar and when the month number is no longer equal to what it has been for the previous recording, then it resets the statistics.
Yes, good idea. Something like this (disclaimer: I can never remember when you're meant to use square brackets around a measure that you're using in another measure, so I've almost certainly got that wrong...)?

Code: Select all

[Month]
Measure=calc
Formula=2
DynamicVariables=1

[MonthChecker]
Measure=Time
Format="%H"
IfAboveValue=Month
IfAboveAction=!Execute [!RainmeterSetVariable Month [MonthChecker]] [!RainmeterResetStats]
DynamicVariables=1

[HappyNewYear]
Measure=calc
Formula= tMonth=12 && MonthChecker=1 : !Execute [!RainmeterSetVariable Month 1] [!RainmeterResetStats] : 0
Subject to my coding errors, I think that does the job. [Month] is a defined variable (starting at 2, since it's February). [MonthChecker] is the month number - if it's greater than [Month] then it sets [Month] to be equal with it, and resets the stats.

The third meter is purely to deal with the situation where [MonthChecker] ticks over from 12 back to 1, which obviously won't trip the IfAboveValue trigger.
scoop6274 wrote:It would also be nice if it could output to a text file with each month listed differently so that one could look at it over a year and if you have multiple computers in your network, you could look at the statistical usage per computer and add them up for all computers.
Hah! Yes, it would be nice. I'm not volunteering for that one, though - at some point in time I intend to get a compatible router and install Tomato or DDWRT in order to have that level of insight into my traffic!
shiraz07
Posts: 56
Joined: June 21st, 2009, 3:00 pm

Re: Track Download Traffic Usage

Post by shiraz07 »

I've made a screenshot of how i've set my desktop at the minute with Dave_W's config bottom right tab thingy displaying 0GB.I reset it to zero to see if it will work.Guess i wont know until 1GB of down traffic is recorded.
Is that how it should look!!?Thanks

User avatar
Dave_W
Posts: 37
Joined: April 20th, 2009, 10:58 am

Re: Track Download Traffic Usage

Post by Dave_W »

shiraz07 wrote:Is that how it should look!!?
The config that I wrote in this thread only displays a number and "GB", yes. You can add another meter, if you like, that says "Downloads" or has a network icon or an arrow or something. Anything you want, really!
shiraz07 wrote:I reset it to zero to see if it will work.Guess i wont know until 1GB of down traffic is recorded.
If you're anxious to check it, edit the ini to take a zero or two out of the 100000000 number in the [GB Converter] measure. Obviously it won't then be measuring GBs, but it will show you whether the number keeps going upwards with your download traffic - once you're happy with it, go back and add the zero or two back into that number.
shiraz07
Posts: 56
Joined: June 21st, 2009, 3:00 pm

Re: Track Download Traffic Usage

Post by shiraz07 »

Thanks so much again for your help on this.I've added 2 decimal points to the .ini & got it looking something like this & appearing to be working well:

User avatar
Dave_W
Posts: 37
Joined: April 20th, 2009, 10:58 am

Re: Track Download Traffic Usage

Post by Dave_W »

Good work - looks really nice.

Would you mind posting the full skin code here so that anyone reading the thread can see the final code for a working skin?
shiraz07
Posts: 56
Joined: June 21st, 2009, 3:00 pm

Re: Track Download Traffic Usage

Post by shiraz07 »

Absolutely.Before you suggested a Download arrow i added text,NET IN/MTH so part of the code incorporates that.Dave, if you see any glaring errors give me a shout.I like an embossed look so thats why each part is 'tripled'.

Code: Select all

[Rainmeter]

[Variables]
Font=MINI 7 Condensed

[MeterBG]
Meter=IMAGE
ImageName=Dock Black.png

[DownIcon]
Meter=IMAGE
ImageName=down.png
X=28
Y=25
W=48
H=48

[DL]
Measure=NetIn
Cumulative=1

[Reset] 
Measure=Time 
Format=%d 
IfEqualValue=1 
IfEqualAction=!RainmeterResetStats

[GBConverter]
Measure=Calc
Formula=DL/1000000000

[NetMeter]
Meter=STRING
MeasureName=GBConverter
X=20
Y=48
FontColor=000000
FontFace=#Font#
FontSize=5
StringStyle=NORMAL
StringAlign=Center
AntiAlias=0
Angle=4.712388980373
NumOfDecimals=2
Text=%1 GB
LeftMouseDownAction=!RainmeterResetStats

[NetMeter2]
Meter=STRING
MeasureName=GBConverter
X=0r
Y=1r
FontColor=000000
FontFace=#Font#
FontSize=5
StringStyle=NORMAL
StringAlign=Center
AntiAlias=0
Angle=4.712388980373
NumOfDecimals=2
Text=%1 GB
LeftMouseDownAction=!RainmeterResetStats

[NetMeter3]
Meter=STRING
MeasureName=GBConverter
X=1r
Y=0r
FontColor=777777
FontFace=#Font#
FontSize=5
StringStyle=NORMAL
StringAlign=Center
AntiAlias=0
Angle=4.712388980373
NumOfDecimals=2
Text=%1 GB
LeftMouseDownAction=!RainmeterResetStats



[Meter.txt]
Meter=STRING
X=50
y=48
FontColor=000000
StringStyle=NORMAL
StringAlign=Center
FontSize=5
FontFace=#Font#
Angle=4.712388980373 
AntiAlias=0
Prefix=

[Meter.txt2]
Meter=STRING
X=0r
y=1r
FontColor=000000
StringStyle=NORMAL
StringAlign=Center
FontSize=5
FontFace=#Font#
Angle=4.712388980373 
AntiAlias=0
Prefix=

[Meter.txt3]
Meter=STRING
X=1r
y=0r
FontColor=575757
StringStyle=NORMAL
StringAlign=Center
FontSize=5
FontFace=#Font#
Angle=4.712388980373 
AntiAlias=0
Prefix=
Last edited by jsmorley on February 23rd, 2010, 6:25 pm, edited 1 time in total.
Reason: Added [code][/code] tags
shiraz07
Posts: 56
Joined: June 21st, 2009, 3:00 pm

Re: Track Download Traffic Usage

Post by shiraz07 »

From March 1st comparing the two meters.Both zeroed as of that date but there's a variance between them in that Rainmeter displays 4.71GB & BitMeter 4.38GB down.No idea which of the two is the more accurate but it's near enough i guess.
User avatar
Dave_W
Posts: 37
Joined: April 20th, 2009, 10:58 am

Re: Track Download Traffic Usage

Post by Dave_W »

shiraz07 wrote:From March 1st comparing the two meters.Both zeroed as of that date but there's a variance between them in that Rainmeter displays 4.71GB & BitMeter 4.38GB down.No idea which of the two is the more accurate but it's near enough i guess.
Hi mate - simple answer here. It's what I was getting at when I wrote in my original post "(note: I've assumed that you do want GigaBYTES, not GigaBITS - change 1000000000 to 1073741824 if the latter)."

Both Rainmeter and Bitmeter are keeping track of every byte that you download. Rainmeter is then dividing by 1,000,000,000 to give you the figure in GigaBYTES (GB), BitMeter is dividing by 1,073,741,824 to give you the figure in GigaBITS (GiB). The problem is that people often confuse the two and write GB when they really mean GiB - you'll have to dig into your ISP's t&cs to find out if your download cap is GB or GiB and then decide what figure you should use.

For more "fascinating" information on gigabytes and gigabits, have a look at the wiki page.


Edit to add: Yes, yes, stop laughing - gigabit is wrong. See discussion on following page.
Last edited by Dave_W on August 5th, 2010, 2:00 pm, edited 1 time in total.
shiraz07
Posts: 56
Joined: June 21st, 2009, 3:00 pm

Re: Track Download Traffic Usage

Post by shiraz07 »

Hey mate,thanks again & for the link to wiki.I stupidly overlooked your original post purely because i assumed it would be gigabytes because i'd never heard of gigabits.
I've adjusted the figure & the two now match exactly.I can close & discard BitMeter now knowing Rainmeter will track it flawlessly...& use far less memory too!
User avatar
Dave_W
Posts: 37
Joined: April 20th, 2009, 10:58 am

Re: Track Download Traffic Usage

Post by Dave_W »

That's the beauty of Rainmeter!

Glad it's working for you.