It is currently October 21st, 2019, 4:10 am

Help with multicore monitoring + network monitoring

Help with creating, editing & fixing problems with skins
User avatar
Raikuga
Posts: 12
Joined: May 20th, 2010, 11:00 pm

Help with multicore monitoring + network monitoring

Raikuga » May 20th, 2010, 11:13 pm

I made a little monitor for my CPU cores, but they are most certainly showing the wrong values. For instance, right now, the skin is saying that both CPUs are at around 90% processor time, when all other monitors say 3%. The code is below...

Also, I want a network monitor that says whether or not I am connected to the internet. (If this isn't easily possible, I'd want to at least know whether or not the ethernet is connected) and also the name of the (first) network I am connected to. I have no idea how to get this one done. I've scanned around in the performance monitor and found nothing that does such a thing, unless I count bytes total/sec=0 as not being connected (which probably isn't always true?)

Also, how do I edit the alpha of an image meter? I want the images in one of my skins to be 70% visible...
I found the solution to this in another thread.

Code: Select all

[Variables]
Foreground=255,255,255,170
Background=0,0,0,128

;Measures

[MeasureCore1]
Measure=Plugin
Plugin=Perfmon.dll
PerfMonObject="Processor"
PerfMonCounter="% Processor Time"
PerfMonInstance=0
PerMonDifference=0

[MeasureCore2]
Measure=Plugin
Plugin=Perfmon.dll
PerfMonObject="Processor"
PerfMonCounter="% Processor Time"
PerfMonInstance=1
PerMonDifference=0

[MeasureRAM]
Measure=PhysicalMemory


;Meters
[VitalsLabel]
Meter=String
X=20
Y=5
W=50
H=8
FontColor=#Foreground#
FontFace=Visitor TT2 BRK
FontSize=10
Text="Vitals"

[VitalsSeparator]
Meter=Image
X=0
Y=1R
W=205
H=1
SolidColor=#Foreground#

[MeterCore1]
Meter=String
MeasureName=MeasureCore1
Scale=100000.0
X=2r
Y=2r
W=100
H=15
FontColor=#Foreground#
Text="Core 1: %1%"
[MeterCore1Graph]
Meter=Line
MeasureName=MeasureCore1
X=-2r
Y=2R
W=100
H=50
SolidColor=#Background#
LineColor=#Foreground#

[MeterCore2]
Meter=String
MeasureName=MeasureCore2
Scale=100000.0
X=7R
Y=-17r
W=102
H=15
FontColor=#Foreground#
Text="Core 2: %1%"
[MeterCore2Graph]
Meter=Line
MeasureName=MeasureCore2
X=-2r
Y=2R
W=100
H=50
SolidColor=#Background#
LineColor=#Foreground#

[MeterRAMText]
Meter=String
MeasureName=MeasureRAM
X=5
Y=5R
W=90
H=30
AutoScale=1
FontColor=#Foreground#
Text="RAM: %1B/4.0GB"
[MeterRAMBar]
Meter=Bar
MeasureName=MeasureRAM
X=5r
Y=15r
W=100
H=10
SolidColor=#Background#
BarColor=#Foreground#
BarOrientation=HORIZONTAL
User avatar
maminscris
Posts: 522
Joined: April 24th, 2009, 3:17 pm
Location: Bucharest, Romania Lat 44,43° Lon 26,1°

Re: Help with multicore monitoring + network monitoring

maminscris » May 21st, 2010, 7:11 am

code for cpu's
PerfMonInstance= defines the cpu number 0 is for cpu1, 1=cpu2, 2=cpu3 and so on

Code: Select all

[MeasureCPU1]
Measure=Plugin
Plugin=Plugins\PerfMon.dll
PerfMonObject="Processor"
PerfMonInstance=0
PerfMonCounter="% Processor Time"
PerfMonDifference=1
InvertMeasure=1

[MeasureCPU2]
Measure=Plugin
Plugin=Plugins\PerfMon.dll
PerfMonObject="Processor"
PerfMonInstance=1
PerfMonCounter="% Processor Time"
PerfMonDifference=1
InvertMeasure=1
For network if you have wifi you can use a skin for wireless

for cable only thing might be the number of connection, if you have iTunes installed it might show always 1 connection because the iTunesHelper.exe

