<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CPU monitoring &#8211; Blog of Kliment Andreev &#8211; A place so I won&#039;t forget things</title>
	<atom:link href="https://blog.andreev.it/tag/cpu-monitoring/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.andreev.it</link>
	<description></description>
	<lastBuildDate>Sat, 24 Oct 2020 13:14:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Visual C#: CPU monitoring gadget</title>
		<link>https://blog.andreev.it/2016/04/86-visual-c-cpu-monitoring-gadget/</link>
					<comments>https://blog.andreev.it/2016/04/86-visual-c-cpu-monitoring-gadget/#respond</comments>
		
		<dc:creator><![CDATA[Kliment Andreev]]></dc:creator>
		<pubDate>Fri, 01 Apr 2016 22:57:54 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[CPU monitoring]]></category>
		<category><![CDATA[Visual C#]]></category>
		<guid isPermaLink="false">http://blog.iandreev.com/?p=2520</guid>

					<description><![CDATA[Windows 7 came with gadgets, small tools that sit on your desktop and do&#8230;]]></description>
										<content:encoded><![CDATA[<div id="bsf_rt_marker"></div><p>Windows 7 came with gadgets, small tools that sit on your desktop and do something. I used CPU/Memory gadget and the Weather gadget. Windows 8 and Windows 10, discontinued the gadgets, but there are <a href="http://www.intowindows.com/desktop-gadgets-for-windows-10/" target="_blank" rel="noopener noreferrer">some</a> <a href="http://win7gadgets.com/blog/how-install-desktop-gadgets-windows-10/" target="_blank" rel="noopener noreferrer">ways </a>of how to install them back under Win 10. </p>
<p>I made a small tool in Visual C# (Community edition 2015) that does pretty much the same. It monitors the CPU usage and draws a graph. You can choose the background, transparency, threshold colors, etc&#8230; See the options screenshot below.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2016/04/P065-01.png"><img fetchpriority="high" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2016/04/P065-01.png" alt="" width="320" height="292" class="aligncenter size-full wp-image-7474" srcset="https://blog.andreev.it/wp-content/uploads/2016/04/P065-01.png 320w, https://blog.andreev.it/wp-content/uploads/2016/04/P065-01-300x274.png 300w" sizes="(max-width: 320px) 100vw, 320px" /></a><br />
You can get the source here.</p>
<pre class="brush: bash; title: ; notranslate">
git clone https://www.github.com/klimenta/CPU-Gadget
</pre>
<p>If you get an exception while trying to compile or execute the program, it means your counters in registry are messed up.<br />
This is the error that you might get.</p>
<pre class="brush: bash; title: ; notranslate">
InvalidOperationException: Cannot load Counter Name data because an invalid index '' was read from the registry.
</pre>
<p>Open the command prompt (Run as Administrator) and execute these commands depending on your OS (32/64) bit.</p>
<pre class="brush: bash; title: ; notranslate">
C:\windows\system32&gt; lodctr /r
</pre>
<p>or </p>
<pre class="brush: bash; title: ; notranslate">
C:\windows\SysWOW64&gt; lodctr /r
</pre>
<p>You should get this back if everything is OK.</p>
<pre class="brush: plain; title: ; notranslate">
Info: Successfully rebuilt performance counter setting from system backup store
</pre>
<p>If you get this, you are doing it for 32 bit OS instead of 64 bit OS and vice versa.</p>
<pre class="brush: plain; title: ; notranslate">
Error: Unable to rebuild performance counter setting from system backup store, error code is 2
</pre>
<p>This is how the gadget looks like on the desktop (click for larger image).<br />
<a href="https://blog.andreev.it/wp-content/uploads/2016/04/P065-02.png"><img decoding="async" src="https://blog.andreev.it/wp-content/uploads/2016/04/P065-02.png" alt="" width="1280" height="800" class="aligncenter size-full wp-image-7475" srcset="https://blog.andreev.it/wp-content/uploads/2016/04/P065-02.png 1280w, https://blog.andreev.it/wp-content/uploads/2016/04/P065-02-300x188.png 300w, https://blog.andreev.it/wp-content/uploads/2016/04/P065-02-1024x640.png 1024w, https://blog.andreev.it/wp-content/uploads/2016/04/P065-02-768x480.png 768w, https://blog.andreev.it/wp-content/uploads/2016/04/P065-02-1170x731.png 1170w, https://blog.andreev.it/wp-content/uploads/2016/04/P065-02-585x366.png 585w" sizes="(max-width: 1280px) 100vw, 1280px" /></a><br />
UPDATE 4/12/2016<br />
================</p>
<p>Based on this source, I made slight modifications for another gadget that monitors the available RAM usage.<br />
You can get the code here.</p>
<pre class="brush: bash; title: ; notranslate">
git clone https://www.github.com/klimenta/CPU-Gadget
</pre>
<p>Or get both executables from <a href="https://blog.andreev.it/wp-content/uploads/2016/04/CPU-Gadget.7z" target="_blank" rel="noopener noreferrer">here (CPU Gadget)</a> and <a href="https://blog.andreev.it/wp-content/uploads/2016/04/RAM-Gadget.7z" target="_blank" rel="noopener noreferrer">here (RAM Gadget)</a>. </p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.andreev.it/2016/04/86-visual-c-cpu-monitoring-gadget/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
