I have a working meter now!
But, I'd like your input on an issue. I'm trying to pull the router CPU usage and Free RAM.
The parameters I'm using work from the command line: SnmpGet -q -r:gw -t:10 -c:"kaacee" -o:.1.3.6.1.4.1.2021.4.13.0
But, I can't get them to update the meter. There isn't any comparison to previous values, like in the bandwidth. Just displaying what snmpget returns. See anything in my code that is odd?
Note: I am currently only polling RAM, I just have CPU mocked up.
Code: Select all
[Rainmeter]
Update=2000
AccurateText=1
SkinWidth=171
SkinHeight=95
BackgroundMode=2
SolidColor=255,0,0,0
;https://snmpsoft.com/shell-tools/snmp-get/
[MeterBack]
Meter=Shape
Shape=Rectangle 1,1,169,90,12 | Fill Color #BackgroundColor# | StrokeWidth 1 | Stroke Color #LabelColor#
W=171
H=87
UpdateDivider=-1
[Variables]
CurrTime=0
LastTime=0
LabelColor=208,224,247
ValueColor=247,252,255,255
BarBackColor=#LabelColor#,75
BackgroundAlpha=200
BackgroundColor=0,0,0,#BackgroundAlpha#
[MeasureTimer]
Measure=Uptime
OnUpdateAction=[!SetVariable LastTime #CurrTime#][!SetVariable CurrTime [MeasureTimer:]][!CommandMeasure MeasureRouterSend Run][!CommandMeasure MeasureRouterRec Run]
UpdateDivider=2
DynamicVariables=1
[MeasureRouterSend]
Measure=Plugin
Plugin=RunCommand
Parameter=SnmpGet -q -r:gw -t:10 -c:"kaacee" -o:.1.3.6.1.2.1.2.2.1.16.3
OutputType=ANSI
State=Hide
StartInFolder=C:\Storage\NextCloud Store\Tech\Documents\Rainmeter\Skins
FinishAction=[!UpdateMeasure "MeasureBytesSent"]
DynamicVariables=1
UpdateDivider=-1
[MeasureRouterRec]
Measure=Plugin
Plugin=RunCommand
Parameter=SnmpGet -q -r:gw -t:10 -c:"kaacee" -o:.1.3.6.1.2.1.2.2.1.10.3
OutputType=ANSI
State=Hide
StartInFolder=C:\Program Files\Common Files\mine\SNMP
FinishAction=[!UpdateMeasure "MeasureBytesReceived"]
DynamicVariables=1
UpdateDivider=-1
[MeasureRouterRAM]
Measure=Plugin
Plugin=RunCommand
Parameter=SnmpGet -q -r:gw -t:10 -c:"kaacee" -o:.1.3.6.1.4.1.2021.4.13.0
OutputType=ANSI
State=Hide
StartInFolder=C:\Program Files\Common Files\mine\SNMP
FinishAction=[!UpdateMeasure "MeasureRAM"]
DynamicVariables=1
UpdateDivider=-1
[MeasureTimePassed]
Measure=Calc
Formula=(#CurrTime# - #LastTime#)
DynamicVariables=1
[MeasureBytesReceived]
Measure=String
String=[MeasureRouterRec]
DynamicVariables=1
RegExpSubstitute=1
Substitute="#CRLF#":""
OnUpdateAction=[!SetVariable PrevRec #CurrRec#][!SetVariable CurrRec [MeasureBytesReceived]]
UpdateDivider=-1
[MeasureBytesSent]
Measure=String
String=[MeasureRouterSend]
DynamicVariables=1
RegExpSubstitute=1
Substitute="#CRLF#":""
OnUpdateAction=[!SetVariable PrevSent #CurrSent#][!SetVariable CurrSent [MeasureBytesSent]]
UpdateDivider=-1
[MeasureRAM]
Measure=String
String=[MeasureRAM]
DynamicVariables=1
RegExpSubstitute=1
Substitute="#CRLF#":""
;OnUpdateAction=[!SetVariable PrevSent #CurrSent#][!SetVariable CurrSent [MeasureRouterRAM]]
UpdateDivider=-1
[MeasureRouterReceived]
Measure=Calc
Formula=((#CurrRec# - #PrevRec#) / [MeasureTimePassed]) * 8
;MaxValue=220000000
DynamicVariables=1
[MeasureRouterSent]
Measure=Calc
Formula=((#CurrSent# - #PrevSent#) / [MeasureTimePassed]) * 8
;MaxValue=6000000
DynamicVariables=1
[string]
Meter=STRING
MeasureName=string
X=5
Y=4
StringStyle=bold
StringAlign=left
FontColor=225,225,225,100
FontSize=20
FontFace=comfortaa
AntiAlias=1
Text=pfSense
[MeterRouterRAM]
Meter=String
MeasureName=MeasureRouterRAM
X=105r
Y=4
W=40
;H=20
FontSize=8.5
FontColor=225,225,225,100
AutoScale=1
Text=RAM: %1
NumOfDecimals=1
[MeterRouterCPU]
Meter=String
MeasureName=MeasureRouterRAM
X=0r
Y=12r
W=40
;H=20
FontSize=8.5
FontColor=225,225,225,100
AutoScale=1
Text=CPU: %1
NumOfDecimals=1
[MeterLineSend]
Meter=Line
MeasureName=MeasureRouterSent
MeasureName2=MeasureRouterReceived
X=5
Y=2
W=162
H=75
LineCount=2
LineColor=255,255,0,255
LineColor2=0,255,0,255
AntiAlias=1
AutoScale=1
[MeterSizeRec]
Meter=String
MeasureName=MeasureRouterReceived
X=10
Y=75r
W=40
;H=15
FontSize=8.5
FontColor=0,255,0,255
AutoScale=1
Text=D: %1b/s
NumOfDecimals=1
[MeterSizeSent]
Meter=String
MeasureName=MeasureRouterSent
X=90r
Y=r
W=40
;H=20
FontSize=8.5
FontColor=255,255,0,255
AutoScale=1
Text=U: %1b/s
NumOfDecimals=1