Yemble wrote:I get the black box, but the only text on it is "Top Process:", blank line, 0.
Nothing else
I'll try the same on a Windows 10 PC when I get home.
Note that I am running the portable version of Rainmeter, if that makes any difference (I prefer all the files to be within a single folder structure). I'm wondering whether, or not, the DLLs require registering manually ? ... although, having said that, all of your other gadgets are functioning perfectly. Also, according to Task Manager, I have approx 138 processes running, which is pretty typical for this laptop.
Exactly the same result on my Windows 10 laptop, this time with a standard installation of Rainmeter.
There are only two commonalities between these two machines:
OK, that pretty much settles it. Something is up with the AdvancedCPU measure in your case. I'm not sure if there is a bug in this measure or some glitch with your machine, like a corrupted performance counter database. I'm using 64-bit Win 10 too and not having any issues, so perhaps it is locale related (there are some known problems with performance counters because they can have names that are locale-specific). I'm guessing your performance counters database is OK, because if it wasn't, it is super-easy to notice because the Gadget's Drives Meter skin goes bonkers.
If you want to reset your perf counters database just to be extra sure, you can follow these steps here. If this doesn't work, perhaps a posting in the Bug forum is in order.
On the Windows 7 laptop the disable Registry key was missing, so I added it in. I rebuilt both PerfMon DBs successfully, with no errors reported. Then I rebooted.
After the reboot, Top Process Meter is now reporting process stats
I'll do the same on the Windows 10 laptop tonight, but I'm sure the fix will work on that as well. I can't believe that this is due to any corruption though, because the machine builds and environments are completely different. It must be some Windows default (maybe peculiar to UK) that needs to be reset... that missing Disable Performance Counters Registry key looks favourite to me.
CPU hit for Rainmeter appears to be around 3% to 4%, however, this is with "Idle" being displayed.
SilverAzide wrote:OK, that pretty much settles it. Something is up with the AdvancedCPU measure in your case. I'm not sure if there is a bug in this measure or some glitch with your machine, like a corrupted performance counter database. I'm using 64-bit Win 10 too and not having any issues, so perhaps it is locale related (there are some known problems with performance counters because they can have names that are locale-specific). I'm guessing your performance counters database is OK, because if it wasn't, it is super-easy to notice because the Gadget's Drives Meter skin goes bonkers.
If you want to reset your perf counters database just to be extra sure, you can follow these steps here. If this doesn't work, perhaps a posting in the Bug forum is in order.
OK, now that TPM is finally working, I can see why you stated that you were not 100% happy with it. I've got it configured for six processes, with Idle disabled. When it refreshes every second, it does not always display all six processes, often one or more of the list items (up to five) are blank. The Rainmeter CPU hit is now averaging at around 3.5%, up from <1%.
Is PerfMon the best method for getting this data? WMI might be an alternative and possibly the one that Microsoft use for TaskManager, which has a very low CPU hit (0.4%)?
There is definitely some scope for (significant) improvement here, most likely within the AdvancedCPU plugin, especially when you consider that TaskManager can handle a much bigger list, sorted by CPU, refreshed every second with a negligible CPU hit
<job>
<?job Error = "true" debug = "false" ?>
<script language = vbscript>
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
while true
Set colProcesses = objWMIService.ExecQuery("Select * from Win32_Process")
For Each objProcess in colProcesses
Wscript.Echo "Process: " & objProcess.Name
sngProcessTime = (CSng(objProcess.KernelModeTime) + CSng(objProcess.UserModeTime)) / 10000000
Wscript.Echo "Processor Time: " & sngProcessTime
Wscript.Echo "Process ID: " & objProcess.ProcessID
Wscript.Echo "Working Set Size: " & objProcess.WorkingSetSize
Wscript.Echo "Page File Size: " & objProcess.PageFileUsage
Wscript.Echo "Page Faults: " & objProcess.PageFaults
Wscript.Echo
Next
WScript.Sleep(1000)
wend
</script>
</job>
This is pretty simplistic, but it does act as a reference for what could be done using WMI. Remember that this is interpretted code (not compiled) and it is not written in the worlds most efficient language. When run via Cscript.exe, this code averages at 1.5% CPU. Granted it is not doing any of the list sorting, but that is a trival task for a computer. This could all be done a lot more efficiently in C++.
Yemble wrote:OK, now that TPM is finally working, I can see why you stated that you were not 100% happy with it. I've got it configured for six processes, with Idle disabled. When it refreshes every second, it does not always display all six processes, often one or more of the list items (up to five) are blank. The Rainmeter CPU hit is now averaging at around 3.5%, up from <1%.
Is PerfMon the best method for getting this data? WMI might be an alternative and possibly the one that Microsoft use for TaskManager, which has a very low CPU hit (0.4%)?
Yes, it appears that AdvancedCPU does not report processes with less than .01% CPU... or perhaps I missed some option that will allow it. This is why you will see blanks a lot of the time.
PerfMon is an alternative way to do this too, but it is problematic. Someone created a great plugin for getting perf mon info, NomFerp, but it appears to be abandonware and does have localization issues. I believe the Rainmeter devs are looking into building something similar, since there are known performance issues with AdvancedCPU and PerfMon measures that NomFerp does not appear to have. (For an example, try dragging the Top Process gadget around on the screen, you'll see it's very jerky...) I've offered to pay the dev's bar tabs to get something in the next release...
Yemble wrote:This is pretty simplistic, but it does act as a reference for what could be done using WMI. Remember that this is interpretted code (not compiled) and it is not written in the worlds most efficient language. When run via Cscript.exe, this code averages at 1.5% CPU. Granted it is not doing any of the list sorting, but that is a trival task for a computer. This could all be done a lot more efficiently in C++.
If you want to try a similar Top Process Meter skin that uses NomFerp, you can try raiguard's Modern Gadgets. There's even a patch to make my Gadgets look like his...
In any case, I don't have plans to use Nomferp at this time, but if a built-in Rainmeter alternative comes up, I'll switch my skin to use that instead.
<job>
<?job Error = "true" debug = "false" ?>
<script language = vbscript>
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
while true
Set colItems = objWMIService.ExecQuery("Select * from Win32_PerfFormattedData_PerfProc_Process")
For Each objItem in colItems
Wscript.Echo "Process:" & objItem.IDProcess & " - " & objItem.Name & " - " & objItem.PercentProcessorTime & "% - " & CSng(CSng(objItem.WorkingSetPrivate) / 1024.0) & "Kb"
Wscript.Echo
Next
WScript.Sleep(1000)
wend
</script>
</job>
This rarely exceeds 1% CPU. How precise this usage data is on a single capture, I'm not too sure, but it serves as an illustration. Maybe I am just treading a path that the Devs have already been on, but it remains a fact that Windows TaskManager is very efficient at doing the same thing, so it stands to reason that there MUST be a more efficient method than that currently used within AdvancedCPU. Here's hoping the Devs find a way...
BTW, I MUCH prefer your skins to those of ModernGadgets