<?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"
	>

<channel>
	<title>edgeblog &#187; Systems</title>
	<atom:link href="http://www.edgeblog.net/category/systems/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.edgeblog.net</link>
	<description>Notes from the edge</description>
	<pubDate>Fri, 25 Jan 2008 18:53:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Windows is better than Unix/Linux, sometimes.</title>
		<link>http://www.edgeblog.net/2008/windows-is-better-than-unixlinux-sometimes/</link>
		<comments>http://www.edgeblog.net/2008/windows-is-better-than-unixlinux-sometimes/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 14:00:08 +0000</pubDate>
		<dc:creator>Jerry</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Popular]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Systems]]></category>

		<guid isPermaLink="false">http://www.edgeblog.net/2008/windows-is-better-than-unixlinux-sometimes/</guid>
		<description><![CDATA[Well, I agreed with the article, until I read the part that said "Windows is better than Unix/Linux."

Oh wait, that was the first sentence.]]></description>
		<wfw:commentRss>http://www.edgeblog.net/2008/windows-is-better-than-unixlinux-sometimes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Top 5 Ways Windows is Better Than Unix or Linux</title>
		<link>http://www.edgeblog.net/2008/top-5-ways-windows-is-better-than-unix-or-linux/</link>
		<comments>http://www.edgeblog.net/2008/top-5-ways-windows-is-better-than-unix-or-linux/#comments</comments>
		<pubDate>Mon, 07 Jan 2008 14:00:54 +0000</pubDate>
		<dc:creator>bill</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Popular]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Systems]]></category>

		<guid isPermaLink="false">http://www.edgeblog.net/2008/top-5-ways-windows-is-better-than-unix-or-linux/</guid>
		<description><![CDATA[There are many functions that Windows performs better than *nix, and the *nix community should embrace them. If you cannot recognize the areas where Microsoft excels, you are artificially narrowing your view of the world, which means you aren't making the best technology decisions for your company. As a public service to *nix admins everywhere, I offer this list of 5 ways Windows is better than *nix:
   1. Windows XP is the best productivity desktop
   2. Windows 2003 Active Directory Service is the best directory service
   3. Windows DNS is the best internal DNS server
   4. Exchange 2007 is the best groupware application platform
   5. Windows has better hardware support with vendor-supported drivers
]]></description>
		<wfw:commentRss>http://www.edgeblog.net/2008/top-5-ways-windows-is-better-than-unix-or-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>In Search of Five 9s - Calculating Availability of Complex Systems</title>
		<link>http://www.edgeblog.net/2007/in-search-of-five-9s/</link>
		<comments>http://www.edgeblog.net/2007/in-search-of-five-9s/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 12:30:42 +0000</pubDate>
		<dc:creator>bill</dc:creator>
		
		<category><![CDATA[Data Center Design]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[Systems]]></category>

		<guid isPermaLink="false">http://www.edgeblog.net/2007/in-search-of-five-9s/</guid>
		<description><![CDATA[     <link rel="alternate" type="application/atom+xml" title="edgeblog Category: Data Center Design" href="http://www.edgeblog.net/category/data-center-design/feed/" />
     <link rel="alternate" type="application/atom+xml" title="edgeblog Category: General" href="http://www.edgeblog.net/category/general/feed/" />
     <link rel="alternate" type="application/atom+xml" title="edgeblog Category: Systems" href="http://www.edgeblog.net/category/systems/feed/" />
<p>I&#8217;ve spent the past few days trying to develop a simple mathematical model to predict the expected availability of complex systems. In IT, we are often asked to develop and commit to service level agreements (SLAs). If the points of failure of the system are not analyzed, and then the system availability calculated, the SLA is flawed from the beginning. To complicate matters further, different people have different definitions of availability. For instance, does scheduled downtime for maintenance count against your system availability calculation?</p>
<p>Common Availability Definitions:</p>
<ol>
<li>Availability = MTBF/(MTTR+MTBF) (Mean Time Between Failure, Mean Time To Recover). This is a classic definition of availability and is often used by hardware manufacturers when they publish an availability metric for a given server.</li>
<li>Availability = (Uptime + Scheduled Maintenance)/(Unscheduled Downtime + Uptime + Scheduled Maintenance). This is an IT centric availability metric where the business can support scheduled downtime after hours. This model works for some types of systems, such as a file server that isn&#8217;t needed at night, but it doesn&#8217;t work as well for websites, even though many web companies still use this for their SLAs.</li>
<li>Availability = Uptime/(Uptime + Downtime). This metric best applies to systems that are needed 24&#215;7 such as e-commerce sites.</li>
</ol>
<p>Availability is most often expressed as a percentage. Sometimes, people will refer to &#8220;four nines&#8221; (99.99%) or &#8220;five nines&#8221; (99.999%). To simplify things, the following table shows the minutes of downtime allowed per year for a given availability level:</p>
<table border="1" align="center">
<tr>
<th>
<p align="center">Availability</p>
</th>
<th>Min Downtime/Year</th>
<th>
<p align="center">Hours Downtime/Year</p>
</th>
</tr>
<tr>
<td align="center">95.000%</td>
<td align="center">26,298</td>
<td align="center">438</td>
</tr>
<tr>
<td align="center">98.000%</td>
<td align="center">10,519</td>
<td align="center">175</td>
</tr>
<tr>
<td align="center">98.500%</td>
<td align="center">7,889</td>
<td align="center">131</td>
</tr>
<tr>
<td align="center">99.000%</td>
<td align="center">5,260</td>
<td align="center">88</td>
</tr>
<tr>
<td align="center">99.500%</td>
<td align="center">2,630</td>
<td align="center">44</td>
</tr>
<tr>
<td align="center">99.900%</td>
<td align="center">526</td>
<td align="center">8.8</td>
</tr>
<tr>
<td align="center">99.990%</td>
<td align="center">52.6</td>
<td align="center">.88</td>
</tr>
<tr>
<td align="center">99.999%</td>
<td align="center">5.26</td>
<td align="center">.088</td>
</tr>
</table>
<p><!--more-->Based on the above table, you can see there is a big difference between an SLA specifying 99% availability (88 hours of downtime per year) and 99.9% availability (8.8 hours of downtime per year). But how can we be sure what the expected downtime of the system is? In the most simplistic form, the expected availability of a system equals the expected availability of each of the components of the system multiplied together. So if the system was composed of two servers, and each server had an expected availability of 99%, then the expected availability of the system would be 99% * 99% = 98.01%. Note: I have used the term &#8220;expected availaibilty.&#8221; We are calculating a future expectation of the system over an extended period of time, not a historical availability. For the rest of this article, I will drop the term expected for brevity, but it is always implied.</p>
<p>The simplistic model above is useful for illustrating the point that downtime is cumulative. In other words, if I expect each component to be down 88 hours/year, and a failure of either component is a failure of the system, then the system has an expected downtime of 174 hours. Why not 176 hours? Well, occasionally both components will be down at the same time.</p>
<p>Real world systems are never this simple. Typically, the system will be comprised of multiple components, some with redundancy, and each with different levels of component availability. Modeling these requires slightly more complicated formulas, but once you have the concepts down, then the actual calculations can be quickly performed in a spreadsheet. Before we move forward, we need some basic notations to simplify our formulas:</p>
<p id="code"><strong>Basic Nomenclature</strong><br />
Availability Component 1 = Ac<sub>1</sub><br />
Availability Component 2 = Ac<sub>2</sub><br />
Availability Component 3 = Ac<sub>3</sub><br />
Availability Component n = Ac<sub>n</sub><br />
Availability System = As</p>
<p>Now that that is out of the way, we are ready for our first formula. When a system is made up of n number of components that are each single points of failure then the system availability can be calculated as:</p>
<p><strong>EQUATION #1: As = Ac<sub>1</sub> * Ac<sub>2</sub> * Ac<sub>3</sub> * &#8230;Ac<sub>n</sub></strong></p>
<p>Consider a 24&#215;7 e-commerce site with lots of single points of failure. We might model the site as having the following eight components:</p>
<table border="1" align="center">
<tr>
<th>
<p align="center">Component</p>
</th>
<th>
<p align="center">Availability</p>
</th>
</tr>
<tr>
<td align="center">Web</td>
<td align="center">85%</td>
</tr>
<tr>
<td align="center">Application</td>
<td align="center">90%</td>
</tr>
<tr>
<td align="center">Database</td>
<td align="center">99.9%</td>
</tr>
<tr>
<td align="center">DNS</td>
<td align="center">98%</td>
</tr>
<tr>
<td align="center">Firewall</td>
<td align="center">85%</td>
</tr>
<tr>
<td align="center">Switch</td>
<td align="center">99%</td>
</tr>
<tr>
<td align="center">Data Center</td>
<td align="center">99.99%</td>
</tr>
<tr>
<td align="center">ISP</td>
<td align="center">95%</td>
</tr>
</table>
<p>If any of these components fails, the website will crash. The expected availability of the site would be 85%*90%*99.9%*98%*85%*99%*99.99%*95% = 59.87%. Note that we are modeling each component as a whole, rather than looking at its parts. We could break down the web service into software (Apache), code (our web site), and hardware (motherboard, hard drives, etc.). For our purposes, complexity does not necessarily improve the model, so we will deal with the service as a whole. Also, for this discussion we will use the third definition of availability above. To our users, it does not matter if the site is down because of maintenance or a hard drive failed.</p>
<p>Assuming we want to keep our jobs, we need to figure out a way to increase this availability. Two obvious targets for improving the site stability would be the web service and the firewall. The question is, what effect would adding another web server have on the availability of this service. This leads us to our second equation. When a system is comprised of two redundant components, then the availability of the system can be calculated as:</p>
<p><strong>EQUATION #2: As = Ac<sub>1</sub> + ((1 - Ac<sub>1</sub>) * Ac<sub>2</sub>)</strong></p>
<p>Using our example of a web server with an availability of 85%, then adding a second server would increase the availability to: 85% + (1-85%)*85% = 97.75%. The logic behind this is that when the 1st server is down (15% of the time), the second server is still up 85% of the time. This may or may not translate into actual real world availability. For instance, if the web server was down so often because we constantly need to take it offline to deploy new code, then adding a second server should translate to higher availability, because we could deploy code to one offline server, while the other server stays up. In this case, our real world availability increase might be greater than 12.75%. Conversely, if our service is down due to code bugs, then adding a second server could in some cases make the availability worse by exasperating the bug.</p>
<p>The point is that in general if you&#8217;ve accurately estimated the availability of the component, then the equation will work. Note also that the equation works even if the components have unequal availability estimates. Assume that the web server has an availability problem because the hardware is undersized. Now assume the second server we purchase has twice the capacity, and we determine that by itself the availability of the new server would be 90%, then our equation changes to: 85% + (1-85%)*90% = 98.5%.</p>
<p>So let&#8217;s add this back into our system calculation above. Assume that we add a second web server, and a second firewall, increasing the availability of each component system to 97.75%. Now, the availability of our system would be: 97.75%*90%*99.9%*98%*97.75%*99%*99.99%*95% =79.10%. Better, but still not great. It is hard to achieve any level of high availability when you have single points of failure. So let&#8217;s assume that we add a redundant component for all our servers and network equipment. Let&#8217;s also assume we add a second ISP for carrier diversity, but we are still within one physical data center. Our availability equation would now be: 97.75%*99%*99.9999%*99.96%*97.75%*99.99%*99.99%*99.75% = 94.3%. Getting better. Removing single points of failure improved our availability of the system from 60% (3506 hours of downtime/year) to 94.3% (500 hours of downtime/year).</p>
<p>Equation #2 above modeled adding a single redundant component. In some cases, we may add more than one redundant component. For example, we may have more than two web servers. In this case, we need to iterate through equation #2 multiple times to find the effect of the additional components, which brings us to our third equation. When trying to calculate the availability of a service with n number of redundant components, we calculate it as:</p>
<p><strong>EQUATION #3: As = Ac<sub>(n-1)</sub> + ((1 - Ac<sub>(n-1)</sub>) * Ac<sub>n</sub>)</strong></p>
<p>In the case of our web service, adding a 3rd server would change the availability to: 97.75% + (1-97.75%)*85% = 99.6625%. Adding a fourth server would increase availability to: 99.6625% + (1-99.6625%)*85% = 99.949%. Note that there is a diminishing level of return. Adding a 2nd server increased availability by 12.75%. Adding a 3rd server only gained us 1.9125%. The fourth server bought us a paltry .2865%. And yet, even with 3 more servers than we need to service our load, we still have not yet achieved the elusive four nines of availability. Designing a highly available system requires us to make individual components highly available AND add redundancy of components. If the individual web server in our example had an availability of 90%, instead of 85%, then the availability of two servers would be 99% and three servers would be 99.99%.</p>
<p>Equations 2 &amp; 3 have a simple flaw, in that they assume a single component can handle the load, and that the load is constant. What if under normal operations, one web server can handle the load, but under peak, we need three servers? Then our availability for three servers under normal load would be 99.775%, but under peak load, the availability would drop back to 85%. Under peak load, the failure of one server would cause a loss of the service, so we drop back to the availability of a single box. What if our peak load required 2 servers? In this case, the availability under peak would be 97.75%. If peak requires two servers, and we have three, then we can lose one server and still be operational, therefore our availability is the equivalent of having two servers. The important concept here is <strong>there is an inverse relationship between load and availability</strong>.</p>
<p>What should be obvious by now, is that achieving truly high levels of availability (99.9% - 99.999%) is very difficult and very expensive. One of the most expensive single points of failure to eliminate is the data center. In most cases, this effectively doubles the cost of your infrastructure, and the cost may be even greater than 2x, because you will often need to invest in technology to keep the servers in each data center in synch with each other.</p>
<p>Consider, however, the impact of adding a fully redundant data center. In our example above, the availability of our data center will redundant servers and ISPs was 94.3%. Adding a second data center with the necessary technology to make both centers work active-active (both data centers take traffic at the same time) would increase our availability to: 94.3% + (1-94.3%)*94.3% = 99.675%. Adding a second data center saved us 471 hours of downtime per year!</p>
<p>In this example, we assumed that each data center was an independent system, so a failure of a service in one data center would be a failure of the entire system in that data center. This is not always the case. For instance, if properly designed, a web server in one data center could connect to a database server in the other data center. In this case, the expected availability of the system would be higher that 99.675%. If you were able to design your site so that each service operated independent of the other services, then the availability in our example would increase from 99.675% to 99.888% (each service would have 3 redundant components, except the data center, which would have 1 redundant component).</p>
<p>These formulas are much easier to play with in Excel. Paste the following table into a spreadsheet, starting at cell A1:</p>
<table border="1" align="center">
<tr>
<td>
<p align="center"><strong>Avail %</strong></p>
</td>
<td>
<p align="center"><strong>1 Component</strong></p>
</td>
<td>
<p align="center"><strong>2 Components</strong></p>
</td>
<td>
<p align="center"><strong>3 Components</strong></p>
</td>
<td>
<p align="center"><strong>4 Components</strong></p>
</td>
</tr>
<tr>
<td align="center">Web</td>
<td align="center">85%</td>
<td align="center">=B2+((1-B2)*$B2)</td>
<td align="center">=C2+((1-C2)*$B2)</td>
<td align="center">=D2+((1-D2)*$B2)</td>
</tr>
<tr>
<td align="center">Application</td>
<td align="center">90%</td>
<td align="center">=B3+((1-B3)*$B3)</td>
<td align="center">=C3+((1-C3)*$B3)</td>
<td align="center">=D3+((1-D3)*$B3)</td>
</tr>
<tr>
<td align="center">Database</td>
<td align="center">99.9%</td>
<td align="center">=B4+((1-B4)*$B4)</td>
<td align="center">=C4+((1-C4)*$B4)</td>
<td align="center">=D4+((1-D4)*$B4)</td>
</tr>
<tr>
<td align="center">DNS</td>
<td align="center">98%</td>
<td align="center">=B5+((1-B5)*$B5)</td>
<td align="center">=C5+((1-C5)*$B5)</td>
<td align="center">=D5+((1-D5)*$B5)</td>
</tr>
<tr>
<td align="center">Firewall</td>
<td align="center">85%</td>
<td align="center">=B6+((1-B6)*$B6)</td>
<td align="center">=C6+((1-C6)*$B6)</td>
<td align="center">=D6+((1-D6)*$B6)</td>
</tr>
<tr>
<td align="center">Switch</td>
<td align="center">99%</td>
<td align="center">=B7+((1-B7)*$B7)</td>
<td align="center">=C7+((1-C7)*$B7)</td>
<td align="center">=D7+((1-D7)*$B7)</td>
</tr>
<tr>
<td align="center">Data Center</td>
<td align="center">99.99%</td>
<td align="center"> </td>
<td align="center">=B8+((1-B8)*$B8)</td>
<td align="center"> </td>
</tr>
<tr>
<td align="center">ISP</td>
<td align="center">95%</td>
<td align="center">=B9+((1-B9)*$B9)</td>
<td align="center">=C9+((1-C9)*$B9)</td>
<td align="center">=D9+((1-D9)*$B9)</td>
</tr>
<tr>
<td align="center"><strong>System Avail %</strong></td>
<td align="center">=b2*b3*b4*b5<br />
*b6*b7*b8*b9</td>
<td align="center">=c2*c3*c4*c5<br />
*c6*c7*b8*c9</td>
<td align="center">=d2*d3*d4*d5<br />
*d6*d7*d8*d9</td>
<td align="center">=e2*e3*e4*e5<br />
*e6*e7*d8*e9</td>
</tr>
</table>
<p>Now that you have the basic concepts down, and the beginnings of a spreadsheet for calculating changes to our assumptions, you can focus on applying these theories to your unique situation. Start by breaking down your system, be it a web site, an accounting system, or a file server, into individual component services. For each service, determine the minimum number of units required for the system to work, and the expected availability of a unit.</p>
<p>Estimating availability can be a challenge. One method would be to look at historical data. If you don&#8217;t have access to good data, you can form an estimate based upon your standard operating parameters. For instance, if you release new code to your web server twice per month, and each release causes 2 hours of downtime, that would translate to 48 hours of downtime per year. If you expect to perform operating system maintenance once per quarter, at an estimated downtime of 2 hours per quarter, that would equal another 8 hours per year. If you also anticipate one hardware failure per year, and had a next business day warranty, that would translate to on average 41 hours of downtime per year (Friday outages get repaired on Monday. Saturday and Sunday outages get repaired on Tuesday). Adding these numbers up, we get: 48 + 8 + 41 = 98 hours of downtime per year, or an estimated 98.882% availability.</p>
<p>With a little work, you can estimate a realistic level of availability of your system. This is the cornerstone of creating realistic and attainable SLAs. These formulas can help IT negotiate SLAs with the business, and can help determine the comparative ROI of different solutions. For instance, let&#8217;s say you were trying to choose a web server solution, and you had two choices:</p>
<ul>
<li>Choice number 1 consists of 4 servers using cheap hardware with no internal redundancy. Each server costs $3,000. You estimate the availability of each server to be 75%.</li>
<li>Choice number 2 consists of 2 servers using expensive hardware with redundant hard drives and power supplies. Each server costs $20,000. You estimate the availability of each server to be 99%.</li>
</ul>
<p>You estimate the cost of downtime to be $500/hour, and you expect these servers to support your site load with a single server for the next 3 years, after which they will be replaced. Using the above numbers, Solution #1 has an expected availability of 99.6%, at a cost of $12,000. Solution #2 has an expected availability of 99.99% at a cost of $40,000. Solution #1 would experience 34 hours/year, or 102 hours over three years of downtime more than solution #2. Over three years, this extra downtime would cost $51,000. So by spending $28,000 upfront, you would get a three year ROI of 182%. Note that the model is only as good as your estimates. If the servers in solution #2 only had 95% availability, then their combined availability would be 99.75%, which would only provide 13 hours less downtime per year. In this case, you would only save $20,000 in downtime over three years for your $28,000 investment, so you would be better off with solution #1.</p>
<p>Designing and operating highly available systems is complicated work, but with a few simple formulas, it is possible to understand and predict their behavior at a macro level. This will allow you to make better decisions when choosing between multiple options, and give more realistic predictions when negotiating SLAs.</p>
<p><a href="http://digg.com/linux_unix/In_Search_of_Five_9s_Calculating_Availability_of_Complex_Systems"><img width="85" src="http://digg.com/img/badges/85x10-digg-link.gif" alt="Digg!" height="10" /></a></p>
]]></description>
		<wfw:commentRss>http://www.edgeblog.net/2007/in-search-of-five-9s/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Lockdown Windows 2003 &#038; XP with Simple Scripts</title>
		<link>http://www.edgeblog.net/2007/lockdown-windows-2003-xp-with-simple-scripts/</link>
		<comments>http://www.edgeblog.net/2007/lockdown-windows-2003-xp-with-simple-scripts/#comments</comments>
		<pubDate>Sat, 17 Mar 2007 14:00:07 +0000</pubDate>
		<dc:creator>bill</dc:creator>
		
		<category><![CDATA[Scripting]]></category>

		<category><![CDATA[Security]]></category>

		<category><![CDATA[Systems]]></category>

		<guid isPermaLink="false">http://www.edgeblog.net/2007/lockdown-windows-2003-xp-with-simple-scripts/</guid>
		<description><![CDATA[<p><a href="http://www.amazon.com/gp/product/0735622442?ie=UTF8&amp;tag=bdog-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0735622442" target="_blank" title="Windows Advanced Scripting"><img src="http://www.edgeblog.net/wp-content/uploads/2007/06/script.thumbnail.jpg" title="Windows Advanced Scripting" alt="Windows Advanced Scripting" align="left" /></a>Now that DST 2007 is over, we are going to start a series of articles on securing systems and networks. I have built a lot of systems for various companies over the years. The challenge is to create repeatable processes that work in a variety of operating environments. Having a strong scripting toolkit can make all the difference, especially when you are under deadline.</p>
<p>The first script in the series is a Windows Services lockdown script for Windows XP &amp; 2003. Disabling services is generally a good idea to reduce the threat profile of your computer, and to improve its performance. Every security guide out there tells you to disable unnecessary services. A few of them also give some guidance as to which services are unnecessary. Few of them tell you how to disable them consistently.</p>
<p>There are three ways to disable services: 1) Use the Services MMC GUI. This is a time consuming process and is prone to mistakes. 2) Use Group Policy. This works well for environments that use Group Policy, but is harder to implement for stand-alone servers, such as web servers. 3) Use the <strong>sc.exe</strong> command line utility.</p>
<p>If you do not know the <strong>sc</strong> command, learn it! sc is a powerful utility for controlling services on local or remote hosts. sc will let you configure how services start, change the user account and password they run under, and start/stop/pause the services. The basic syntax of sc is:</p>
<p id="code">sc &lt;server&gt; [command] [service name] &lt;option1&gt; &lt;option2&gt;</p>
<p>We are going to use 2 different sc commands in our service lockdown script: config &amp; stop. These should be self explanatory, but config will allow us to disable the service, and stop will stop the service. To make this work, we need three files: 1) The script batch file; 2) a list of servers by name called hosts.txt; 3) a list of services we want to disable called services.txt. The two text files must be in the same directory as the batch file. The code is fairly simple:<!--more--></p>
<p id="code">REM***(c) 2007 William L. Dougherty<br />
REM***Script created by Bill Dougherty to disable services on Windows 2003 &amp; XP<br />
for /f %%a in (hosts.txt) do call :serviceconfig %%a<br />
goto :eom<br />
:serviceconfig<br />
for /f %%b in (services.txt) do (sc \\%1 config %%b start= disabled)<br />
for /f %%c in (services.txt) do (sc \\%1 stop %%c)<br />
:eom</p>
<p>Pretty simple, huh? We loop through a list of servers, and then for each server, we loop through a list of services. The service list must be the service name and not the display name of the services. Some service names are less than intuitive, such as the service name for IPSEC Services is PolicyAgent. You can get the service name from the services MMC by clicking the service and looking at its properties, or from the command line using sc query. Either way, once you build your service list the first time, you&#8217;ll rarely need to revist this.</p>
<p>This script requires you to have administrator access on the target host. This works great in a domain environment, but what if you are dealing with stand-alone servers? You can still use this script so long as the user credentials you are logged in as have admin access on the target. If not, the you&#8217;ll need to log into each server and run the script locally. If this is the case, you only need the script file and the list of services. You should modify the script like this:</p>
<p id="code">for /f %%b in (services.txt) do sc config %%b start= disabled<br />
for /f %%c in (services.txt) do sc stop %%c<br />
:eom</p>
<p>This script works with both Windows XP and Windows 2003, although the two platforms have different services. There are several good sources for figuring out which services are unnecessary. I highly recommend the TechRepublic guides: <a href="http://techrepublic.com.com/i/tr/downloads/home/windows_xp_services_that_can_be_disabled.pdf">XP Services Guide</a> and <a href="http://downloads.techrepublic.com.com/download.aspx?docid=172015">2003 Services Guide</a>. Over the years, I have developed my own lists. I highly recommend you spend the time to research these services, and test the impact of disabling them BEFORE you run this script against your production network!</p>
<p>Windows 2003 services that can be disable:</p>
<p id="code">Alerter<br />
AppMgmt<br />
ClipSrv<br />
TrkWks<br />
TrkSvr<br />
MSDTC<br />
ERSvc<br />
helpsvc<br />
HidServ<br />
ImapiService<br />
IsmServ<br />
LicenseService<br />
Messenger<br />
mnmsrvc<br />
NetDDE<br />
NetDDEdsdm<br />
nla<br />
NtLmSsp<br />
WmdmPmSM<br />
appmgr<br />
RemoteAccess<br />
SCardSvr<br />
SENS<br />
LmHosts<br />
TapiSrv<br />
TlntSvr<br />
Tssdis<br />
Themes<br />
uPS<br />
uploadmgr<br />
WebClient<br />
AudioSrv<br />
stisvc<br />
WZCSVC</p>
<p>Windows XP services that can be disabled:</p>
<p id="code">Alerter<br />
AppMgmt<br />
ClipSrv<br />
TrkWks<br />
MSDTC<br />
ERSvc<br />
FastUserSwitchingCompatibility<br />
helpsvc<br />
HidServ<br />
CiSvc<br />
Messenger<br />
mnmsrvc<br />
NetDDE<br />
NetDDEdsdm<br />
nla<br />
NtLmSsp<br />
SysmonLog<br />
WmdmPmSM<br />
RSVP<br />
RemoteAccess<br />
SCardSvr<br />
SSDPSRV<br />
LmHosts<br />
TapiSrv<br />
TlntSvr<br />
Themes<br />
uPS<br />
upnphost<br />
WZCSVC</p>
<p>I hope you find this script useful. Check back often for additional scripts in the series.</p>
<p>-Bill</p>
]]></description>
		<wfw:commentRss>http://www.edgeblog.net/2007/lockdown-windows-2003-xp-with-simple-scripts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Daylight Saving Time - Windows Mobile Fix</title>
		<link>http://www.edgeblog.net/2007/daylight-saving-time-windows-mobile-fix/</link>
		<comments>http://www.edgeblog.net/2007/daylight-saving-time-windows-mobile-fix/#comments</comments>
		<pubDate>Tue, 16 Jan 2007 04:04:50 +0000</pubDate>
		<dc:creator>bill</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Systems]]></category>

		<guid isPermaLink="false">http://www.edgeblog.net/2007/daylight-saving-time-windows-mobile-fix/</guid>
		<description><![CDATA[<p><img src="http://www.edgeblog.net/wp-content/uploads/2007/01/clock.thumbnail.jpg" id="image85" title="Daylight Saving Time" alt="Daylight Saving Time" align="left" />As discussed <a href="http://www.edgeblog.net/2007/daylight-saving-time-the-year-2007-problem">here</a>, the Daylight Saving Time change for 2007 is going to cause problems for unpatched technologies. Most vendors, including Microsoft, have released patches. One big area that is lacking is Windows Mobile smartphones &amp; PDAs. Microsoft release a registry fix and instructed the carriers to push out a patch. Most of the carriers, in their infinite wisdom, have neglected to do so. If you rely on your Windows smartphone, you need this fix. Microsoft published the registry fix <a href="http://support.microsoft.com/kb/923953" target="_blank">here</a>. This fix requires you to build a CAB file and then install it. To save you the trouble, I have bundled the CAB file for you:</p>
<p><a href="http://www.edgeblog.net/downloads/DST2007WM5.cab" title="Microsoft Windows Mobile Daylight Saving Time Patch" target="_blank">Microsoft Windows Mobile Daylight Saving Time Patch</a></p>
<p>You can either download the CAB file directly to your cell phone, or download to your PC, copy it via activesync to your phone, and then run it.<!--more--></p>
<p>Since I never recommend just trusting an executable you find online, you may want to check the contents of this file. If you save it with a .txt extension, you can open it with notepad. There will be some extra characters, but the bulk of the file should match the patch from Microsoft. If you want to create your own CAB file, you need the cabwiz.exe executable with is part of Visual Studio. Save the code below as a .INF file and then run cabwiz.exe against it.</p>
<p id="code">[Version]<br />
Signature=&#8221;$Windows NT$&#8221;<br />
Provider=&#8221;Microsoft&#8221;<br />
CESignature=&#8221;$Windows CE$&#8221;[DefaultInstall]<br />
AddReg = RegSettings.All</p>
<p>[SourceDisksNames]<br />
1 = ,&#8221;Common Files&#8221;, , C:\My_Cabs\DST2007WM5</p>
<p>[SourceDisksFiles]<br />
readme.htm = 1</p>
<p>[DestinationDirs]<br />
Files.Common = 0, %CE3%<br />
DefaultDestDir = 0,%InstallDir%</p>
<p>[CEStrings]<br />
AppName = &#8220;Update for 2007 Daylight Saving Time&#8221;<br />
InstallDir = %CE3%</p>
<p>[Strings]<br />
NEW = &#8220;SOFTWARE\Microsoft\Timezones\60&#8243;<br />
ATL = &#8220;SOFTWARE\Microsoft\Timezones\50&#8243;<br />
EST = &#8220;SOFTWARE\Microsoft\Timezones\35&#8243;<br />
CTL = &#8220;SOFTWARE\Microsoft\Timezones\20&#8243;<br />
MNT = &#8220;SOFTWARE\Microsoft\Timezones\10&#8243;<br />
PAC = &#8220;SOFTWARE\Microsoft\Timezones\4&#8243;<br />
ALS = &#8220;SOFTWARE\Microsoft\Timezones\3&#8243;<br />
CHI = &#8220;SOFTWARE\Microsoft\Timezones\13&#8243;<br />
MXC = &#8220;SOFTWARE\Microsoft\Timezones\30&#8243;<br />
TJA = &#8220;SOFTWARE\Microsoft\Timezones\5&#8243;</p>
<p>[Files.Common]<br />
readme.htm,,,0</p>
<p>[RegSettings.All]<br />
;GMT-3:30 Newfoundland<br />
HKLM,%NEW%, TZI, 0&#215;00000001,d2,00,00,00,00,00,00,00,c4,ff,ff,ff,00,00,0b,<br />
00,00,00,01,00,02,00,00,00,00,00,00,00,00,00,03,00,00,00,<br />
02,00,02,00,00,00,00,00,00,00</p>
<p>;GMT-4 Atlantic<br />
HKLM,%ATL%, TZI, 0&#215;00000001,f0,00,00,00,00,00,00,00,c4,ff,ff,ff,00,00,<br />
0b,00,00,00,01,00,02,00,00,00,00,00,00,00,00,00,03,00,00,00,<br />
02,00,02,00,00,00,00,00,00,00</p>
<p>;GMT-5 Eastern US<br />
HKLM,%EST%, TZI, 0&#215;00000001,2c,01,00,00,00,00,00,00,c4,ff,ff,ff,00,00,0b,<br />
00,00,00,01,00,02,00,00,00,00,00,00,00,00,00,03,00,00,00,<br />
02,00,02,00,00,00,00,00,00,00</p>
<p>;GMT-6 Central US<br />
HKLM,%CTL%, TZI, 0&#215;00000001,68,01,00,00,00,00,00,00,c4,ff,ff,ff,00,00,0b,<br />
00,00,00,01,00,02,00,00,00,00,00,00,00,00,00,03,00,00,00,<br />
02,00,02,00,00,00,00,00,00,00</p>
<p>;GMT-7 Mountain US<br />
HKLM,%MNT%, TZI, 0&#215;00000001,a4,01,00,00,00,00,00,00,c4,ff,ff,ff,00,00,0b,<br />
00,00,00,01,00,02,00,00,00,00,00,00,00,00,00,03,00,00,00,<br />
02,00,02,00,00,00,00,00,00,00</p>
<p>;GMT-8 Pacific US<br />
HKLM,%PAC%, TZI, 0&#215;00000001,e0,01,00,00,00,00,00,00,c4,ff,ff,ff,00,00,0b,<br />
00,00,00,01,00,02,00,00,00,00,00,00,00,00,00,03,00,00,00,<br />
02,00,02,00,00,00,00,00,00,00</p>
<p>;GMT-9 Alaska<br />
HKLM,%ALS%, TZI, 0&#215;00000001,1c,02,00,00,00,00,00,00,c4,ff,ff,ff,00,00,0b,<br />
00,00,00,01,00,02,00,00,00,00,00,00,00,00,00,03,00,00,00,<br />
02,00,02,00,00,00,00,00,00,00</p>
<p>;GMT-7 Chihuahua, La Paz<br />
HKLM,%CHI%, TZI, 0&#215;00000001,a4,01,00,00,00,00,00,00,c4,ff,ff,ff,00,00,0a,<br />
00,00,00,05,00,02,00,00,00,00,00,00,00,00,00,04,00,00,00,<br />
01,00,02,00,00,00,00,00,00,00</p>
<p>;GMT-6 Mexico City, Monterrey<br />
HKLM,%MXC%, TZI, 0&#215;00000001,68,01,00,00,00,00,00,00,c4,ff,ff,ff,00,00,0a,<br />
00,00,00,05,00,02,00,00,00,00,00,00,00,00,00,04,00,00,00,<br />
01,00,02,00,00,00,00,00,00,00</p>
<p>;GMT-8 Tijuana, Baja California<br />
HKLM,%TJA%, TZI, 0&#215;00000001,e0,01,00,00,00,00,00,00,c4,ff,ff,ff,00,00,0a,<br />
00,00,00,05,00,02,00,00,00,00,00,00,00,00,00,04,00,00,00,<br />
01,00,02,00,00,00,00,00,00,00<br />
HKLM,%TJA%, Display, 0&#215;00000000, &#8220;GMT-8 Tijuana, Baja California&#8221;</p>
<p>I confirmed using <a href="http://www.breaksoft.com/Blog/Utilities/2005/1/Mobile_Registry_Editor.aspx" target="_blank">Mobile Registry Editor</a> from <a href="http://www.breaksoft.com/">http://www.breaksoft.com/</a> that the keys did not exist before the patch, and now exist after the patch, on my Samsung Blackjack. The only way I know to test that the patch works is to change the date/time on your phone to March 11, 2007 01:59:00AM and see what happens. Since I am lazy, I plan to wait until March 11 &amp; just see what happens. If you test this patch before then, please leave a comment and let me know if it works.</p>
<p>-Bill</p>
<p><strong>UPDATE - 01/29/2007</strong></p>
<p>Thanks to Eric for figuring this out: Once you apply the patch, you must manually change your timezone to something else and click apply. After that, change it back to your correct time zone. This forces the phone to re-read the registry file. I tested this on my Blackjack and it worked perfect. The phone changed the time correctly at 03/11/2007 2:00AM to 3:00AM and gave me a dialog box telling me it had adjusted for DST.</p>
<p><strong>UPDATE - 02/06/2007</strong></p>
<p>David found the following link to a similar fix for Australian time zone changes: <a href="http://www.pocketpcthoughts.com/articles.php?action=expand,53751">http://www.pocketpcthoughts.com/articles.php?action=expand,53751</a>. I have not tested these CABs so use at your own risk.</p>
<p><strong>UPDATE - 03/07/2007</strong></p>
<p>Mike found an updated patch released by Microsoft. Details can be found here:  <a href="http://www.microsoft.com/windowsmobile/daylightsaving/default.mspx" target="_blank">http://www.microsoft.com/windowsmobile/daylightsaving/default.msp</a>. I recommend everyone install this patch instead of my unsupported CAB file.</p>
]]></description>
		<wfw:commentRss>http://www.edgeblog.net/2007/daylight-saving-time-windows-mobile-fix/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.586 seconds -->
