<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>monitoring &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/monitoring/</link>
	<description>Feed of posts on WordPress.com tagged "monitoring"</description>
	<pubDate>Tue, 01 Dec 2009 23:33:28 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[PAKISTAN: Key anti-Taliban lawmaker assassinated in targeted bombing]]></title>
<link>http://onthedefense.wordpress.com/2009/12/01/pakistan-key-anti-taliban-lawmaker-assassinated-in-targeted-bombing/</link>
<pubDate>Tue, 01 Dec 2009 22:45:09 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/12/01/pakistan-key-anti-taliban-lawmaker-assassinated-in-targeted-bombing/</guid>
<description><![CDATA[ISLAMABAD (AP) &#8212; Pakistan&#8217;s Supreme Court said Tuesday it will soon begin examining an e]]></description>
<content:encoded><![CDATA[ISLAMABAD (AP) &#8212; Pakistan&#8217;s Supreme Court said Tuesday it will soon begin examining an e]]></content:encoded>
</item>
<item>
<title><![CDATA[AFTER-ACTION NOTES FROM TERRORISM: Insurgent journo's top 5 mistakes in Insurgency Communication Strategy; sound familiar?]]></title>
<link>http://onthedefense.wordpress.com/2009/11/30/after-action-notes-from-terrorism-insurgent-journos-top-5-mistakes-in-insurgency-communication-strategy-sound-familiar/</link>
<pubDate>Mon, 30 Nov 2009 22:14:25 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/30/after-action-notes-from-terrorism-insurgent-journos-top-5-mistakes-in-insurgency-communication-strategy-sound-familiar/</guid>
<description><![CDATA[An Iraqi journalist and insurgent supporter lists in an article published on Al-Jazeera’s website wh]]></description>
<content:encoded><![CDATA[An Iraqi journalist and insurgent supporter lists in an article published on Al-Jazeera’s website wh]]></content:encoded>
</item>
<item>
<title><![CDATA[AMATEUR VIDEO: Drone Strikes Persist Over Pakistan]]></title>
<link>http://onthedefense.wordpress.com/2009/11/30/amateur-video-drone-strikes-persist-over-pakistan/</link>
<pubDate>Mon, 30 Nov 2009 21:35:41 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/30/amateur-video-drone-strikes-persist-over-pakistan/</guid>
<description><![CDATA[Pakistan is under increasing pressure from the US to stop Taliban and al-Qaeda fighters from operati]]></description>
<content:encoded><![CDATA[Pakistan is under increasing pressure from the US to stop Taliban and al-Qaeda fighters from operati]]></content:encoded>
</item>
<item>
<title><![CDATA[BREAKING: INTEL sources; Iran hands control of naval forces to the Iranian Revolutionary Guard]]></title>
<link>http://onthedefense.wordpress.com/2009/11/30/breaking-intel-sources-iran-hands-control-of-naval-forces-to-the-iranian-revolutionary-guard/</link>
<pubDate>Mon, 30 Nov 2009 19:21:30 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/30/breaking-intel-sources-iran-hands-control-of-naval-forces-to-the-iranian-revolutionary-guard/</guid>
<description><![CDATA[Iran Guards take over naval forces in Gulf: US intelligence WASHINGTON, November 30, 2009 (AFP) ]]></description>
<content:encoded><![CDATA[Iran Guards take over naval forces in Gulf: US intelligence WASHINGTON, November 30, 2009 (AFP) ]]></content:encoded>
</item>
<item>
<title><![CDATA[Twitter better for real-time business intelligence]]></title>
<link>http://amoswhite3.wordpress.com/2009/11/30/twitter-better-for-real-time-business-intelligence/</link>
<pubDate>Mon, 30 Nov 2009 18:59:58 +0000</pubDate>
<dc:creator>amoswhite3</dc:creator>
<guid>http://amoswhite3.wordpress.com/2009/11/30/twitter-better-for-real-time-business-intelligence/</guid>
<description><![CDATA[Recent analysis finds Twitter tweets a better real-time predictor for business intelligence. Image b]]></description>
<content:encoded><![CDATA[Recent analysis finds Twitter tweets a better real-time predictor for business intelligence. Image b]]></content:encoded>
</item>
<item>
<title><![CDATA[PAK POLL: Biggest Threat to PAK? US 59%, Taliban 11%, conspiracy theories abound]]></title>
<link>http://onthedefense.wordpress.com/2009/11/30/pak-poll-biggest-threat-to-pak-us-59-taliban-11-conspiracy-theories-abound/</link>
<pubDate>Mon, 30 Nov 2009 18:37:17 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/30/pak-poll-biggest-threat-to-pak-us-59-taliban-11-conspiracy-theories-abound/</guid>
<description><![CDATA[In Pakistan, more than 200 people have been killed in the last month in at least six separate bombin]]></description>
<content:encoded><![CDATA[In Pakistan, more than 200 people have been killed in the last month in at least six separate bombin]]></content:encoded>
</item>
<item>
<title><![CDATA[SPEED IT UP: War weary Brits; hand over AF as quickly as possible, resources stretched]]></title>
<link>http://onthedefense.wordpress.com/2009/11/30/speed-it-up-war-weary-brits-hand-over-af-as-quickly-as-possible-resources-stretched/</link>
<pubDate>Mon, 30 Nov 2009 17:58:42 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/30/speed-it-up-war-weary-brits-hand-over-af-as-quickly-as-possible-resources-stretched/</guid>
<description><![CDATA[LONDON, Nov. 30 (Xinhua) &#8212; British Defense Secretary Bob Ainsworth said Monday that there is e]]></description>
<content:encoded><![CDATA[LONDON, Nov. 30 (Xinhua) &#8212; British Defense Secretary Bob Ainsworth said Monday that there is e]]></content:encoded>
</item>
<item>
<title><![CDATA[SQL Server 2005 Alerts]]></title>
<link>http://justsql.wordpress.com/2009/11/30/sql-server-2005-alerts/</link>
<pubDate>Mon, 30 Nov 2009 16:10:55 +0000</pubDate>
<dc:creator>thejoestory</dc:creator>
<guid>http://justsql.wordpress.com/2009/11/30/sql-server-2005-alerts/</guid>
<description><![CDATA[Well the good news is that the issue causing SQL Server 2005 to restart itself is fixed in SP3. The ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Well the good news is that the issue causing SQL Server 2005 to restart itself is fixed in SP3. The bad news is that I do not have a test server to test the upgrade on. While working to get a test server setup, I decided to create some SQL Server Alerts. At least then I will know just a few moments after the event happens. Currently I would find out about the error if users reported a problem or during my daily review of the SQL Server Logs.</p>
<p>Here is how I setup SQL Server 2005 alerts.</p>
<p>1. Setup Database Mail. Just follow the wizard it will lead you to safety. When finished you can right click on Database Mail and Choose Send Test Email to make sure you have configured it properly.</p>
<p><a href="http://justsql.wordpress.com/files/2009/11/ss61.png"><img class="aligncenter size-medium wp-image-86" title="ss6" src="http://justsql.wordpress.com/files/2009/11/ss61.png?w=300" alt="" width="300" height="142" /></a><br />
2. Right Click on Database Mail and click Configure. Choose the Manage Profile Security option and click next. Make sure your public profile is set as the Default Profile.</p>
<p><a href="http://justsql.wordpress.com/files/2009/11/ss71.png"><img class="aligncenter size-medium wp-image-87" title="ss7" src="http://justsql.wordpress.com/files/2009/11/ss71.png?w=300" alt="" width="300" height="259" /></a><a href="http://justsql.wordpress.com/files/2009/11/ss81.png"><img class="aligncenter size-medium wp-image-88" title="ss8" src="http://justsql.wordpress.com/files/2009/11/ss81.png?w=300" alt="" width="300" height="264" /></a><br />
3. Setup some operators. Give the operator a name and an email address at minimum.</p>
<p><a href="http://justsql.wordpress.com/files/2009/11/ss91.png"><img class="aligncenter size-medium wp-image-89" title="ss9" src="http://justsql.wordpress.com/files/2009/11/ss91.png?w=300" alt="" width="300" height="266" /></a><br />
4. Create your new alert. Right click alerts under SQL Server Agent and pick new alert.</p>
<ul>
<li>Give your alert a name.</li>
<li>Under the Alerts will be raised based on section choose the error number.\</li>
<li>In my instance the following error message would signal the service restart: <strong>Error: 3449, Severity: 21, State: 1 </strong>So for error number I typed: 3449</li>
<li>On the response tab check the Notify Operators and choose who gets notified.</li>
<li>On the Options tab check the include alert error text in Email option. Click OK. You have now created the alert.</li>
</ul>
<p><a href="http://justsql.wordpress.com/files/2009/11/ss11.png"><img class="aligncenter size-medium wp-image-82" title="ss1" src="http://justsql.wordpress.com/files/2009/11/ss11.png?w=300" alt="" width="300" height="270" /></a><a href="http://justsql.wordpress.com/files/2009/11/ss21.png"><img class="aligncenter size-medium wp-image-83" title="ss2" src="http://justsql.wordpress.com/files/2009/11/ss21.png?w=300" alt="" width="300" height="267" /></a><a href="http://justsql.wordpress.com/files/2009/11/ss31.png"><img class="aligncenter size-medium wp-image-84" title="ss3" src="http://justsql.wordpress.com/files/2009/11/ss31.png?w=300" alt="" width="300" height="270" /></a></p>
<p><a href="http://justsql.wordpress.com/files/2009/11/ss31.png"></a>5. Right click on the SQL Server Agent and choose Properties. Click on the Alert System option and enable the Mail Profile. Choose Database Mail for your mail system and then choose the profile you setup in the step above. Click OK. You will then need to restart your SQL Server Agent Service.</p>
<p><a href="http://justsql.wordpress.com/files/2009/11/ss51.png"><img class="aligncenter size-medium wp-image-85" title="ss5" src="http://justsql.wordpress.com/files/2009/11/ss51.png?w=300" alt="" width="300" height="268" /></a></p>
<p>There are tons of performance conditions and error messages you can monitor using the method above. You can also set alerts up to fire on you SQL Server Jobs. Handy if you have a job that has started failing and you want to keep a close eye on it. However if you have 100s of jobs to monitor you probably want to setup some kind of Centralized Management Server to monitor that. You do not want to go add alerts to every single one of your jobs.</p>
<p>Once you have the Database Mail, Operator, and Alert system setup you can explore the space and use it for all sorts of monitoring scenarios. Run wild.</p>
<p><strong>Update:</strong> You can use the RAISERROR system function to test your alerts.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ICT for sustainable homes Report]]></title>
<link>http://themonamiproject.wordpress.com/2009/11/30/ict-for-sustainable-homes-report/</link>
<pubDate>Mon, 30 Nov 2009 09:56:04 +0000</pubDate>
<dc:creator>SIAT</dc:creator>
<guid>http://themonamiproject.wordpress.com/2009/11/30/ict-for-sustainable-homes-report/</guid>
<description><![CDATA[On November 16 -17, MonAMI participated in the conference and exhibition ICT for Sustainable Homes i]]></description>
<content:encoded><![CDATA[On November 16 -17, MonAMI participated in the conference and exhibition ICT for Sustainable Homes i]]></content:encoded>
</item>
<item>
<title><![CDATA[Taxi Takes a Wrong Turn]]></title>
<link>http://txtwin2.wordpress.com/2009/11/30/taxi-takes-a-wrong-turn/</link>
<pubDate>Mon, 30 Nov 2009 02:57:56 +0000</pubDate>
<dc:creator>txtwin2</dc:creator>
<guid>http://txtwin2.wordpress.com/2009/11/30/taxi-takes-a-wrong-turn/</guid>
<description><![CDATA[The more I learn about the ethos of social media, the more baffled I am when I read examples like th]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>The more I learn about the ethos of social media, the more baffled I am when I read examples like this <a href="http://emilyfhoward.wordpress.com/2009/11/10/happy-anniversary-motrin-have-you-learned-not-to-mess-with-the-mommy-blogger/#comments">one</a> that <a href="http://emilyfhoward.wordpress.com/2009/11/10/happy-anniversary-motrin-have-you-learned-not-to-mess-with-the-mommy-blogger/#comments">Emily</a> recently blogged about.  I mean this is <a href="http://www.prwatch.org/node/6084">Johnson &#38; Johnson</a> making this mistake!?  I guess in fairness it’s important to mention that <a href="http://www.blogher.com/motrin-advertising-agency-remains-mum">ad company Taxi </a> was the one responsible for the Motrin account, but still? <a href="http://txtwin2.wordpress.com/files/2009/11/angry-mom-and-motrin-response-blog1.jpg"><img class="alignright size-medium wp-image-46" title="Motrin Makes Moms Mad" src="http://txtwin2.wordpress.com/files/2009/11/angry-mom-and-motrin-response-blog1.jpg?w=227" alt="" width="227" height="300" /></a></p>
<p>What’s baffling <a href="http://www.blogher.com/motringate-ad-wasnt-issue-motrin-just-didnt-listen">is the tone of the ad</a> not the fact that Twitter became a soapbox for offended moms.  I understand where the company was going with this ad.  I have “worn” two babies in a <a href="http://www.babybjorn.com/Start">Bjorn,</a> and yes, I often felt like I needed Motrin, and lots of it, after “wearing them” for long periods of time.  However, some think this is no laughing matter, check out <a href="http://babywearinginternational.org/">Babywearing International, Inc</a>.  This was so avoidable in my opinion.  Johnson &#38; Johnson had established relationships with plenty of moms.  Not four months before this campaign was launched, they were courting mommy bloggers at a <a href="http://jnjbtw.com/2008/04/we%E2%80%99ve-come-a-long-way-camp-baby/">Johnson &#38; Johnson Baby Camp event</a>. Johnson &#38; Johnson is known for being a <a href="http://www.csrwire.com/press/press_release/22884-SC-Johnson-Named-the-27th-Best-Place-to-Work-in-America">family friendly employer</a> and in 2008 was an eight-time honoree on <em>Fortune’s</em> &#8220;100 Best Companies to Work For&#8221; in America. They, meaning Taxi, should have utilized these relationships and tested the ad with moms first.   </p>
<p>Also baffling is that Taxi wasn’t monitoring the mayhem.  <a href="http://hollywood2020.blogs.com/hollywood2020/2008/11/hollywood2020ne.html">According to blogger Joyce Schwartz</a>, when she reached Taxi’s Director of Corporate Communications to get a comment on the over 2000 blog posts about the Motrin ad, she had to explain what Twitter was to the ad rep. In 2008, there was an <a href="http://cdnqa.hubteam.com/State_of_the_Twittersphere_by_HubSpot_Q4-2008.pdf">estimated 4-5 million people</a> on Twitter, and about <a href="http://cdnqa.hubteam.com/State_of_the_Twittersphere_by_HubSpot_Q4-2008.pdf">70% joined that year</a>.  I still don’t find it reasonable that this person at the ad company didn’t know about Twitter and therefore wasn’t monitoring it on behalf of clients.  <a href="http://www.taxi.ca/index.cfm?pid=16398">According to Taxi’s current client list,</a> they are still managing the Motrin account. </p>
<p>Go figure?</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Mandriva 2009.1 Spring : Instalasi Zabbix System Monitoring]]></title>
<link>http://bayuart.wordpress.com/2009/11/30/mandriva-2009-1-spring-instalasi-zabbix-system-monitoring/</link>
<pubDate>Mon, 30 Nov 2009 01:29:28 +0000</pubDate>
<dc:creator>bayuart</dc:creator>
<guid>http://bayuart.wordpress.com/2009/11/30/mandriva-2009-1-spring-instalasi-zabbix-system-monitoring/</guid>
<description><![CDATA[What is Zabbix ? &nbsp; http://www.zabbix.com/ Installation on Mandriva 2009.1 Spring 1. Adding repo]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://1.bp.blogspot.com/_iiVkhil2Mh0/SxMalWSiv0I/AAAAAAAABeE/12uYLkVSeZA/s1600/zabbix_large.png"><img style="display:block;text-align:center;cursor:pointer;width:300px;height:79px;margin:0 auto 10px;" src="http://1.bp.blogspot.com/_iiVkhil2Mh0/SxMalWSiv0I/AAAAAAAABeE/12uYLkVSeZA/s320/zabbix_large.png" border="0" alt="" /></a></p>
<p><span style="font-weight:bold;">What is Zabbix ?</p>
<p>&#160;</p>
<p></span></p>
<p>http://www.zabbix.com/</p>
<p><span style="font-weight:bold;">Installation on Mandriva 2009.1</span> Spring</p>
<p><span style="font-weight:bold;">1. Adding repository arsip.or.id</span></p>
<p>[root@srempuan telo]#urpmi.addmedia &#8211;distrib &#8211;mirrorlist http://www.arsip.or.id/mandrivalinux/official/2009.1/i586/</p>
<p><span style="font-weight:bold;">2. Install Zabbix Server</span></p>
<p>[root@srempuan telo]# urpmi zabbix</p>
<p>To satisfy dependencies, the following packages are going to be installed:</p>
<p>Package                        Version      Release       Arch</p>
<p>(medium &#8220;main_rilis_arsip&#8221;)</p>
<p>fping                          2.4b2        12mdv2009.1   i586</p>
<p>(medium &#8220;contrib_rilis_arsip&#8221;)</p>
<p>libiksemel3                    1.3          4mdv2009.0    i586</p>
<p>zabbix                         1.6.2        3mdv2009.1    i586</p>
<p>2.7MB of additional disk space will be used.</p>
<p>418KB of packages will be retrieved.</p>
<p>Proceed with the installation of the 3 packages? (Y/n)</p>
<p>http://telkom.arsip.or.id/mandrivalinux/official/2009.1/i586/media/main/release/fping-2.4b2-12mdv2009.1.i586.rpm</p>
<p>http://telkom.arsip.or.id/mandrivalinux/official/2009.1/i586/media/contrib/release/libiksemel3-1.3-4mdv2009.0.i586.rpm</p>
<p>http://telkom.arsip.or.id/mandrivalinux/official/2009.1/i586/media/contrib/release/zabbix-1.6.2-3mdv2009.1.i586.rpm</p>
<p>installing libiksemel3-1.3-4mdv2009.0.i586.rpm zabbix-1.6.2-3mdv2009.1.i586.rpm fping-2.4b2-12mdv2009.1.i586.rpm from /var/cache/urpmi/rpms</p>
<p>Preparing&#8230; ##############################################################################################################################################</p>
<p>1/3: fping ##############################################################################################################################################</p>
<p>2/3: libiksemel3 ##############################################################################################################################################</p>
<p>3/3: zabbix ##############################################################################################################################################</p>
<p>[root@srempuan telo]#</p>
<p><a href="http://bayuart.blogspot.com/2009/11/mandriva-20091-install-zabbix.html">more&#8230;</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[HOMEGROWN TERROR : 20 charged; links to Al Qaeda, most prolific terrorism investigation since 9/11]]></title>
<link>http://onthedefense.wordpress.com/2009/11/29/homegrown-terror-20-charged-links-to-al-qaeda-most-prolific-terrorism-investigation-since-911/</link>
<pubDate>Sun, 29 Nov 2009 21:26:59 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/29/homegrown-terror-20-charged-links-to-al-qaeda-most-prolific-terrorism-investigation-since-911/</guid>
<description><![CDATA[By ANDREA ELLIOTT&#8211;NYT Federal officials on Monday unsealed terrorism-related charges against m]]></description>
<content:encoded><![CDATA[By ANDREA ELLIOTT&#8211;NYT Federal officials on Monday unsealed terrorism-related charges against m]]></content:encoded>
</item>
<item>
<title><![CDATA[REPORT: FBI team to travel to India; will share INTEL gleaned from Lashkar-e-Taiba arrests ]]></title>
<link>http://onthedefense.wordpress.com/2009/11/29/report-fbi-team-to-travel-to-india-to-share-intel-gleaned-from-lashkar-e-taiba-arrests/</link>
<pubDate>Sun, 29 Nov 2009 20:49:39 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/29/report-fbi-team-to-travel-to-india-to-share-intel-gleaned-from-lashkar-e-taiba-arrests/</guid>
<description><![CDATA[As Reported by Goa Herald&#8211;United States  President Barrack Obama is dispatching a high-level F]]></description>
<content:encoded><![CDATA[As Reported by Goa Herald&#8211;United States  President Barrack Obama is dispatching a high-level F]]></content:encoded>
</item>
<item>
<title><![CDATA[A THUMB OF THE NOSE: Iran vaunts plans for 10 new uranium enrichment plants, ignores detractors]]></title>
<link>http://onthedefense.wordpress.com/2009/11/29/a-thumb-of-the-nose-iran-vaunts-plans-for-10-new-uranium-enrichment-plants-ignores-detractors/</link>
<pubDate>Sun, 29 Nov 2009 20:31:36 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/29/a-thumb-of-the-nose-iran-vaunts-plans-for-10-new-uranium-enrichment-plants-ignores-detractors/</guid>
<description><![CDATA[FROM BBC Iran&#8217;s government has approved plans to build 10 new uranium enrichment plants, accor]]></description>
<content:encoded><![CDATA[FROM BBC Iran&#8217;s government has approved plans to build 10 new uranium enrichment plants, accor]]></content:encoded>
</item>
<item>
<title><![CDATA[SENATE REPORT: bin Laden; we had him if we wanted him, let him walk across PAK border]]></title>
<link>http://onthedefense.wordpress.com/2009/11/29/senate-report-bin-laden-we-had-him-if-we-wanted-him-let-him-walk-across-pak-border/</link>
<pubDate>Sun, 29 Nov 2009 14:28:19 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/29/senate-report-bin-laden-we-had-him-if-we-wanted-him-let-him-walk-across-pak-border/</guid>
<description><![CDATA[US forces had Osama Bin Laden &#8220;within their grasp&#8221; in Afghanistan in late 2001, a US Sen]]></description>
<content:encoded><![CDATA[US forces had Osama Bin Laden &#8220;within their grasp&#8221; in Afghanistan in late 2001, a US Sen]]></content:encoded>
</item>
<item>
<title><![CDATA[Windows service monitoring application ]]></title>
<link>http://mytechtricks.wordpress.com/2009/11/29/windows-service-monitoring-application/</link>
<pubDate>Sun, 29 Nov 2009 12:30:22 +0000</pubDate>
<dc:creator>bhanushka</dc:creator>
<guid>http://mytechtricks.wordpress.com/2009/11/29/windows-service-monitoring-application/</guid>
<description><![CDATA[Download source code Today we are going to create a windows service monitoring application in C#.Net]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://www.4shared.com/file/162030133/6628be63/ServiceMonitor.html" target="_blank">Download source code</a>
</p>
<p>Today we are going to create a windows service monitoring application in C#.Net.</p>
<p>A windows service is an application which runs in background without a GUI. They are used to monitor various activities such as database operations and message queues. For an example a windows service may periodically monitor a message queue and if new entries are added to the queue, the service will treat them. By using Visual Studio, creation and deployment of windows services is extremely easy. After deployment of the service, the services window comes under Administrative tools can be used to start, stop, pause and resume the service.<br />
Today we are not going to discuss about creation of windows services. We focus on creating an application for monitoring any windows service. This includes both local and remote services! This application will reside in the system tray, connects to any service in the network and displays the current status of the service. Let’s create the application.</p>
<p><em>ServiceController </em>class found in <em>System.ServiceProcess</em> namespace can be used to monitor services. We can create an instance of this class and get the current status from the Status property. The code for this is as follows;</p>
<p><font color="blue"><br />
System.ServiceProcess.ServiceController sc = new ServiceController(service, machine);<br />
ServiceControllerStatus newStatus = sc.Status;<br />
</font></p>
<p>Here, service variable contains a service name and the machine variable contains a machine name.  </p>
<p>We have to create a method which polls the status periodically without stopping.  For that, a <em>while (true)</em>construct is the way to go. Since we should be able to connect to multiple services, we keep the settings in a text file to change/read them at will. Also this service monitoring section has to be executed in a separate thread other than the main UI thread because a context menu would be accompanied with the application and it will work as part of the main thread. The method having this code would be as follows;</p>
<p><font color="blue"></p>
<p>        public void monitorStatusChange()<br />
        {<br />
            try<br />
            {</p>
<p>                while (true)<br />
                {<br />
                    if (Thread.CurrentThread.ThreadState == ThreadState.Running)<br />
                    {<br />
                        Thread.Sleep(Int32.Parse(System.Configuration.ConfigurationManager.AppSettings["ThreadSleepTime"]));<br />
                    }</p>
<p>                    lock (objLock)<br />
                    {</p>
<p>                        //Read settings from file<br />
                        FileStream stream = new FileStream(Application.StartupPath + &#8220;/settings.txt&#8221;, FileMode.OpenOrCreate);<br />
                        StreamReader reader = new StreamReader(stream);<br />
                        string machine, service, userName, password;</p>
<p>                        machine = reader.ReadLine();<br />
                        service = reader.ReadLine();<br />
                        userName = reader.ReadLine();<br />
                        password = reader.ReadLine();</p>
<p>                        reader.Close();<br />
                        stream.Close();</p>
<p>                        System.ServiceProcess.ServiceController sc = new ServiceController(service, machine);<br />
                        ServiceControllerStatus newStatus = sc.Status;</p>
<p>                        if (currentStatus != newStatus)<br />
                        {</p>
<p>                            if (newStatus == ServiceControllerStatus.Running)<br />
                            {<br />
                                notifyIcon1.Icon = new Icon(Application.StartupPath + &#8220;/images/Started.ico&#8221;);<br />
                            }<br />
                            if (newStatus == ServiceControllerStatus.Paused)<br />
                            {<br />
                                notifyIcon1.Icon = new Icon(Application.StartupPath + &#8220;/images/Paused.ico&#8221;);<br />
                            }<br />
                            if (newStatus == ServiceControllerStatus.Stopped)<br />
                            {<br />
                                notifyIcon1.Icon = new Icon(Application.StartupPath + &#8220;/images/Stopped.ico&#8221;);<br />
                            }<br />
                        }<br />
                        currentStatus = newStatus;</p>
<p>                    }<br />
                }<br />
            }<br />
            catch (Exception ex)<br />
            {<br />
                notifyIcon1.Icon = new Icon(Application.StartupPath + &#8220;/images/Error.ico&#8221;);<br />
                currentStatus = new ServiceControllerStatus();<br />
                //lock (objLockRestart)<br />
                //{<br />
                //    restartToolStripMenuItem.Enabled = true;<br />
                //}<br />
            }<br />
        }</p>
<p></font></p>
<p>When you go through the above piece of code, you may be confused by the <em>lock </em>keyword and the <em>notifyIcon1</em>. The <em>lock </em>keyword is used in order to access shared resources in a thread safe manner. Here the <em>settings.txt</em> file may be accessed by this monitorStatusChange() method and the UI thread simultaneously. For an instance, the context menu will have a menu item called “Manage settings” and by clicking on that, a form will be displayed to edit the settings. At the time of saving the modifications by this form, if the monitoring thread tries to read settings from the same file, an IOException will be raised as follows,</p>
<p><font color="red"><br />
“The process cannot access the file because it is being used by another process”<br />
</font></p>
<p><em>Notify icon</em> is the icon which is visible in the system tray. As per the above method, we are changing the icon depending on the current status of the service.</p>
<p>I hope you are clear with the monitoring part. But you may not have written an application which resides in the system tray and below steps are given for creating such an app.</p>
<p>1.	Add a windows forms application project for the solution.<br />
2.	To the default page, drag a Notify control and a contextmenustrip control.<br />
3.	Assign the contextmenustrip control to the Notify icon’s ContextMenuStrip property.<br />
4.	Make Notify control’s Visible property to true.<br />
5.	Select an icon for the Notify control’s icon property.<br />
6.	Change form’s Opacity to 0%.<br />
7.	Select form’s ShowInTaskBar property as false.<br />
8.	Select form’s FormBorderStyle property as fixedtoolwindow.</p>
<p>When running the application, you would see it as in the following image. Look at the settings window and the context menu above the System Tray icon (The particular service is in the stopped state here).</p>
<p><img src="http://mytechtricks.wordpress.com/files/2009/11/windows-service-monitor.jpg" alt="" title="Windows Service Monitor" width="383" height="260" class="alignnone size-full wp-image-6" /></p>
<p>I hope you have got a clear idea about this application. The source code for the application can be downloaded from the link at the top. Remember I have used third party GUI controls for this application called DotNetBar controls. This is my first ever blog entry and you are warmly welcome for putting comments here.</p>
<p>I will be writing another blog post very soon for enhancing this application in order to control the service both locally and remotely.</p>
<p>Cheers!!!!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[The Eight Stages of Listening]]></title>
<link>http://geetarchurchy.wordpress.com/2009/11/29/the-eight-stages-of-listening/</link>
<pubDate>Sun, 29 Nov 2009 11:49:48 +0000</pubDate>
<dc:creator>Matt Churchill</dc:creator>
<guid>http://geetarchurchy.wordpress.com/2009/11/29/the-eight-stages-of-listening/</guid>
<description><![CDATA[@hrouda shared a presentation by Jeremiah Owyang on Twitter, about the different stages of listening]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://twitter.com/hrouda">@hrouda</a> shared a presentation by <a href="http://www.web-strategist.com/">Jeremiah Owyang</a> on Twitter, about the different stages of listening. </p>
<p>I spend alot of time doing exactly this and thought it worth sharing as it is short, simple, and gets to the point!</p>
<p><!-- SlideShare error: doc is missing or has illegal characters /[^-_a-zA-Z0-9]/ --></p>
<p><a href="http://api.tweetmeme.com/share?url=http://geetarchurchy.wordpress.com/2009/11/29/the-eight-stages-of-listening/"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://geetarchurchy.wordpress.com/2009/11/29/the-eight-stages-of-listening/" height="61" width="51" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[BIDDING WAR: US, NATO give 45% pay hike to Kabul police in hopes of generating loyalty]]></title>
<link>http://onthedefense.wordpress.com/2009/11/29/bidding-war-us-nato-give-45-pay-hike-to-kabul-police-in-hopes-of-generating-loyalty/</link>
<pubDate>Sun, 29 Nov 2009 03:18:58 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/29/bidding-war-us-nato-give-45-pay-hike-to-kabul-police-in-hopes-of-generating-loyalty/</guid>
<description><![CDATA[KABUL: Afghanistan announced a pay rise of nearly 40 percent for police and military recruits yester]]></description>
<content:encoded><![CDATA[KABUL: Afghanistan announced a pay rise of nearly 40 percent for police and military recruits yester]]></content:encoded>
</item>
<item>
<title><![CDATA[CIA on hiring blitz, ad offensive in heart of largest U.S. Arab-American community]]></title>
<link>http://onthedefense.wordpress.com/2009/11/28/cia-on-hiring-blitz-ad-offensive-in-heart-of-largest-u-s-arab-american-community/</link>
<pubDate>Sat, 28 Nov 2009 22:57:17 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/28/cia-on-hiring-blitz-ad-offensive-in-heart-of-largest-u-s-arab-american-community/</guid>
<description><![CDATA[DEARBORN, Michigan (Reuters) &#8211; At Tuhama&#8217;s Lebanese deli in Dearborn, and at bakeries an]]></description>
<content:encoded><![CDATA[DEARBORN, Michigan (Reuters) &#8211; At Tuhama&#8217;s Lebanese deli in Dearborn, and at bakeries an]]></content:encoded>
</item>
<item>
<title><![CDATA[TERROR: AQ linked group wrests control of key town in Somalia; hundreds of locals flee]]></title>
<link>http://onthedefense.wordpress.com/2009/11/28/terror-aq-linked-group-wrests-control-of-key-town-in-somalia-hundreds-of-locals-flee/</link>
<pubDate>Sat, 28 Nov 2009 20:54:45 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/28/terror-aq-linked-group-wrests-control-of-key-town-in-somalia-hundreds-of-locals-flee/</guid>
<description><![CDATA[(VOA) An al-Qaida-linked militant group in Somalia has captured a key town near the border with Keny]]></description>
<content:encoded><![CDATA[(VOA) An al-Qaida-linked militant group in Somalia has captured a key town near the border with Keny]]></content:encoded>
</item>
<item>
<title><![CDATA[REPORT: Failure to roll-up bin Laden in '01 has stoked insurgency, increased support for AQ]]></title>
<link>http://onthedefense.wordpress.com/2009/11/28/report-failure-to-roll-up-bin-laden-in-01-has-stoked-insurgency-increased-support-for-aq/</link>
<pubDate>Sat, 28 Nov 2009 18:13:30 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/28/report-failure-to-roll-up-bin-laden-in-01-has-stoked-insurgency-increased-support-for-aq/</guid>
<description><![CDATA[By SCOTT SHANE- NYT WASHINGTON — As President Obama vows to “finish the job” in Afghanistan by sendi]]></description>
<content:encoded><![CDATA[By SCOTT SHANE- NYT WASHINGTON — As President Obama vows to “finish the job” in Afghanistan by sendi]]></content:encoded>
</item>
<item>
<title><![CDATA[PAKISTAN: Embattled President turns over control of nuclear arsenal]]></title>
<link>http://onthedefense.wordpress.com/2009/11/28/pakistan-embattled-president-turns-over-control-of-nuclear-arsenal/</link>
<pubDate>Sat, 28 Nov 2009 17:42:00 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/28/pakistan-embattled-president-turns-over-control-of-nuclear-arsenal/</guid>
<description><![CDATA[ISLAMABAD (AP) &#8212; Pakistan&#8217;s president relinquished command of its nuclear arsenal and si]]></description>
<content:encoded><![CDATA[ISLAMABAD (AP) &#8212; Pakistan&#8217;s president relinquished command of its nuclear arsenal and si]]></content:encoded>
</item>
<item>
<title><![CDATA[TALIBAN: Begins new offensive in formerly quiet Northern Afghanistan]]></title>
<link>http://onthedefense.wordpress.com/2009/11/28/taliban-begins-new-offensive-in-formerly-quiet-northern-afghanistan/</link>
<pubDate>Sat, 28 Nov 2009 01:09:53 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/28/taliban-begins-new-offensive-in-formerly-quiet-northern-afghanistan/</guid>
<description><![CDATA[By CARLOTTA GALL NYT KUNDUZ, Afghanistan — Far from the heartland of the Taliban insurgency in the s]]></description>
<content:encoded><![CDATA[By CARLOTTA GALL NYT KUNDUZ, Afghanistan — Far from the heartland of the Taliban insurgency in the s]]></content:encoded>
</item>
<item>
<title><![CDATA[HELL BENT: Former UK Ambassador to UN describes US march to Iraq War]]></title>
<link>http://onthedefense.wordpress.com/2009/11/28/hell-bent-former-uk-ambassador-to-un-describes-us-march-to-iraq-war/</link>
<pubDate>Sat, 28 Nov 2009 00:03:15 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/28/hell-bent-former-uk-ambassador-to-un-describes-us-march-to-iraq-war/</guid>
<description><![CDATA[By David Stringer &#8211; The Associated Press LONDON — The United States was “hell bent” on a 2003 ]]></description>
<content:encoded><![CDATA[By David Stringer &#8211; The Associated Press LONDON — The United States was “hell bent” on a 2003 ]]></content:encoded>
</item>
<item>
<title><![CDATA[WHEEL OF JUDGEMENT: Spin of Wheel May Determine 9/11 trial judge]]></title>
<link>http://onthedefense.wordpress.com/2009/11/27/wheel-of-judgement-spin-of-wheel-may-determine-911-trial-judge/</link>
<pubDate>Fri, 27 Nov 2009 22:02:50 +0000</pubDate>
<dc:creator>onthedefense</dc:creator>
<guid>http://onthedefense.wordpress.com/2009/11/27/wheel-of-judgement-spin-of-wheel-may-determine-911-trial-judge/</guid>
<description><![CDATA[By BENJAMIN WEISER- NYT At first glance, the wooden wheel looks as if it might have been used to cal]]></description>
<content:encoded><![CDATA[By BENJAMIN WEISER- NYT At first glance, the wooden wheel looks as if it might have been used to cal]]></content:encoded>
</item>

</channel>
</rss>
