c# - Determining CPU and RAM usage in a Silverlight 4 WIndows Sidebar Gadget -


i'm trying write silverlight 4 windows sidebar gadget that, among other things, can monitor usage of each cpu core (as percentage) , usage of ram (in bytes) of host computer. i've tried using system.management, visual studio won't let me add it, it's not part of silverlight.

in end, i'm looking method returns usage of specific cpu core. automatically detecting number of cores bonus. same goes ram.

extensive searching has led me believe possible through com+ automation, i'm clueless how. direction appreciated.

you can use system.windows.analytics class systems stats..

it has averageprocessorload can use current cpu usage(value between 0 , 1) .and silverlight only.

you can use this:

float averagecpuusage = system.windows.analytics.averageprocessorload;  float myappcpuusage = system.windows.analytics.averageprocessload;// cpu usage current app. 

update

but silverlight far can go.. ram , processor count need have somthing installed on client side tell you.. browser can't.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -