<?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>The blog of Karl Majer... &#187; Systems Administration</title>
	<atom:link href="http://www.karlmajer.com/category/work/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.karlmajer.com</link>
	<description>Life on my own terms...</description>
	<lastBuildDate>Mon, 28 Mar 2011 17:04:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Fun with macs, CACs, and Certs (and iPhone dev).</title>
		<link>http://www.karlmajer.com/2010/02/23/fun-with-macs-cacs-and-certs-and-iphone-dev/</link>
		<comments>http://www.karlmajer.com/2010/02/23/fun-with-macs-cacs-and-certs-and-iphone-dev/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 14:47:09 +0000</pubDate>
		<dc:creator>Karl Majer</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Mobile Devices]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[iPhone/iPad]]></category>
		<category><![CDATA[cac cards]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[win7]]></category>

		<guid isPermaLink="false">http://www.karlmajer.com/?p=132</guid>
		<description><![CDATA[Just a quick post to save others some time and a little pain: OSX 10.6.2 + SCR3110 CAC reader + new GX4 CAC card == No love on OSX. Keychain sees the card as empty. However, 10.6.2 + VMWare + win7-64 + reader + CAC card + IE works just fine without any of the [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick post to save others some time and a little pain:</p>
<p>OSX 10.6.2 + SCR3110 CAC reader + new GX4 CAC card == No love on OSX. Keychain sees the card as empty.</p>
<p>However, 10.6.2 + VMWare + win7-64 + reader + CAC card + IE works just fine without any of the add-on software used on XP. You&#8217;ll need to pass the reader through to the VM by clicking on the little USB icons in the bottom right.</p>
<p>On another note, a Verisign EAC Certificate loaded in your keychain will cause codesign to hang for 8-10 minutes while it asks oscpd to validate the cert. This also happens when you use Keychain Access to go try and figure out why its taking so long to sign things. Work around it by either dropping your network when you need to sign things, or more permanently, drop your network and then use Keychain Access to remove the cert altogether. Save yourself the pain and load the EAC cert directly into firefox and use that browser to access the EAC enabled sites.</p>
<p>And finally, if you have the reader plugged in with a card in it and try to sign an iPhone application you will probably get the error: CSSMERR_DL_MISSING_VALUE. Keychain Access on 10.6.2 recognizes the reader and if the card is plugged in, Keychain Access seems to want to try and use it for signing. Take the card out of the reader and try again.</p>
<p>>>> Karl</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlmajer.com/2010/02/23/fun-with-macs-cacs-and-certs-and-iphone-dev/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Experiences with cfengine.</title>
		<link>http://www.karlmajer.com/2008/05/19/experiences-with-cfengine/</link>
		<comments>http://www.karlmajer.com/2008/05/19/experiences-with-cfengine/#comments</comments>
		<pubDate>Mon, 19 May 2008 12:45:19 +0000</pubDate>
		<dc:creator>Karl Majer</dc:creator>
				<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Cfengine]]></category>

		<guid isPermaLink="false">http://www.karlmajer.com/?p=27</guid>
		<description><![CDATA[At a customer site I’ve had both the pleasure and pain of working with cfengine as a means to control the environment from a single touchpoint. The client decided to save the precious little time they had and to use readily available packages for the software instead of building the software from scratch. This resulted [...]]]></description>
			<content:encoded><![CDATA[<p>At a customer site I’ve had both the pleasure and pain of working with cfengine as a means to control the environment from a single touchpoint. The client decided to save the precious little time they had and to use readily available packages for the software instead of building the software from scratch. This resulted in mixed versions between the RedHat and Solaris machines with RedHat running the 2.2.x series code and Solaris on 2.1.x. What followed over the months were several exercises in frustration.<br />
Cfengine was picked after an evaluation showed that it was capable of updating system files across machines and pushing files from the repository to the individual hosts. With the proof of concept working and with high hopes from the functionality referred to in the documentation, cfengine was rolled onto the network.<br />
The first task was relatively straightforward; insure that the staff member’s logins were always present in the sudoers file. The site was using several group aliases to define various sudoers functions, which leaded to order dependencies in the file. The solution found was to delete all of the aliases and groups definitions and re-add them each pass. This was found to work until it was realized that this would happen from cron every 15 minutes. Not quite what was hoped for. The configuration was ultimately altered to explicitly look for a lack of team members before beginning any of the updates.<br />
The next task was to distribute a dozen or so files from the central repository to all 250 or so machines. This worked almost perfectly and required only a bit of tuning on the MaxConnections, MaxCfengins, and Splay time directives. The current challenge with this task now is to ensure that all of the installed machines do the pull on an update as it seems that occasionally some small percentage of them, typically Solaris, refuse to pull the files without some manual cfrun intervention.<br />
An Editfiles directive is provided to allow the editing of arbitrary files. Using this for the next task, editing the crontab on linux was straightforward and linux cron noticed the change immediately. On solaris this was not the case. Editing the files was the easy part. After editing the file the cron daemon needs to be made aware of the change, and so either the process needs to be restarted or the crontab command needs to be used to reread the file. Unfortunately, the Process directive proved to be little use on the older cfengine and the Shell directive was used to write custom inline shell scripts to handle the stopping and starting of cron.<br />
The most recent change to the network involved manipulating the fstab on both OSes, removing an NFS mount, and then changing the former mount point from a directory to a symlink. There is an Unmount directive that would have worked beautifully had it worked on both OSes. It worked fine with Linux, unmounting the FS and deleting the entry and directory for us. Sadly, on Solaris it did nothing. To promote overall consistency it was opted to do manipulations on both operating systems in the same manner. An Editfiles stanza was used to manipulate the (v)fstabs, while a long chain of shell commands to ensure that the filesystem was unmounted, the fstabs were edited, and the symlink was created. Each component set a success or failure flag to enable the script to proceed to the next step or fail and alert as the case may be. This is probably the most complex script used at the customer site.<br />
I’m unable to say for certain how much of the pain with the software is caused by the mixed versions being used on the network. It could be that if there was time to build and upgrade the software across the machines to the same version that the problems would magically disappear. It could also be that while powerful and seemingly capable, cfengine does things in a slightly different manner than a sysadmin, making the would-be cfengine administrator configuring it have to double check everything they write. (An example of this is the symlink directive which uses target-&gt;source whereas the ln command uses source-&gt;target.) Documentation and error reporting for the product was also a challenge, especially with the mixed version. The version specific source was often referred to understand what an error means or to determine why a specific section of code was being ignored. Cfengine will remain in place at the customer site for the foreseeable future, as despite its issues it is still better than touching each machine individually. Only time will tell if a complete upgrade to a consistent version will remove some of the pain or if this is simply the way of cfengine.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlmajer.com/2008/05/19/experiences-with-cfengine/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Performance Testing &#8211; Tools of the Trade</title>
		<link>http://www.karlmajer.com/2008/02/18/performance-testing-tools-of-the-trade/</link>
		<comments>http://www.karlmajer.com/2008/02/18/performance-testing-tools-of-the-trade/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 04:15:20 +0000</pubDate>
		<dc:creator>Karl Majer</dc:creator>
				<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[perf testing]]></category>

		<guid isPermaLink="false">http://www.karlmajer.com/2008/02/18/performance-testing-tools-of-the-trade/</guid>
		<description><![CDATA[In the previous article we covered a brief load test scenario. It involved running load against a webserver and driving the server to failure to determine its capacity. What I did not discuss were the specific tools that could have been used during the testing period. Client Side: Wget – A non-interactive command line tool [...]]]></description>
			<content:encoded><![CDATA[<p>In the previous article we covered a brief load test scenario. It involved running load against a webserver and driving the server  to failure to determine its capacity. What I did not discuss were the specific tools that could have been used during the testing period.</p>
<p>Client Side:</p>
<p>Wget – A non-interactive command line tool to fetch https, http, and ftp items. It can easily be run from inside a script in a tight loop or used in recursive/mirror mode for crawling. It can be found at http://www.gnu.org/software/wget/.<br />
cURL- Another non-interactive command line tool. Much more extensive in its protocol support.  Available from http://curl.haxx.se/.  This tool was designed to fetch single URLs. It requires integration into a script to mirror/copy websites if such a behavior is desired.</p>
<p>The server side has several options depending on the OS being run. There are a few commands that are present on all OSes by default, and then there are OS specific commands as well.</p>
<p>Server Side:</p>
<p>Iostat provides thorough IO statstics for the machine. The command is native on Solaris as well as linux with the installation of the sysstat package. After watching the output run over time you can tell if the disk is lightly used, overloaded, or somewhere in-between. You can also tell if the drives are overwhelmed with many small transactions or content with large streaming writes. This is a good all round tool to get familiar with.</p>
<p>Next in line in the *stat family is vmstat. While iostat gives us a view into the disk subsystem, vmstat provides similar insight into the memory subsystem on the host. The command is natively present on Solaris and Linux. Vmstat is capable of showing you statistics on swap, memory paging characteristics, memory fault characteristics, and some additional information about run queues on the machine and CPU utilization. This is another good general tool to be familiar with.</p>
<p>Top is the next tool I used, and is probably the single most popular tool for getting an at-a-glance view to what the system is doing. It is a curses based application that periodically updates itself and constantly shows the top 20ish running items sorted by CPU utilization. While present in Linux, the application is not in the default Solaris installation. www.sunfreeware.com offers the package for download. Top typically requires minimal skill to interpret its output which makes it a good first line tool to see why a machine is behaving oddly.</p>
<p>Solaris offers two additional tools for observing system behavior: prstat and mpstat [edit: Seems Linux offers mpstat as well. It contains similar information to the Solaris version].</p>
<p>Prstat is very similar to top and shows  the top 20 or so processes by CPU utilization but through various command line options, can provide insight into threads and offer microstate accounting information  as well.</p>
<p>Mpstat is more in line with the vm/iostat line of commands and shows per cpu, or  processor set, statistics such as context switches, systems calls, etc.  The command can be used to determine if an application is thrashing the cpus in the machine or generally what the machine&#8217;s CPUs are doing.</p>
<p>Netstat is a utility which allows the user to see what the network stack on a machine is doing. It is useful for looking at the number of open sessions as well as the number of sessions in TIME_WAIT.</p>
<p>Finally, the sar command is also available to see what a given host is doing. The command is natively present on both linux and solaris. I personally tend not to use that as I can generally determine what I need from watching the *stat commands .</p>
<p>There is one additional tool which I use on Solaris and OSX, and that is dtrace. Dtrace is capable of instrumenting virtually anything on the fly and can provide amazing insight into what an application, or even the host, is doing at that moment without resulting to the instrumentation of binaries or adding typical splatterprint debug code to the binaries.</p>
<p>Essentially, I use the commands in approximately this order: top/prstat first to get a general overview of what the machine is doing. For more insight I open additional sessions on the machine and run iostat, vmstat, netstat, and possibly mpstat if available. Finally if I&#8217;m still unable to determine what the host is doing, and the server is running Solaris or OSX, I&#8217;ll use dtrace to look into the kernel or at the application for insight into whatever problem I&#8217;m chasing.</p>
<p>Whichever commands you decide to use, and whatever order you run them in, keep in mind one important point. Observing an experiment can affect the output of said experiment. This means that running all of those tools on a very burdened server may be enough to push the machine over the edge of unresponsiveness.</p>
<p>This concludes our brief introduction to the tools of the trade. If there is a demand and time permits I intend to write articles on the best practices for each of the commands.</p>
<p>If you like what you’ve read, please share the blog with others. If you have any questions or comments, feel free to send me email at kmajer at karlmajer dot com.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlmajer.com/2008/02/18/performance-testing-tools-of-the-trade/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Performance Testing &#8211; First Example &#8211; Notes</title>
		<link>http://www.karlmajer.com/2008/02/04/performance-testing-first-example-notes/</link>
		<comments>http://www.karlmajer.com/2008/02/04/performance-testing-first-example-notes/#comments</comments>
		<pubDate>Mon, 04 Feb 2008 12:05:41 +0000</pubDate>
		<dc:creator>Karl Majer</dc:creator>
				<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[estimation]]></category>
		<category><![CDATA[perf testing]]></category>

		<guid isPermaLink="false">http://www.karlmajer.com/2008/02/04/performance-testing-first-example-notes/</guid>
		<description><![CDATA[In our first example we did several things that I perhaps took for granted. A reader asked why I chose to use CLI load generation tools instead of surfing with a browser, and if the initial numbers generated are even reasonable. Allow me to address both points. There is nothing stopping a tester from performing [...]]]></description>
			<content:encoded><![CDATA[<p>In our first example we did several things that I perhaps took for granted. A reader asked why I chose to use CLI load generation tools instead of surfing with a browser, and if the initial numbers generated are even reasonable.  Allow me to address both points.</p>
<p>There is nothing stopping a tester from performing their load test using a browser or other GUI based load generation tool. Providing the tool has some manner of minimal controllability and repeatability, feel free to use any tool you so desire. Should you choose to use a browser, such as Firefox, be sure to recognize that the plugins are capable of altering the behavior and characteristics of the browser considerably and all future testing would need to be done using the same exact browser, machine, and plugin combination for the numbers to be comparable.</p>
<p>Essentially, I choose to use a CLI tool, such as wget, because it behaves the same every time and I can wrap the application in a shell script to guarantee both the same behavior, and instrument things further.</p>
<p>Second, the first cut performance numbers. When trying to rapidly determine a speed of light, its more important to get to the right magnitude first and then refine than it is to try and get the exact answer on the first pass.</p>
<p>For example, we know that we cannot move more packets across the network than we can fit through a single network interface. Therefore, if the size of the interface is N bytes per second, regardless of what we do, we will never be able to push more than N+1 total bytes through the interface. Similarly, if we know that we have M sized pages, then we will never be able to push N/M pages through the interface at a single point in time.</p>
<p>What this does for us is provide an upper bound for our testing. If our results indicated that we were able to do N/M + 5302 transactions per second, we know know that something was wrong with our calculation as those last 5302 operations/second would simply not fit through the pipe. However, if our results indicated 5302, and N/M is 8192, then we know that our result is a reasonable number.</p>
<p>It is important to obtain the speed of light at the start and then refine using the bounding boxes we know to be true. This ideal holds whether testing network, disk I/O, cpu, etc. If we know what the fastest possible speed of a given component is, then we know that if our results report numbers faster than what we know to be possible, then we must question the results and find them to be true because of another reason, or discard them and start over.</p>
<p>And a few thoughts just to provide a bit of context as to when speed of light may be false. When testing disk I/O, if the file size is sufficiently small, the file will be loaded directly into the buffer cache. This is a section of machine memory dedicated to buffering all disk I/O transactions and provides access times and speeds comparable to system memory and not the disk subsystem. Ie, the speed of light for the buffer cache is based off of a 50ns access time and not an 80ms access time.</p>
<p>I’d like to thank the reader that brought the questions to me and invite others to comment or email me with any questions they may have. I can be reached at kmajer at karlmajer dot com.</p>
<p>&gt;&gt;&gt; Karl</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlmajer.com/2008/02/04/performance-testing-first-example-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance Testing &#8211; First Example</title>
		<link>http://www.karlmajer.com/2008/02/01/performance-testing-first-example/</link>
		<comments>http://www.karlmajer.com/2008/02/01/performance-testing-first-example/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 23:30:25 +0000</pubDate>
		<dc:creator>Karl Majer</dc:creator>
				<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[perf testing]]></category>
		<category><![CDATA[scientific method]]></category>

		<guid isPermaLink="false">http://www.karlmajer.com/2008/02/01/performance-testing-first-example/</guid>
		<description><![CDATA[This article is second in a series on performance and performance testing. The principles of the scientific method were discussed in the first article and now this article will detail a basic and slightly simplistic example of a performance task. The developers you support as a systems administrator are considering moving the static content for [...]]]></description>
			<content:encoded><![CDATA[<p>This article is second in a series on performance and performance testing. The principles of the scientific method were discussed in the first article and now this article will detail a basic and slightly simplistic example of a performance task.</p>
<p>The developers you support as a systems administrator are considering moving the static content for the company website www.somefamoussite.com to its own webserver to free up resources for the dynamic page generation and generally speed things up. They are curious how fast an apache serving only static content will be able to serve requests.</p>
<p>In order to accomplish this task, we must examine the steps of the scientific method and see how each plays its part in providing us a sound and thorough roadmap to provide the developers with their answer.</p>
<ol>
<li><strong>First, define the question:</strong> “<em>How fast can an apache webserver go serving static content.</em>”</li>
<li><strong>Next gather information and resources:</strong></li>
<p>It would benefit us to know the number of static items and the size of them to determine how best to answer the question, so we ask development that question and are handed a tarball containing 256 images with an average size of 6k each.</p>
<p>Since we setup the hardware that is being used, we know that the servers have gigabit ethernet cards in them.  	We also expand the tarball into the tree on our webserver and use a find to create a logfile full of relative links to use to fetch the static content.</p>
<blockquote><p> 	find . -type f | awk ‘{print “/path/to/images/$1”}’ &gt; logfile.out<br />
cat logfile.out logfile.out logfile.out logfile.out &gt; logfile.1k<br />
cat logfile.1k logfile.1k logfile.1k logfile.1k &gt; logfile.4k<br />
cat logfile.4k logfile.4k logfile.4k logfile.4k &gt; logfile.16k</p></blockquote>
<li><strong>Form the hypothesis:</strong></li>
<p>Based on an average size of 6KBytes, and knowing that the hardware has gigabit ethernet, we can compute that in lab conditions with perfect network, the machines can do no more than approximately 21,845 requests/second.</p>
<p>( (1Gbit/sec == 128 MBytes/sec) / 6KBytes avg size == 21,845.3 objects/sec)</p>
<p>Our hypothesis, therefore, based solely on the network capacity of the hardware, is “<em>A server can do no more than 21,845 operations/second.</em>”</p>
<li><strong>Perform the experiment(s) and collect data:</strong></li>
<p>You&#8217;ll want to run top on the webserver to get a rough idea of how much free cpu there is.</p>
<p>Copy the logfile.16k to each of the load generators. In this example there will be 4 load generators.</p>
<p>Use wget on one of the load generators to mark the logfile with something we can search for later.</p>
<blockquote><p>wget http://www.myserver.com/images/TESTSTARTEDHERE</p></blockquote>
<p>Use wget on each load generator to fetch the images</p>
<blockquote><p>wget -i logfile.16k -o wget.out</p></blockquote>
<p>Fire off all four wget’s at the same time and let it run.</p>
<p>Watch top running on the webserver and keep rough track of our idle cpu. Time passes and the load generators will eventually run out of logs, probably within a few minutes.</p>
<p>Use wget to mark the logfile again.</p>
<blockquote><p>	wget http://www.myserver.com/images/TETENDEDHERE</p></blockquote>
<li><strong>Analyze the data:</strong></li>
<p>With each load generator having a 16k logfile, we had the potential load capability of 64k instantaneous requests. This is unlikely, however, as there is a certain amount of overhead between requests that must be accounted for. A reasonable assumption would be that each generator could generate close to 8k instantaneous requests, the four of which still totaling over the ~22k maximum of the network.</p>
<p>Using the logfile from the apache we can determine how much traffic we received.</p>
<p>First use sed or perl or your language of choice and extract the logfile.</p>
<blockquote><p>	sed -n /TESTSTARTEDHERE/,/TESTENDEDHERE/p access.log &gt; test.log</p></blockquote>
<p>Next determine the starting time by looking at the next line after STARTED line in the test.log and looking at the timestamp on the line</p>
<blockquote><p>	head -2 test.log</p></blockquote>
<p>Do the same for the ending time by looking at the second to last line of test.log.</p>
<blockquote><p>	tail -2 test.log</p></blockquote>
<p>Determine the total test time by subtracting the two times from each other.</p>
<p>Determine the total number of lines in the logfile and removing 2 for the header and footers.</p>
<blockquote><p>	wc -l test.log</p></blockquote>
<p>This will likely be 64k unless you interrupted the test prematurely.</p>
<p>Now extract the successful image retrievals using grep.</p>
<blockquote><p>	grep “HTTP/…. 200” test.log &gt; 200.log</p></blockquote>
<p>Count the number of successful requests</p>
<blockquote><p>	wc -l 200.log</p></blockquote>
<p>Now compute the average request speed</p>
<blockquote><p> Good Requests / Total Time in minutes == Average Good Requests/Minute</p></blockquote>
<p>Next, determine the number of requests per unit. Typically a 5 minute unit works best but for simplicity we will use a 1 minute unit.<br />
Extract column 4 (the timestamp in a CLF apache log) from the 200.log file</p>
<blockquote><p>	awk ‘{print $4}’ 200.log &gt; timestamp.out</p></blockquote>
<p>Truncate the seconds from the logfile using either cut or awk</p>
<blockquote><p>	cut -d: -f 1,2,3 timestamp.out &gt; trunctime.out</p></blockquote>
<p>Uniq and count the truncated timestampts to get the number occuring during each minute:</p>
<blockquote><p>	uniq -c trunctime.out &gt; counttime.out</p></blockquote>
<p>Now reverse the two columns to make the graphic easier and add a closing bracket.</p>
<blockquote><p>	 awk ‘{print $2”] ”$1}’ counttime.out &gt; graphdata.out</p></blockquote>
<p>It is now possible to look through the logfile at this time and see a rough estimate of how the webserver did, however it is more valuable if we can graph this data and examine it visually.</p>
<p>Import the data into excel, pages, or use gnuplot on the command line and plot the graph using a line graph.</p>
<p><img src="http://www.karlmajer.com/images/loadgraph.jpg" alt="Load Graph" align="middle" border="1" height="350" width="500" /></p>
<p>The graph above was manufactured to illustrate the desired point. Note that the middle of the graph plateaus around 8500 requests/second. The flatness of the graph suggests that we’ve hit a bottleneck of some point. Since we know that the network is capable of nearly 22k request/second, and the network on each load client is presumably similar, we know that we’re either hitting the limitations of the disk subsystem or that we’ve pushed the webserver out of CPU.</p>
<p>If, during the test, you saw the idle CPU approach single digits, then we have reasonable confidence that we pushed the machine to its limit of CPU otherwise we may be pushing the limits of I/O.</p>
<li><strong>Interpret the data and draw conclusions:</strong></li>
<p>Now, by using the graph, we can decide on a limit for the webserver. The flat line starts approximately around 8500 req/sec. A reasonable buffer is 10% of that number, and so we would say that the max capacity of the webserver is 7650 req/sec. If you wish to be more conservative, and you should, you could leave yourself 25% capacity and call it 6325.</p>
<p>As a general rule you want to leave sufficient capacity on the machines to handle any excess load from failed hosts. If you have 2 machines, each machine should be able to handle all of the load. If you have 3 machines, then each should be able to handle 66% of the total load, and so forth.</p>
<li><strong>Publish Findings:</strong></li>
<p>With this simplistic testing done, you could approach development and tell them that you have some confidence that based on the preliminary testing you’ve done, the webserver can do 6325 ops/sec. Additionally, you should then provide the developers with your step by step guide as to how to get their own numbers to both allow them to validate your work, and to enable them to do this level of testing on their own in the future.</ol>
<p>This concludes our first example. There are several more to come.</p>
<p>If you like what you’ve read, please share the blog with others. If you have any questions or comments, feel free to send me email at kmajer at karlmajer dot com.</p>
<p>&gt;&gt;&gt; Karl</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlmajer.com/2008/02/01/performance-testing-first-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance Testing for the Uninitiated</title>
		<link>http://www.karlmajer.com/2008/01/30/performance-testing-for-the-uninitiated/</link>
		<comments>http://www.karlmajer.com/2008/01/30/performance-testing-for-the-uninitiated/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 11:29:46 +0000</pubDate>
		<dc:creator>Karl Majer</dc:creator>
				<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[perf testing]]></category>

		<guid isPermaLink="false">http://www.karlmajer.com/2008/01/30/performance-testing-for-the-uninitiated/</guid>
		<description><![CDATA[What is performance? As a working systems administrators, or programmer, there will be times in which you are called upon to determine the performance of a system, an application, or even an algorithm. While performance testing is frequently time consuming, finding the answer to the question “how fast is it” is neither arcane nor rocket [...]]]></description>
			<content:encoded><![CDATA[<p>What is performance?</p>
<p>As a working systems administrators, or programmer, there will be times in which you are called upon to determine the performance of a system, an application, or even an algorithm. While performance testing is frequently time consuming, finding the answer to the question “how fast is it” is neither arcane nor rocket science. All that is required is patience, sound and repeatable methodology, and use of the principles of the scientific method.</p>
<p>Information detailing the scientific method is available on multiple websites. For simplicity Wikipedia’s entries will be used. Wikipedia tells us that the Classical Model of the scientific method is:</p>
<ul>
<li>Characterization &#8211; Observations, definitions, measurements,</li>
<li>Hypothesis &#8211; explanations of characterization, often theoretical/hypothetical</li>
<li>Prediction &#8211; reasoning from the hypothesis</li>
<li>Experiment &#8211; tests all of the above</li>
</ul>
<p>The Hypothetico-Deductive model, perhaps more in line with the working professional, is:</p>
<ul>
<li>Use your experience.</li>
<li>Conjecture an explanation.</li>
<li>Deduce a prediction from that explanation.</li>
<li>Test</li>
</ul>
<p>And an even more modern interpretation of the classical model is:</p>
<ul>
<li>Define the question</li>
<li>Gather information and resources</li>
<li>Form hypothesis</li>
<li>Perform experiment and collect data</li>
<li>Analyze data</li>
<li>Interpret data and draw conclusions that form starting point for next hypothesis</li>
<li>Publish results</li>
<li>Retest, often done by third parties</li>
</ul>
<p>The modern definition would extend the classical model with post experiment work to analyzie, publish, and retest the work done.</p>
<p>Using this information as background, I will be writing a series of articles on understanding performance. These articles will include a few in depth examples to help performance testers understand not only the methods and techniques used, but also the depth and thoroughness required. In the examples, both the hypothetico-deductive model and the modern interpretation of the scientific method will be used.</p>
<p>If you have any examples or questions you’d like covered, feel free to drop me email at kmajer at thisdomainname.com.<br />
&gt;&gt;&gt; Karl</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlmajer.com/2008/01/30/performance-testing-for-the-uninitiated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multi-OS Installation: Configuring the Solaris Environment</title>
		<link>http://www.karlmajer.com/2008/01/25/multi-os-installation-configuring-the-solaris-environment/</link>
		<comments>http://www.karlmajer.com/2008/01/25/multi-os-installation-configuring-the-solaris-environment/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 10:30:46 +0000</pubDate>
		<dc:creator>Karl Majer</dc:creator>
				<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[jumpstart]]></category>
		<category><![CDATA[os installation]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://www.karlmajer.com/2008/01/25/multi-os-installation-configuring-the-solaris-environment/</guid>
		<description><![CDATA[This article will discuss configuring Intel and Sparc Solaris for use in the Multi-OS installer. On successful boot of the intel media, the user will be greeted by the Solaris, blue and green text installer as if they had booted off of CD or DVD media. Sparc Solaris will require a bit more work as [...]]]></description>
			<content:encoded><![CDATA[<p>This article will discuss configuring Intel and Sparc Solaris for use in the Multi-OS installer. On successful boot of the intel media, the user will be greeted by the Solaris, blue and green text installer as if they had booted off of CD or DVD media. Sparc Solaris will require a bit more work as it makes use of native boot files and images.</p>
<p>Configuring Intel Solaris is similar to Linux. The low level startup boot process is the same as Windows and Solaris, mainly the use of a PXE loader to start the process, however in order to keep the top level menuing consistent for the client, and to work around a dhcpd configuration issue, it was required to chain together Sun’s version of PXEgrub with PXELinux.</p>
<p>In both the Intel and Sparc cases, a request to boot is dropped on the wire, the dhcpd server accepts the request and issues a reply packet containing the IP address for the PXE client, the IP address of the next server to speak to, and the filename that the PXE client needs to request, still PXELinux for the first stage. For Sparc Solaris, the filename that the bootloader needs to request is not a PXE loader, but instead is the actual Solaris supplied boot file.</p>
<p>The operating system makes use of the PXE Loader configuration. Please go read that post if you have yet to do so as general configuration details are described in that article.</p>
<p>Please take note that a conscious design decision was made at this point to chain the bootloaders to present a mostly unified menu system to the end user. It is possible to create an Intel Solaris stanza in the dhcpd.conf and add the mac addresses of each host that would need to boot off of pxegrub instead of pxelinux. However, this would require the modification of the configuration and restarting of the dhcpd service for each new intel host added.</p>
<p>Since, in the environment, there were an exceptionally small number of Sparc hosts to be installed, and new Sparcs were added intermittently at best, it was considered more desirable to touch the dhcpd files only for the Sparcs rather than the often multiple installs/day required of the Intel machines. This would then allow the scheduling of dhcpd restarts during a maintenance window.</p>
<p>There was one modification made to the dhcpd.conf file which needs to be made regardless of the architecture. The following option statements need to be added to the file somewhere near the PXElinux lines that were added to support PXE booting.</p>
<blockquote><p> option SUNW.root-mount-options code 1 = text;<br />
option SUNW.root-server-ip-address code 2 = ip-address;<br />
option SUNW.root-server-hostname code 3 = text;<br />
option SUNW.root-path-name code 4 = text;<br />
option SUNW.swap-server-ip-address code 5 = ip-address;<br />
option SUNW.swap-file-path code 6 = text;<br />
option SUNW.boot-file-path code 7 = text;<br />
option SUNW.posix-timezone-string code 8 = text;<br />
option SUNW.boot-read-size code 9 = unsigned integer 16;<br />
option SUNW.install-server-ip-address code 10 = ip-address;<br />
option SUNW.install-server-hostname code 11 = text;<br />
option SUNW.install-path code 12 = text;<br />
option SUNW.sysid-config-file-server code 13 = text;<br />
option SUNW.JumpStart-server code 14 = text;<br />
option SUNW.terminal-name code 15 = text;</p></blockquote>
<p>These vendor specific lines assign human readable names to the various SUNW codes that are used to set various parameters such as the root path, the swap file, and the like.</p>
<p>The pxelinux menu entry needs to be changed to point to the location of the Sun PXEgrub file placed in the boot tree, and a menu.lst file will need to be created to support that bootloader. The single Solaris entry in my environment looks like this:</p>
<blockquote><p> label solaris<br />
kernel /boot/grub/pxegrub.0</p></blockquote>
<p>In my boot directory you can find a grub directory containing the files pxegrub.0 and menu.lst. The menu.lst file is grub’s version of the default entry. It must always be named menu.lst either via the actual filename or through a tftp filename remap. After reading through the Solaris pxegrub source it seems highly likely that this filename cannot be changed via a vendor ID code in the dhcpd.conf file despite what the manpages say.</p>
<p>The three line Solaris 10 entry in my sample menu.lst looks like:</p>
<blockquote><p> title Solaris 10 Interactive<br />
kernel /images/SOL_10_U3_x86_64/boot/multiboot kernel/unix &#8211; install nowin dhcp -B install_media=172.16.32.16:/export/install/images/SOL_10_U3_x86_64<br />
module /images/SOL_10_U3_x86_64/boot/x86.miniroot</p></blockquote>
<p>The first line is the title as it will appear in the grub menu. The second describes the kernel file to load including all switches passed to the kernel. Given the strange wrapping, please take note that the line ends with the install_media stanza found in the SOL_10_U3_x86_64 directory. Finally, the final line specifies the module the kernel will need to load in order to run properly.</p>
<p>For an Intel installation, the prep work is completed and there remains only the image to prepare. For the sparc image, the dhcpd.conf file will need to be edited each time a new sparc host is added and the following stanza will need to be added and/or updated:</p>
<blockquote><p> group {<br />
vendor-option-space SUNW;<br />
option SUNW.JumpStart-server &#8220;172.16.32.16:/export/JS/sol8/configs&#8221;;<br />
option SUNW.install-server-hostname &#8220;gorgon&#8221;;<br />
option SUNW.install-server-ip-address 172.16.32.16;<br />
option SUNW.install-path &#8220;/export/install/images/SOL_9_U8_x86&#8243;;<br />
option SUNW.root-server-hostname &#8220;gorgon&#8221;;<br />
option SUNW.root-server-ip-address 172.16.32.16;<br />
option SUNW.root-path-name &#8220;/export/install/images/SOL_9_U8_x86/Solaris_9/Tools/Boot&#8221;;<br />
next-server 172.16.32.16;</p>
<p>host solclient01 {<br />
hardware ethernet 00:0c:29:e3:e9:94;<br />
fixed-address 172.16.33.69;<br />
option host-name &#8220;solclient01&#8243;;<br />
option SUNW.sysid-config-file-server=&#8221;172.16.32.16:/export/install/jumpstart&#8221;;<br />
}<br />
}</p></blockquote>
<p>Each new sparc addition will require the addition of a new host substanza in this group. You’ll need to gather the mac address of the new host as well as assign it a static IP address. Once the configuration file has been updated, simply restart dhcpd and the configuration changes are complete. As a side note, installations were done using a small preallocated pool of statics outside the dhcpd range and then the host was reconfigured once the installation was complete.</p>
<p>Now that dhcpd has been setup, we can setup the images. Substitute x86_64 with SPARC as appropriate in the examples.  Note that the solaris media comes on DVDs and so there is only a single image to copy.</p>
<blockquote><p> mkdir /export/install/images/SOL_10_U3_x86_64 # or the path for the real vers.<br />
mkdir -p /mnt/{1,2,3,4…N} # one per ISO<br />
mount -o loop /path/to/iso/SOL_10_U3_x86.iso /mnt/1<br />
…<br />
mount -o loop /path/to/iso/SOL_10_U3_x86.iso /mnt/N<br />
.<br />
tar -C /mnt/1 cpvf &#8211; | tar -C /export/install/images/SOL_10_U3_x86_64/ -xpf -</p></blockquote>
<p>When finished, in /export/install/images/SOL_10_U3_x86/ directory you should have the following directories: boot, Solaris_10, and a Copyright and installer file. Note that there is only a single ISO released from Sun. If the host is 64 bit capable the Solaris OS will boot in 64 bit mode. If the host is only 32 bit capable the OS will boot on its 32 bit kernel. The directory naming of _64 was chosen to remain consistent with the other directory names.</p>
<p>Next confirm that the boot/ directory contains the files you supplied paths to in the grub menu.lst, mainly multiboot and x86.miniroot:</p>
<blockquote><p> ls -al /export/install/images/SOL_10_U3_x86_64/boot/<br />
grep boot /export/install/boot/menu.lst</p></blockquote>
<p>And that concludes all of the image prep necessary. The next item to configure is the apache server to ensure it can serve the http content from the /export/install mountpoint.  To do so we need to edit the configuration of apache and add a section allowing the webserver to find our content at /images/. Edit the httpd.conf and add the following in an appropriate location, or use this snippet to create a new file uniquely named along the lines of install.conf in the httpd/conf.d directory, if present.</p>
<blockquote><p> Alias /images/ /export/install/images/<br />
&lt; directory &gt;<br />
Options Indexes FollowSymLinks<br />
AllowOverride Limit<br />
Order allow,deny<br />
Allow from all<br />
&lt; /directory &gt;</p></blockquote>
<p>Apache needs to then be restarted or HUP’ed for the configuration changes to take effect.</p>
<p>Unless the entire installation is being done over HTTP, Solaris also introduces the need for an NFS server for the image shares. How this is done will be dependent on your operating system, but assuming the nfs software is installed on the machine, in order to nfs export /export/install one needs to try one of the following:</p>
<blockquote><p> Linux:<br />
edit /etc/exports and add<br />
/export/install *(ro)<br />
service nfsd restart</p>
<p>Solaris:<br />
edit /etc/dfs/dfstab and add<br />
share -F nfs -o ro -d “Image Mounts” /export/install</p></blockquote>
<p>All that is left now is to test the individual components:</p>
<p>First we need to make sure dhcpd is running:</p>
<blockquote><p> ps -ef | grep dhcpd</p></blockquote>
<p>Next we ensure apache is running:</p>
<blockquote><p> ps -ef | grep httpd</p></blockquote>
<p>Next ensure that nfsd is running:</p>
<blockquote><p> ps -ef | grep nfs</p></blockquote>
<p>Now we make sure that the repository is in proper order:</p>
<blockquote><p> ls -al /export/install/boot/pxelinux # check for pxelinux<br />
ls -al /export/install/boot/grub/pxegrub # check for pxegrub<br />
ls -al /export/install/boot/grub/menu.lst # check for pxegrub’s menu file<br />
ls -al /export/install/boot/default # check for the default menu file for your entry<br />
ls -ald /export/install/images/SOL_10_U3_x86_64 # ensure the image is there<br />
ls -ald /export/install/images/SOL_10_U3_x86_64/boot # should return 3 files: grub, multiboot, x86.miniroot</p></blockquote>
<p>Now we make sure that tftp is working as expected (remember that tftp was chrooted to /export/install so everything will be relative to that path):</p>
<blockquote><p> tftp localhost<br />
cd images/SOL_10_U3_x86_64/boot/<br />
get x86.miniroot</p></blockquote>
<p>Next we ensure the apache is serving content properly.</p>
<blockquote><p> wget http://localhost/images/SOL_10_U3_x86_64/boot/x86.miniroot</p></blockquote>
<p>if, for some reason, you dont have wget on your server you can do it manually using telnet:</p>
<blockquote><p> telnet localhost 80<br />
HEAD /images/SOL_10_U3_x86_64/boot/x86.miniroot HTTP/1.0</p></blockquote>
<p>Finally we test the NFS shares. Mount the filesystem on another machine if possible:</p>
<blockquote><p> mount -o ro yourserver:/export/install /mnt<br />
cd /mnt/images/SOL_10_U3_x86_64/boot<br />
ls -al x86.miniroot</p></blockquote>
<p>This essentially concludes the work required to net install a Solaris installation.</p>
<p>After finishing the configuration, all that is left is to reboot the machine and netboot using the F12 key, and then select the newly added menu entry from the pxelinux menu when prompted. Grub will then start and present its menu to you. From there select the entry you desire and then just wait until you reach the Solaris blue and green configuration screens.</p>
<p>Again, If you have any problems or questions, drop me a line and I’ll see what I can do to help. If there is interest in the topic, moving from an interactive installation to the configuring of jumpstart may be discussed in a later article should there be interest in the topic. If this article sounds familiar it is because I followed the guidelines I established in the Linux article. ;)</p>
<p>&gt;&gt;&gt; Karl</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlmajer.com/2008/01/25/multi-os-installation-configuring-the-solaris-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multi-OS Installation: Configuring the Linux Environment</title>
		<link>http://www.karlmajer.com/2008/01/22/multi-os-installation-configuring-the-linux-environment/</link>
		<comments>http://www.karlmajer.com/2008/01/22/multi-os-installation-configuring-the-linux-environment/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 09:25:18 +0000</pubDate>
		<dc:creator>Karl Majer</dc:creator>
				<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[kickstart]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[os installation]]></category>

		<guid isPermaLink="false">http://www.karlmajer.com/2008/01/22/multi-os-installation-configuring-the-linux-environment/</guid>
		<description><![CDATA[This article will discuss configuring a RHEL image for use in the Multi-OS installer. On successful boot, the user will be greeted by the text installer as if they had booted off of CD or DVD media. Other Linux variants are likely easily adaptable but were out of scope for the project that was delivered [...]]]></description>
			<content:encoded><![CDATA[<p>This article will discuss configuring a RHEL image for use in the Multi-OS installer. On successful boot, the user will be greeted by the text installer as if they had booted off of CD or DVD media. Other Linux variants are likely easily adaptable but were out of scope for the project that was delivered to the client.</p>
<p>Configuring Linux is nowhere near as complex as the Windows environment.  The low level Linux boot process is the same as Windows and Solaris, mainly a PXE request is dropped onto the wire. The dhcpd server accepts the request and issues a reply packet containing the IP address for the PXE client, the IP address of the next server to speak to, and the filename that the PXE client needs to request. The filename passed to the client used is the pxelinux bootloader which has been described in detail elsewhere.</p>
<p>The operating system makes use of the <a href="http://www.karlmajer.com/2008/01/19/multi-os-installation-configuring-the-pxe-loader-environment/%E2%80%9D"> PXE Loader configuration. </a> Please go read that post if you have yet to do so as general configuration details are described in that article.</p>
<p>The pxelinux menu entry needs to be updated to point to the linux kernel and an appropriate initrd stanza needs to be added to the menu entry as well. Substitute your own directory name for all instances of RHEL_4_U5_x86_32. That said, a sample entry in my environment looks like this:</p>
<blockquote><p>label rhel4_32<br />
kernel /images/RHEL_4_U5_x86_32/install/images/pxeboot/vmlinuz<br />
append initrd=/images/RHEL_4_U5_x86_32/install/images/pxeboot/initrd.img nofb text noipv6 method=http://install/images/RHEL_4_U5_x86_32/install ksdevice=eth0</p></blockquote>
<p>Remember that the tftpd server is chrooted to /export/install, so on the filesystem, the kernel resides in the base directory /export/install/images/RHEL_4_U5_x86_32/. The nomenclature used at the customer site allows multiple variants of RHEL 4 32 and 64 bit to live in the tree concurrently. Menu entries need only be added for each desired variant to install other versions.</p>
<p>Once the PXE menu entries have been added, the image can be prepared. This is nowhere near as complex as windows and requires only a few steps:</p>
<blockquote><p>mkdir /export/install/images/RHEL_4_U5_x86_32 # or the path for the real vers.<br />
mkdir -p /mnt/{1,2,3,4&#8230;N}	# one per ISO<br />
mount -o loop /path/to/iso/RHEL4-U5-i386-AS-disc1.iso /mnt/1<br />
…<br />
mount -o loop /path/to/iso/RHEL4-U5-i386-AS-discN.iso /mnt/N<br />
# note, if you run out of loopback devices, add “options loop max_loop=256”<br />
# to /etc/modprobe.conf and reboot.<br />
tar -C /mnt/1 cpvf &#8211; | tar -C /export/install/images/RHEL_4_U5_x86_32/ -xpf -<br />
…<br />
tar -C /mnt/N cpvf &#8211; | tar -C /export/install/images/RHEL_4_U5_x86_32/ -xpf -</p></blockquote>
<p>When finished, in /export/install/images/RHEL_4_U5_x86_32/ directory you should have the following directories: RedHat, SRPMS, install, images, isolinux, and a large number of README html files.</p>
<p>Confirm that the install/images/pxeboot directory contains a file called vmlinuz and the path matches what was indicated in the pxelinux menu entry and that the initrd.img is present in the same directory and that the paths to the images match:</p>
<blockquote><p>ls -al /export/install/images/RHEL_4_U5_x86_32/install/images/pxeboot<br />
grep RHEL_4_U5_86_32 /export/install/default</p></blockquote>
<p>And that concludes all of the image prep necessary. The next item to configure is the apache server to ensure it can serve the http content as requested by the method= line of the menu entry.  To do so we need to edit the configuration of apache and add a section allowing the webserver to find our content at /images/. Edit the httpd.conf and add the following in an appropriate location, or use this snippet to create a new file uniquely named along the lines of install.conf in the httpd/conf.d directory, if present.</p>
<blockquote><p>Alias /images/  /export/install/images/<br />
&lt; directory &gt;<br />
Options Indexes FollowSymLinks<br />
AllowOverride Limit<br />
Order allow,deny<br />
Allow from all<br />
&lt; /directory &gt;</p></blockquote>
<p>Apache needs to then be restarted or HUP’ed for the configuration changes to take effect.</p>
<p>All that is left now is to test the individual components:</p>
<p>First we need to make sure dhcpd is running:</p>
<blockquote><p>ps -ef | grep dhcpd</p></blockquote>
<p>Next we ensure apache is running;</p>
<blockquote><p>ps -ef | grep httpd</p></blockquote>
<p>Now we make sure that the repository is in proper order:</p>
<blockquote><p>ls -al /export/install/boot/pxelinux	# check for pxelinux<br />
ls -al /export/install/boot/default     # check for the default menu file for your entry<br />
ls -ald /export/install/images/RHEL_4_U5_x86_32/ # make sure the RedHat dir is there<br />
ls -ald /export/install/images/RHEL_4_U5_x86_32/install/images/pxeboot # should return 4 files: initrd.img, README, TRANS.TBL, vmlinuz</p></blockquote>
<p>Now we make sure that tftp is working as expected (remember that tftp was chrooted to /export/install so everything will be relative to that path):</p>
<blockquote><p>tftp localhost<br />
cd images/RHEL_4_U5_x86_32/install/images/pxeboot<br />
get vmlinuz</p></blockquote>
<p>Next we ensure the apache is serving content properly.</p>
<blockquote><p>wget http://localhost/images/RHEL_4_U5_x86_32/install/images/pxeboot/vmlinuz</p></blockquote>
<p>if for some reason you dont have wget on your server you can do it manually using telnet:</p>
<blockquote><p>telnet localhost 80<br />
HEAD /images/RHEL_4_U5_x86_32/install/images/pxeboot/vmlinuz HTTP/1.0</p></blockquote>
<p>This essentially concludes the work required to netboot a RHEL installer to the point where the user can make their desired selections to complete the installation.</p>
<p>After finishing the configuration, all that is left is to reboot the machine and netboot using the F12 key, and then select the newly added menu entry from the pxelinux menu when prompted. When the installer loads and begins the interactive installation you will need to walk through the installer options and answer any question.</p>
<p>If you have any problems or questions, drop me a line and I’ll see what I can do to help.  If there is interest in the topic, moving from an interactive installation to the configuring of kickstart may be discussed in a later article should there be interest in the topic.</p>
<p>&gt;&gt;&gt; Karl</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlmajer.com/2008/01/22/multi-os-installation-configuring-the-linux-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multi-OS Installation: Windows Final Steps</title>
		<link>http://www.karlmajer.com/2008/01/21/multi-os-installation-windows-finishing-touches/</link>
		<comments>http://www.karlmajer.com/2008/01/21/multi-os-installation-windows-finishing-touches/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 00:43:20 +0000</pubDate>
		<dc:creator>Karl Majer</dc:creator>
				<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[os installation]]></category>
		<category><![CDATA[ris]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.karlmajer.com/2008/01/21/multi-os-installation-windows-finishing-touches/</guid>
		<description><![CDATA[This is my second attempt at writing this post. I was using ecto this morning for the last time while writing the first iteration of this post and when switching between html and text mode the app decided to eat the post for me. Hopefully this iteration will be as good as the first, if [...]]]></description>
			<content:encoded><![CDATA[<p>This is my second attempt at writing this post. I was using <em>ecto</em> this morning for the last time while writing the first iteration of this post and when switching between html and text mode the app decided to eat the post for me. Hopefully this iteration will be as good as the first, if not better&#8230;</p>
<p>So, there are a few things left to do before we can attempt a network boot. Primarily we need to add/create the winnt.sif configuration file, update the binl daemon files and restart the daemon, and then we need to test the components to make sure that everything is in order.</p>
<p>An absolute minimal winnt.sif created by the addnewos.sh script looks like the following:</p>
<blockquote>
<pre>[data]
floppyless = "1"
msdosinitiated = "1"
; Needed for second stage
Orisrc="\\\\172.16.32.16\REMINST\\W50AA\i386"
OriTyp = "4"
LocalSourceOnCD = 1
;DisableAdminAccountOnDomainJoin = 1
[SetupData]
OsLoadOptions = "/fastdetect"
; Needed for first stage
SetupSourceDevice = "\Device\LanmanRedirector\172.16.32.16\REMINST\\W50AA"
[UserData]
ComputerName = *
FullName = *
OrgName = *
ProductID = *</pre>
</blockquote>
<p>Briefly, the [data] section specifies where the media will be coming from and what type it is. The [SetupData] stanza contains any arguments to be passed to the kernel, as well as establishing the source device from which setup is to pull the additional datafiles. The listed path corresponds to the samba share that was setup earlier.</p>
<p>Finally, the [UserData] section allows for the customization of the computer name, the user name, and the company name, as well as provide a slot to prefill the appropriate license key obtained from Microsoft.</p>
<p>This sif file will allow setup to execute in a fully interrogative mode, asking the user performing the install the same series of questions as if they&#8217;d used the CD media for the installation. There are quite a few options available for the sif file allowing for the full unattended installation of windows. If there is an interest I can expand on it in a future piece.</p>
<p>Once the w50aa.sif file is in place, we can go refresh the binlsrv.py database. Assuming the copies of <a href="http://www.karlmajer.com/files/binl/binlsrv.py.txt">binlsrv.py</a>, <a href="http://www.karlmajer.com/files/binl/infparser.py.txt">infparser.py</a>, and <a href="http://www.karlmajer.com/files/binl/windirs.conf.sampl">windirs.conf.sample</a> were obtained from this site, this is accomplished by doing the following:</p>
<ul>
<li>edit windirs.conf and add the new directory name, i.e. W50AA</li>
<li>run infparser.py</li>
<li>run binlsrv.py</li>
</ul>
<p>With the binlsrv.py script running, we can begin to do the testing on the system. Of course you could at this point simply reboot the box you wish to install, cross your fingers, and hit F12 to netboot while hoping for the best. Those of you willing to use some methodology in their testing, please read on. Please note: I&#8217;m assuming the path to your install tree is /export/install/ and you have the windows image in images/W50AA. You&#8217;ll need to adjust it for your environment otherwise.</p>
<p>First we need to make sure dhcpd is running:</p>
<pre>ps -ef | grep dhcpd</pre>
<p>Next we ensure binlsrv.py is running;</p>
<pre>ps -ef | grep binl</pre>
<p>Now we make sure that the repository is in proper order:</p>
<pre>ls -al /export/install/pxelinux	   # check for pxelinux
ls -al /export/install/default     # check for the default menu file for pxelinux
ls -ald /export/install/images/W50AA/i386 # make sure the i386 dir is there
ls -ald /export/install/images/W50AA/w50aa* # we should get 3 files back, w50aa, w50aa.0, w50aa.sif.</pre>
<p>Now we make sure that tftp is working as expected (remember that tftp was chrooted to /export/install so everything will be relative to that path):</p>
<pre>tftp localhost
cd images/W50AA/boot
get w50aa.sif</pre>
<p>Now we ensure that the rewriting rules for the tfpd map files worked properly</p>
<pre>grep W50AA /var/log/messages  # on linux
grep W50AA /var/adm/messages  # on solaris</pre>
<p>You should have seen several log lines spit out as a match to the grep statement. If not, there is the possibility that the mapping isn&#8217;t working. Try a tail -f on the logfile and run a few tftp fetches by hand looking for the matches.</p>
<p>At this point the only thing left to do is the actual boot of the computer. So, reboot the test machine, netboot it, and if all goes well you will be greeted by the pxelinux menu. From there pick the entry you created for the windows installation and you will soon be greeted by the windows setup program.</p>
<p>Hopefully there is enough in here to allow you to troubleshoot any issues which you may run into. If this is not the case, please post in the comments and I&#8217;ll do what I can to assist you.</p>
<p>&gt;&gt;&gt; Karl</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlmajer.com/2008/01/21/multi-os-installation-windows-finishing-touches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multi-OS Installation: Configuring the PXE Loader Environment</title>
		<link>http://www.karlmajer.com/2008/01/19/multi-os-installation-configuring-the-pxe-loader-environment/</link>
		<comments>http://www.karlmajer.com/2008/01/19/multi-os-installation-configuring-the-pxe-loader-environment/#comments</comments>
		<pubDate>Sat, 19 Jan 2008 08:28:52 +0000</pubDate>
		<dc:creator>Karl Majer</dc:creator>
				<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[dhcpd]]></category>
		<category><![CDATA[os installation]]></category>
		<category><![CDATA[pxe boot]]></category>
		<category><![CDATA[tftpd]]></category>

		<guid isPermaLink="false">http://www.karlmajer.com/2008/01/19/multi-os-installation-configuring-the-pxe-loader-environment/</guid>
		<description><![CDATA[This article is one in a series detailing the implementation of a Multi-OS boot environment. While the article should stand on its own, it may be generally helpful to read the other articles in the series for the highest level of understanding. The configuration of the PXE environment requires several components: dhcpd server tftpd server [...]]]></description>
			<content:encoded><![CDATA[<p>This article is one in a series detailing the implementation of a Multi-OS boot environment. While the article should stand on its own, it may be generally helpful to read the other articles in the series for the highest level of understanding.</p>
<p>The configuration of the PXE environment requires several components:</p>
<ul>
<li>dhcpd server</li>
<li>tftpd server</li>
<li>PXE bootloader</li>
</ul>
<p>Each of these items has customized configuration files which will be described below.</p>
<p>At the lowest level there is a dhcpd server listening for initial boot requests. ISC&#8217;s dhcpd server, specifically version 3.0.6 which was the current version at the time. On the production RHEL machine, version 3.0.5 from the RPM was used.</p>
<p>The full intricacies of configuring the dhcpd file can be found in the manpage, however at a minimum one needs to specify the following pxelinux entries and create a single subnet stanza for basic functionality.</p>
<blockquote><p># pxelinux settings<br />
option space pxelinux;<br />
option pxelinux.magic code 208 = string;<br />
option pxelinux.configfile code 209 = text;<br />
option pxelinux.pathprefix code 210 = text;<br />
option pxelinux.reboottime code 211 = unsigned integer 32;</p>
<p>#and</p>
<p># Servers subnet<br />
subnet 172.16.32.0 netmask 255.255.254.0 {<br />
authoritative;<br />
option routers 172.16.32.1;<br />
option subnet-mask 255.255.254.0;<br />
option broadcast-address 172.16.33.255;<br />
option domain-name &#8220;dhcp.karlmajer.com karlmajer.com&#8221;;<br />
range dynamic-bootp 172.16.33.201 172.16.33.251;</p>
<p>ddns-domainname &#8220;dhcp.karlmajer.com&#8221;;<br />
ddns-rev-domainname &#8220;dhcp.33.30.172.in-addr.arpa.&#8221;;</p>
<p>next-server 172.16.32.16;</p>
<p>filename &#8220;boot/pxelinux.0&#8243;;<br />
site-option-space &#8220;pxelinux&#8221;;<br />
option pxelinux.magic f1:00:74:7e;<br />
option pxelinux.configfile &#8220;pxelinux.cfg&#8221;;<br />
option pxelinux.pathprefix &#8220;/tftpboot/pxelinux/files/&#8221;;<br />
option pxelinux.reboottime 30;<br />
}</p></blockquote>
<p>Several assumptions are made by that configuration snippet that will need updating:</p>
<ol>
<li>*There is no other dhcpd server on the network*</li>
<li>The tftpd server is at 172.16.32.16</li>
<li>The default router is at 172.16.32.1</li>
<li>You&#8217;ve placed your pxelinux and configuration files in $TFTPROOT/boot directory</li>
<li>Your network spans 2 class Cs, i.e. the 255.255.254 (/23) netmask and 33.255 broadcast.</li>
</ol>
<p>After making these changes in the dhcpd.conf file, start up the daemon using the method of your choice, i.e., service dhcpd start, svcadm enable dhcpd, or even simply &#8216;dhcpd&#8217; from the command line.</p>
<p>At this point there should be a functioning dhcpd server on the network. The next thing to configure is the tftpd server. Tftp-hpa version 0.42 was chosen as the tftp server of choice as it supported the remapping of file paths in requests, and offered tcp wrappers as an added bonus. Edit the tftpd.map file, often sought by tftpd at /etc/tftpd.map, and add the following lines to it:</p>
<blockquote><p> rgi ^pxelinux.0 /boot/pxelinux.0<br />
rgi ^pxelinux.cfg/ /boot/<br />
rgi ^boot/pxelinux.cfg/ /boot/<br />
rgi ^boot// /</p></blockquote>
<p>This sets up the location of the boot files relative to the tftpd root which is specified on startup. In the environment that was built, all provisioning related items were placed in /export/install and the tftpd daemon was chrooted to this path. Therefore the pxelinux related files were in /export/install/boot, the menu files were in /export/install/hostmenu.</p>
<p>Now the tftpd server can be run from either inetd or as a standalone. Given the low usage of the install system, it was decided that tftpd would run from xinetd on RHEL ignoring the startup/shutdown costs of the daemon which may be noticeable were the install frequency several installs per hour rather than week.</p>
<p>Configuration of the inetd process will differ depending on the flavor of unix employed. On RHEL one need simply add a service definition to the xinetd.d directory and the xinetd daemon will pick it up on the next invocation. A sample RHEL stanza looks as follows:</p>
<blockquote><p># default: off<br />
# description: The tftp server serves files using the trivial file transfer \<br />
# protocol. The tftp protocol is often used to boot diskless \<br />
# workstations, download configuration files to network-aware printers, \<br />
# and to start the installation process for some operating systems. service tftp<br />
{<br />
socket_type = dgram<br />
protocol = udp<br />
wait = yes<br />
user = root<br />
server = /usr/sbin/in.tftpd<br />
server_args = -m /etc/tftpd.map -v -v -v -s /export/install -t 10<br />
disable = no<br />
per_source = 11<br />
cps = 100 2<br />
flags = IPv4<br />
}</p></blockquote>
<p>Note the explicit paths to the tftpd.map as well as the chroot to /export/install.</p>
<p>At this point we have a daemon to respond to our PXE requests, and we have a daemon to serve the content using the tftp protocol for the PXE requests. Now we need to supply the file to be served.</p>
<p>PXELinux from <a href="http://syslinux.zytor.com/pxe.php">http://syslinux.zytor.com/pxe.php</a> was used as the bootloader. The files were unbundled and placed into /export/install/boot. A menu file was created for pxelinux, the contents of which look like:</p>
<blockquote><p>#Note, this menu starts the local disk, a memtest utility, and a Windows 2000 RIS #Installation.<br />
default local<br />
prompt 1<br />
timeout 0<br />
display /boot/install.msg<br />
F1 /boot/install.msg</p>
<p>label local<br />
localboot 0</p>
<p>label w50aa<br />
kernel /images/W50AA/boot/w50aa.0</p>
<p>label memtest<br />
kernel /boot/memtest<br />
append -</p></blockquote>
<p>For safety the default configuration chosen is to always favor the internal drives and only attempt to boot from the w50aa stanza on request. Now copy the menu containing the described data into the /export/install/boot/ (adjusted appropriately for your filesystem layout) and either name the file default, or name the file something else and symlink it to default.</p>
<p>At this point you should have the basic workings of a PXE loader environment. To test it first make sure that dhcpd is running:</p>
<p>ps -ef | grep dhcpd</p>
<p>Next use tftp to connect to localhost and request the file pxelinux:</p>
<p>tftp localhost<br />
get pxelinux</p>
<p>Finally, reboot a host with a PXEboot capable network adapter and hit F12 to netboot.</p>
<p>Please let me know if you have any questions or comments.</p>
<p>&gt;&gt;&gt; Karl</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlmajer.com/2008/01/19/multi-os-installation-configuring-the-pxe-loader-environment/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

