I'm trying to write a Silverlight 4 Windows Sidebar Gadget that, among other things, can monitor the usage of each CPU core (as a percentage) and the usage of RAM (in bytes) of the host computer. I've tried using System.Management, but Visual Studio won't let me add it, as it's not part of Silverlight.
In the end, I'm looking for some method that simply returns the usage of a specific CPU core. Automatically detecting the number of cores would be a bonus. The same goes for RAM.
Extensive searching has led me to believe that this is possible through COM+ automation, but I'm clueless as to how. Any direction would be very much appreciated.
You can use System.Windows.Analytics class to get systems stats..
It has a AverageProcessorLoad which you can use to get the current CPU usage(Value between 0 and 1) .And its for Silverlight only.
You can simply use it like this:
Update
But from Silverlight this is as far as we can go.. for RAM and Processor count you will need to have somthing installed on the client side itself to tell you.. from browser you can't.