Search ServerWatch
Search ServerWatch
Search ServerWatch




Continuous Real-time Data Protection and Disaster Recovery
Whitepaper: Learn how building a solid foundation from a flexible solution can not only integrate all elements within your datacenter - computing, storage, power and management - but prepares your data to survive and recovery... »
Virtualization - It's Not Just for Enterprises Anymore
Whitepaper: Read how virtualization can help companies of all sizes vastly increase server utilization levels, delay or avoid hardware purchases, and expand infrastructure capacity without increasing physical space requirements. »
Rightsizing Blades for the Mid-market
Whitepaper: Examine the requirements for servers, storage, and blade systems in the mid-market and how to apply blades your data center in a cost effective manner. »
VMware Infrastructure 3, Planning
Whitepaper: Read about planning, deployment, and operation of an Adaptive Infrastructure based on VMware Infrastructure and HP servers, storage, and management technologies. »
Disaster recovery made easy with HP BladeSystem and VMware virtualization
Webcast: Learn how you can leverage HP BladeSystem and VMware ESX Server to build a cost effective DR solution that can grow with your business. »

Staying Out of Deep Water: Performance Testing Using HTTPD-Test's Flood

14-Day Qualys Trial: Find Out in Minutes if Your Network is Vulnerable! Scan for the latest vulnerabilities & receive a detailed risk assessment report. Sign up now.

ServerWatch > Tutorials

July 7, 2003
Performing Configuration Testing Using HTTPD-Test's Perl Framework
By Martin Brown

HTTPD-Test is a collection of tools that provide ways of testing HTTP servers in general. The previously covered Flood (see Staying Out of Deep Water: Performance Testing Using HTTPD-Test's Flood), is one such tool. As the name implies, Flood enables administrators to test the performance of a Web server by flooding it with requests.

The Perl Framework, which is part of the same suite, concentrates on testing the configuration and components of Apache (the core binary and its associated support modules) on your platform to ensure the configuration works and the modules have compiled and installed properly.

By now you're probably thinking this sounds pretty useless -- once you've installed Apache, especially from a pre-built binary installer, why would you want (or need) to test it?

The simple answer is that many modules -- even the core ones -- rely on the functionality of external libraries. If you periodically update your system, either manually or automatically through something like the RedHat Network, then you could break your Apache installation without even realizing it. The problem could be so obscure that it never turns up in standard tests and investigations, and you probably wouldn't know about it until a user complains.

In a deployment situation, whether installing Apache on a number of identical machines or on a range of different platforms, you must ensure that your Apache installation is as stable and compatible as possible. Often simply starting Apache or using the configtest argument to apachectl will not be enough to highlight a potential problem.

The Perl Framework was originally designed to help test the mod_perl v2.0 extension for Apache. While the framework is compatible with both Apache 1.3.x and Apache 2.0, the modular nature of Apache 2.0 makes the process significantly easier, and the tests provided by the framework in 2.0 are much more extensive.

Installing the Framework

To use the Framework you'll need Perl and a variety of additional modules, as well as the main HTTPD-Test distribution itself. If you haven't already downloaded the HTTPD-Test distribution, use the following to download the latest version from the Apache CVS server (the password is 'anoncvs'):

$ cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login
$ cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co httpd-test

Once you have that available, the easiest way to get the necessary Perl modules is through CPAN:

perl -MCPAN -e 'install Bundle::ApacheTest'

The above will download and install all the modules required by the Perl framework. If you've got CPAN set to follow prerequisite modules, it will download or update all of the other required modules.

The next step is setting up and building the Perl framework. First, change to the perl-framework directory within the httpd-test directory. If you are using a dynamic version of Apache, you should have apxs tool, and you can build the suite using the -apxs command line option and specify the tools location, e.g.,:

perl Makefile.PL -apxs /export/http/apache2/bin/apxs

Otherwise, just use:

Perl Makefile.PL

This will build the necessary components for you to continue and run the actual tests.

The next step is run make to create all the necessary files and get ready to run the tests.

Running the Tests

The tests themselves are located in the t directory below the main perl-framework directory. One global script, TEST, provides an interface to the underlying test routines and summarizes the output of the various tests for you. You can also run tests individually by specifically requesting them on the command line.

Before you start, bear in mind how the tests actually work. The Perl framework is designed to test the modules and components in an Apache installation. That means it uses the Apache installation directly -- it doesn't build or install a copy for you. Therefore, your Apache configuration should be exactly as you are planning to use it, and you must ensure it's the right version of Apache, configured during build time with the right options, and that your DSO modules are up to date and installed (assuming you are using them).

The framework does not use either your configuration file or documents from your Web site. Test documents are included with the distribution, located in the t/htdocs directory. The configuration file is generated just before the test sequence starts running the actual tests, which is almost immediately before the Apache server is started. You can set certain options when you start the TEST script. For more in-depth modifications, the best way is to add or edit the file t/conf/extra.conf.in with your desired settings. This will be incorporated into the temporary config file generated before the tests are executed.

Go to page 1  2  


Discuss this article
Tools:
Add serverwatch.com to your favorites
Add serverwatch.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x

Tutorials Archives




JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: 7.0, Microsoft's Lucky Version?
Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Windows Server 2008
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES