It is currently February 25th, 2020, 12:56 am

Rainmeter Top Processes

Share and get help with Plugins and Addons
ch_rob
Posts: 22
Joined: March 24th, 2011, 2:45 pm

Re: Rainmeter Top Processes

Post by ch_rob »

Vorron-

In your post you say you are using a 32-bit version of Windows, are you using the x32 plugin DLL? I've used that a year or so ago when I worked in XP, but haven't tried it since (I'm now on Win 7 x64). If so, I can try running it again and see if maybe it didn't build correctly this time.

-ch_rob
Vorron wrote:When I trying top process skin from http://customize.org/rainmeter/skins/82306 Rainmeter crashed. What could be wrong?

Windows 7 home premium x32
CPU Intel core duo p8400
Rainmeter 2.2.0 beta r1074
Vorron
Posts: 5
Joined: December 28th, 2011, 5:40 pm

Re: Rainmeter Top Processes

Post by Vorron »

are you using the x32 plugin DLL?
Yes, of course. I tried use x32 dll have downloaded from another place with the same result. I would be grateful if you take the time to check. Until now, your plugin is only acceptable solution for top process monitoring.
ch_rob
Posts: 22
Joined: March 24th, 2011, 2:45 pm

Re: Rainmeter Top Processes

Post by ch_rob »

Vorron-

I tried it on a 32 bit version of XP that I have running in a virtual instance. It worked fine (see attached). Are you using the .ini file that was provided? If not, could you post it here? Otherwise, I'll see if I can find a 32 bit version of Win 7.

-ch_rob
You do not have the required permissions to view the files attached to this post.
Vorron
Posts: 5
Joined: December 28th, 2011, 5:40 pm

Re: Rainmeter Top Processes

Post by Vorron »

ch_rob wrote:Are you using the .ini file that was provided?
Yes, here it is.

Code: Select all

[MeasureTopCPU]
Measure=Plugin
Plugin=Plugins\TopProcesses.dll
ReQuery=1
IgnoredProcesses=Idle|_Total|rundll32|wscript|userinit
MetricType=CPU
ProcNums=0-4
Format="%CPU%: %pName"

[TopCPUText]
Meter=String
MeterStyle=Style
MeasureName=MeasureTopCPU
X=20
Y=188

[MeasureTopMem]
Measure=Plugin
Plugin=Plugins\TopProcesses.dll
ReQuery=0
IgnoredProcesses=Idle|_Total|rundll32|wscript|userinit
MetricType=Memory
ProcNums=0-4
Format="%Memory: %pName"

[TopMemText]
Meter=String
MeterStyle=Style
MeasureName=MeasureTopMem
X=20
Y=275
I tried to use Rainmeter-2.1-r848 and it crashed. I tried to use it on Windows 7 Ultimate x32 on other partition of my disk and rainmeter crashed. I tried to use it on Windows XP x32 in VirtualBox and it worked properly. Perhaps the problem in my hardware (Samsung R560) or in Windows 7 x32.
ch_rob
Posts: 22
Joined: March 24th, 2011, 2:45 pm

Re: Rainmeter Top Processes

Post by ch_rob »

Vorron-

I'll throw together a Win 7 x32 VirtualBox this weekend and give it a try. You mentioned Windows 7 home premium x32 and Windows 7 Ultimate x32. Are they both up-to-date with service packs and patches? Also, not sure if this matters, but could you also list all of the .Net versions that are installed on each? I want to replicate your setup as closely as possible.

FYI: My test last night used the current Rainmeter version as you mentioned in your original post (2.2 beta r1084).

-ch_rob

Vorron wrote: I tried to use Rainmeter-2.1-r848 and it crashed. I tried to use it on Windows 7 Ultimate x32 on other partition of my disk and rainmeter crashed. I tried to use it on Windows XP x32 in VirtualBox and it worked properly. Perhaps the problem in my hardware (Samsung R560) or in Windows 7 x32.
Vorron
Posts: 5
Joined: December 28th, 2011, 5:40 pm

Re: Rainmeter Top Processes

Post by Vorron »

ch_rob, thank you for responding.

Windows 7 home premium x32 is fully updated (automatically by Windows Update Center). The following runtimes are installed:
2.0.50727.5448
3.0.4506.5420
4.0.30319.239

Windows 7 Ultimate was not using and updating for a long time, I'm afraid it does not deserve attention.
DigitalDJ
Posts: 35
Joined: December 30th, 2011, 3:30 pm

Re: Rainmeter Top Processes

Post by DigitalDJ »

Hi,

This weekend I got around to finally porting my Samurize config to Rainmeter. My config happened to use a Top Processes mod, so your plugin was rather useful.

However, I found a couple of bugs when working with it...

a) I couldn't get Top RAM processes and Top CPU processes working at the same time (sometimes RAM would show top CPU process, vice versa)

b) I couldn't have two different formats outputting to two different meters without them alternating between each other. (i.e. 1 measure does CPU usage with ReQuery=1, Format="%pName" and 1 measure also does CPU with ReQuery=0 and Format="%CPU")

So...at first I started writing my own plugin...and got things sort of working, but without the polish. I went back to your code with a better understanding of what was going on and fixed up a few things so that the conditions above now work perfect :)

What I did
Firstly, I made it so each time ReQuery is run it does both CPU and MEM sorting, regardless of MetricType. This means you can have one ReQuery=1 measure doing all the hard work and all the other measures just reading from the sorted lists.

Secondly, previously, you cached values in a dictionary as <MetricType, string>. If you have two measures going for CPU, but with different format this was a problem as there would be a race condition and you may get the output from a different measure. So instead, the cached values are now <Instance, string> so that each measures cached values are unique.

Thirdly, I put locking on the process list. I don't actually know if this helps, but I'd assume that this way each time a measure does its thing, it can do it without worrying about a ReQuery=1 measure modifying the process list part way through.

What needs fixing
I made queryString static. This basically means you can't have separate ignored processes for CPU and RAM measures. Since the process lists are static, the only real way of fixing this is to instead filter processes when looping through the output. This way you could you could have measures with different "IgnoredProcesses".

What Can You Do Now?
Well, what some requested here: have both Top CPU list and Top MEM list.

But also you can do something like shown in the attachment....where the left red box is Format="%pName", left-aligned and the right red box is Format="%CPU", right-aligned. Basically, easier and prettier alignment :)

Sample

Code: Select all

[measureTopProcessesCPUText]
Measure=Plugin
Plugin=TopProcesses.dll
ReQuery=1
IgnoredProcesses=Idle|%Total
MetricType=CPU
ProcNums=0-9
Format="%pName"
UpdateDivider=3

[measureTopProcessesCPUPerc]
Measure=Plugin
Plugin=TopProcesses.dll
MetricType=CPU
ProcNums=0-9
Format="%CPU%"

[measureTopProcessesMEM]
Measure=Plugin
Plugin=TopProcesses.dll
MetricType=MEM
ProcNums=0
Format="%pName %Memory"

[meterTopProcessesCPU]
Meter=STRING
MeasureName=measureTopProcessesCPUText
X=4
Y=0

[meterTopProcessesCPUPerc]
Meter=STRING
StringAlign=RIGHT
MeasureName=measureTopProcessesCPUPerc
X=152
Y=0

[meterMemoryTopUsed]
Meter=STRING
MeasureName=measureTopProcessesMEM
Text="%1"
X=4
Y=30r
Download
Source and Binaries (x64/x86): http://digitaldj.net/rainmeter/TopProcesses_v0.033.zip
You do not have the required permissions to view the files attached to this post.
Last edited by DigitalDJ on December 31st, 2011, 7:41 am, edited 2 times in total.
ch_rob
Posts: 22
Joined: March 24th, 2011, 2:45 pm

Re: Rainmeter Top Processes

Post by ch_rob »

DigitalDJ wrote:Hi,
...

So...at first I started writing my own plugin...and got things sort of working, but without the polish. I went back to your code with a better understanding of what was going on and fixed up a few things so that the conditions above now work perfect :)

...
Most excellent. Yeah, I've seen the comments about those things from time to time, but thought we've worked through them. If you've made changes, I'll pull them into my copy and re-post on customize.org (giving appropriate credit). : )

I'll also look at seeing if getting a separate "ignore list" can be done with a reasonably easy tweak.

Thanks DigitalDJ!
-ch_rob
DigitalDJ
Posts: 35
Joined: December 30th, 2011, 3:30 pm

Re: Rainmeter Top Processes

Post by DigitalDJ »

Hi,

I updated TopProcesses again to fix the IgnoredProcess thing :) Now v0.033.

You can get the src/bin here:
http://digitaldj.net/rainmeter/TopProcesses_v0.033.zip

I've changed it up a bit. Now there's both IgnoredProcesses and ExtraIgnoredProcesses. Wildcards can be used on both.

IgnoredProcesses works globally, filtering at the query level...just like it did before. This will apply the filter to ALL measures using the TopProcess plugin.

ExtraIgnoredProcesses works per measure and will filter just before it returns the output string. If you want each measure to have individual filters you should get rid of IgnoredProcesses and only use ExtraIgnoredProcesses.

So basically, IgnoredProcesses should be used only on measures with ReQuery=1, while ExtraIgnoredProcesses can be used on any measure, regardless of ReQuery value. I've updated the sample config file to reflect the differences.

IgnoredProcesses is obviously more efficient, so you should use that for optimal performance. Obviously the drawback is that all measures will then be filtered globally rather than individually.
DigitalDJ
Posts: 35
Joined: December 30th, 2011, 3:30 pm

Re: Rainmeter Top Processes

Post by DigitalDJ »

Here's a patch by the way: http://digitaldj.net/rainmeter/TopProcesses_0.033.patch

I can't seem to apply it using GNU patch...I think there's a problem with Windows line endings, but hopefully you can open it up and follow what the patch modifies and merge it pretty easily :)