It is currently May 7th, 2024, 4:00 pm

Net Traffic totals

Get help with creating, editing & fixing problems with skins
sgtevmckay

Net Traffic totals

Post by sgtevmckay »

Hello folks, it has been awhile since I have posted here :oops:

Using the NetIn and NetOut
I can get current measurements of network traffic.
I am looking to acquire traffic totals of both up and down stream

I just tried Cumulative, but this will add up current traffic measures, say for someone who has multiple Cards or wireless connections on their system



This is not what I am looking for

I am looking for a way to return the total of both NetIn and NetOut based on current system run.

ie. Before I shut down my system, I would like to know if I have downloaded 20G and upload 600K or what.

Thoughts???
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Net Traffic totals

Post by jsmorley »

That is not my understanding of Cumulative=1, but I could be wrong.

My understanding is that is is used to "add up" the values of the NetIn or NetOut or NetTotal measure it is on over time, so on each "Update" of the measure, you get a new "total" that includes all that came before, which seems to me to be just what you want.

I'm not 100% sure exactly how NetStats in Rainmeter.ini factors into this, although I gather those are there to give "persistence" to this until you send a !RainmeterResetStats to it.
sgtevmckay

Re: Net Traffic totals

Post by sgtevmckay »

Indeed...I would have thought the same, but after experimenting on my desktop here and the laptop, that has three connects, I have determined that Cumulative actually appears to up all live connections.

The following image has been going since initial post (approximately 20 minutes), in that time I just uploaded 33M:



Also: as you can see the Cumulative areas numbers match the current NetIn and NetOut measurements.
So Cumulative is not adding up a continuous total.

It would be nice in the NetIn and NetOut could do this naively, but I am also wondering if there is not a way to derive this total via another plugin measure
sgtevmckay

Re: Net Traffic totals

Post by sgtevmckay »

apologies.

Code below represents the example skin I am testing on:

Uploaded wrong code before. Correct code in spoiler now :oops:

Code: Select all

[Variables]
fontColor.Text=255, 255, 255, 160
bar.color=255, 255, 255, 50
graph.line1=255, 255, 255, 75
graph.line2=255, 255, 255, 37

FontName=Tahoma
FontHeight=8
AntiAlias=1

;===========================================
;  Download + Upload Network Traffic Display
;===========================================


[TCPIn]
Measure=NetIn

[TCPInAll]
Measure=NetIn
Cumulative=0

[TCPOut]
Measure=NetOut

[TCPOutAll]
Measure=NetOut
Cumulative=0

[NetworkTrafficDL.txt]
Meter=STRING
X=5
Y=14
FontColor=#fontColor.Text#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1
Text="Network Traffic DL"

[Network.Traffic.Dl.All.txt]
Meter=STRING
MeasureName=TCPInAll
X=155
Y=0r
FontColor=#fontColor.Text#
FontSize=#FontHeight#
FontFace=#FontName#
StringAlign=Right
AntiAlias=1
AutoScale=1
NumOfDecimals=2
LeftMouseDownAction=!RainmeterResetStats

[Network.Traffic.Dl.txt]
Meter=STRING
MeasureName=TCPIn
X=5
Y=14r
FontColor=#fontColor.Text#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1
AutoScale=1
NumOfDecimals=1

[NetworkTrafficUP.txt]
Meter=STRING
X=5
Y=20r
FontColor=#fontColor.Text#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1
Text="Network Traffic UP"

[Network.Traffic.Up.All.txt]
Meter=STRING
MeasureName=TCPOutAll
X=155
Y=0r
FontColor=#fontColor.Text#
FontSize=#FontHeight#
FontFace=#FontName#
StringAlign=Right
AntiAlias=1
AutoScale=1
NumOfDecimals=2

[Network.Traffic.Up.txt]
Meter=STRING
MeasureName=TCPOut
X=5
Y=14r
FontColor=#fontColor.Text#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1
AutoScale=1
NumOfDecimals=1

[Network.Traffic.Dl.graph1]
Meter=Line
MeasureName=TCPIn
X=30
Y=4
H=43
W=180
LineCount=1
LineColor=#graph.line1#
AntiAlias=1
AutoScale=1

[Network.Traffic.Dl.graph2]
Meter=HISTOGRAM
MeasureName=TCPIn
X=30
Y=4
H=42
W=180
PrimaryColor=#graph.line2#
AntiAlias=1
AutoScale=1

[Network.Traffic.Up.graph1]
Meter=Line
MeasureName=TCPOut
X=30
Y=39
H=43
W=180
LineCount=1
LineColor=#graph.line1#
AntiAlias=1
AutoScale=1

[Network.Traffic.Up.graph2]
Meter=HISTOGRAM
MeasureName=TCPOut
X=30
Y=39
H=42
W=180
PrimaryColor=#graph.line2#
AntiAlias=1
AutoScale=1
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Net Traffic totals

Post by jsmorley »

Code: Select all

[Rainmeter]
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,255
Update=1000
OnRefreshAction=!RainmeterResetStats

[MeaaureNetInNow]
Measure=NetIn
Interface=3

[MeaaureNetOutNow]
Measure=NetOut
Interface=3

[MeaaureNetInRunning]
Measure=NetIn
Cumulative=1
Interface=3

[MeaaureNetOutRunning]
Measure=NetOut
Cumulative=1
Interface=3

[MeterInNow]
Meter=String
MeasureName=MeaaureNetInNow
X=0
Y=1R
FontSize=12
FontColor=255,255,255,255
AutoScale=1
AntiAlias=1

[MeterOutNow]
Meter=String
MeasureName=MeaaureNetOutNow
X=0
Y=1R
FontSize=12
FontColor=255,255,255,255
AutoScale=1
AntiAlias=1

[MeterInRunning]
Meter=String
MeasureName=MeaaureNetInRunning
X=0
Y=1R
FontSize=12
FontColor=255,255,255,255
AutoScale=1
AntiAlias=1

[MeterOutRunning]
Meter=String
MeasureName=MeaaureNetOutRunning
X=0
Y=1R
FontSize=12
FontColor=255,255,255,255
AutoScale=1
AntiAlias=1
Be aware that this will start you off fresh when loaded or refreshed, due to the statement in [Rainmeter]. If you want a real cumulative that is persistent even when you restart, remove that line. Keep in mind though that if you use "themes", persistent stats will be a mess and useless as they are stored in Rainmeter.ini and thus in the "theme".

The only weird thing I see is a big lag for updating of the "cumulative" numbers.
1-18-2011 6-32-52 PM.jpg
Edit: Few minutes later...
2.jpg
You do not have the required permissions to view the files attached to this post.
sgtevmckay

Re: Net Traffic totals

Post by sgtevmckay »

Perfect thanks......

I forgot to enter a statement

Code: Select all

[Rainmeter]
OnRefreshAction=!RainmeterResetStats
Thanks :D