code for those connections

Code: Select all

Measure=Plugin
Plugin=Plugins\PerfMon.dll
PerfMonObject=TCP
PerfMonCounter="Connections Established"
PerfMonInstance=
PerfMonDifference=0
Zero at programing, zero at writing codes, so far 2 at making images
But I'm good at copy/paste, and I not always like this
Image
wasky1
Posts: 128
Joined: June 10th, 2009, 8:26 am

Re: Help with multicore monitoring + network monitoring

wasky1 » May 21st, 2010, 8:55 am

i had to put:-

PerfMonObject=TCPv4
User avatar
maminscris
Posts: 522
Joined: April 24th, 2009, 3:17 pm
Location: Bucharest, Romania Lat 44,43° Lon 26,1°

Re: Help with multicore monitoring + network monitoring

maminscris » May 21st, 2010, 9:11 am

you can see that in performace under control panel, administrative tools
add counter
perfmon.jpg
You do not have the required permissions to view the files attached to this post.
Zero at programing, zero at writing codes, so far 2 at making images
But I'm good at copy/paste, and I not always like this
Image
wasky1
Posts: 128
Joined: June 10th, 2009, 8:26 am

Re: Help with multicore monitoring + network monitoring

wasky1 » May 21st, 2010, 9:52 am

im on 7x64
poiru
Developer
Posts: 2877
Joined: April 17th, 2009, 12:18 pm

Re: Help with multicore monitoring + network monitoring

poiru » May 21st, 2010, 10:11 am

If you use the latest beta, you can use Processor=n with Measure=CPU to make things simple.

E.g.

Code: Select all

[MeasureCPU1]
Measure=CPU
Processor=1

[MeasureCPU2]
Measure=CPU
Processor=2
User avatar
maminscris
Posts: 522
Joined: April 24th, 2009, 3:17 pm
Location: Bucharest, Romania Lat 44,43° Lon 26,1°

Re: Help with multicore monitoring + network monitoring

maminscris » May 21st, 2010, 10:17 am

poiru wrote:If you use the latest beta, you can use Processor=n with Measure=CPU to make things simple.

E.g.

Code: Select all

[MeasureCPU1]
Measure=CPU
Processor=1

[MeasureCPU2]
Measure=CPU
Processor=2
that is good to know
Zero at programing, zero at writing codes, so far 2 at making images
But I'm good at copy/paste, and I not always like this
Image
User avatar
Raikuga
Posts: 12
Joined: May 20th, 2010, 11:00 pm

Re: Help with multicore monitoring + network monitoring

Raikuga » May 22nd, 2010, 6:51 am

The CPU monitor trick worked (I downloaded the beta), but the network thing is definitely not. I have the meter set to string and it says "0" nearly all the time. So is there something that can indicate (in boolean) whether or not I'm connected to the internet at all?
wasky1
Posts: 128
Joined: June 10th, 2009, 8:26 am

Re: Help with multicore monitoring + network monitoring

wasky1 » May 22nd, 2010, 7:34 am

in theory this should work for you

Code: Select all

[MeasurePing]
Measure=Plugin
Plugin=Plugins\PingPlugin
DestAddress=www.yahoo.com
UpdateRate=5
IfAboveValue=2000
IfAboveAction=!Execute [!RainmeterHideMeter MeterPing][!RainmeterShowMeter MeterNotConnected]
IfBelowValue=2000
IfBelowAction=!Execute [!RainmeterShowMeter MeterPing][!RainmeterHideMeter MeterNotConnected]

[MeterNotConnected]
Meter=STRING
X=0
Y=0
Text="NotConnected"
FontColor=255,255,255,255
FontFace="Trebuchet MS"
FontSize=9
StringStyle=BOLD
Antialias=1
Hidden=0

[MeterPing]
Meter=STRING
MeasureName=MeasurePing
X=0
Y=0
Text="%1ms"
FontColor=255,255,255,255
FontFace="Trebuchet MS"
FontSize=9
StringStyle=BOLD
Antialias=1
Hidden=1
when the connection times out it will display "not connected"
however some people have reported ping plugin working incorrectly, i myself have only noticed a problem "pinging" google.com oh.. apart from every now and again it displays a connection when not connected but only momentarilly