使用WAS Tool对web进行压力测试

 Web压力测试是目前比较流行的话题,利用Web压力测试可以有效地测试一些Web服务器的运行状态和响应时间等等,对于Web服务器的承受力测试是个非常好的手法。Web 压力测试通常是利用一些工具,例如微软的Web Application Stress、Linux下的siege、功能全面的Web-CT等等,这些都是非常优秀的Web压力测试工具。

虽然这些工具给我们测试服务器承受能力带来方便,但是它们的危害却更是惊人,甚至于利用随便一种比较全面的测试工具就可以对一台小型的Web服务器发动灾难性的拒绝式攻击。下面我就带大家利用微软的Web Application Stress进行一次Web压力测试,其目的是为了让大家看到它的巨大危害。

一、工具简单介绍

Microsoft Web Application Stress Tool 是由微软的网站测试人员所开发,专门用来进行实际网站压力测试的一套工具。透过这套功能强大的压力测试工具,您可以使用少量的客户端计算机仿真大量用户上线对网站服务所可能造成的影响,在网站实际上线之前先对您所设计的网站进行如同真实环境下的测试,以找出系统潜在的问题,对系统进行进一步的调整、设置工作。就是因为这些特性,才使它具备了D.O.S轰炸的功能。

小提示:D.O.S(拒绝服务攻击)通过使你的服务计算机崩溃或把它压跨来阻止你提供服务。简单来说,就是让你的计算机提供可能多的服务从而使你的计算机陷入崩溃的边缘或崩溃。

二、工具简单设置

打开Web Application Stress Tool,很简洁的一个页面(如图1),上面是工具栏,左下方是功能选项,右下方是详细设置选项。在对目标Web服务器进行压力测试之前,先对它进行一些必要的设置。

 

图1


 

1.     在“settings”的功能设置中(如图2),一个是Stress level (threads)这里是指定程序在后台用多少线程进行请求,也就是相当于模拟多少个客户机的连接,更加形象的就是说设置多少轰炸的线程数。一般填写500~1000,因为这个线程数是根据本机的承受力来设置的,如果你对自己的机器配置有足够信心的话,那么设置的越高,轰炸的效果越好。

 

图2

 

2.在“Test Run Time”中来指定一次压力测试需要持续的时间,分为天、小时、分、秒几个单位级别,你根据实际情况来设置吧!

3.其余的选项不太重要,这里就不再浪费笔墨,朋友们可以自己尝试一下设置。

三、压力测试

工具介绍完了,下面来准备条件:这里与一个朋友商量好进行测试,他是单机上网,机器配置是CPU:Athlon XP2500+、内存512MB、硬盘80GB等,机器配置还不错。他在机器上安装了IIS,架设了一台对外的Web服务器,Web服务中的程序是动网7.0。我就利用压力测试工具对这台服务器进行测试。

步骤1:在工具中点右键,选择Add命令,增加了一个新的测试项目:New script,对它进行设置,在主选项中的server中填写要测试的服务器的IP地址。在下方选择测试的Web连接方式,这里的方式Verb选择get,path选择要测试的Web页面路径,这里填写/Index.asp,即动网的首页文件(如图3)。

 

图3

 

步骤2:在“Settings”的功能设置中将Stress level (threads)线程数设置为1000。完毕后,点工具中的灰色三角按钮即可进行测试(如图4)。测试完毕,等待朋友把任务管理器以及连接查看的截图发过来!

 

图4

 

攻击开始后,朋友从任务管理器中可以看到CPU使用率已经达到100%,损耗率达到最大(如图5)。在CMD窗口中使用命令netstat -an,可以看到我的IP地址在朋友服务器上的80端口进行了非常多的连接(如图6)。而且它的Web网站已经打不开了,提示过多用户连接,达到了跟D.O.S攻击一样的目的。

 

图5

图6

 

试想,如果利用多台肉鸡对一台服务器进行Web压力测试,那么对这台服务器来说将是灭顶之灾,所以朋友们在使用它之前一定要慎重考虑。
l另使用:
制作WAS脚本是相当简单的,不过要制作出模拟真实用户活动的脚本有点儿复杂。如果你已经有一个运行的Web网站,可以使用Web服务器的日志来确定Web网站上的用户点击分布。如果你的应用还没有开始运行,那么只好根据经验作一些猜测了。我们假定有30个会员在浏览书店,同时又有一个会员正在购买。要模拟两者混合而成的行为,首先必须创建页面组并在脚本的Page Group分枝确定点击分布情况。在Page Group分枝中我们可以增加、修改或删除页面组,也可以为各个组修改流量的分布。
创建了页面组之后,我们就可以在主脚本视图中赋予各个请求不同的页面组,如图3所示。为每个请求指定页面组相当于告诉WAS如何分布流量。记住在本例中对grp_buy组页面的请求约占总数的3%,而对grp_browse组页面的请求约占97%。
如果网站提供个性化服务,要进行身份验证或使用Cookies,我们还要为WAS提供一个用户目录。WAS中的用户存储了发送给服务器的密码以及服务器发送给客户端的Cookies。增加用户数量并不增加Web服务器的负载。必须提供足够数量的用户以满足并发连接的要求(Stesss Level乘以Stress Multiplier)。Stress Level和Stress multiplier这二个项决定了访问服务器的并发连接的数量。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
=== Simple Tags === Contributors: momo360modena Donate link: http://beapi.fr/donate/ Tags: tag, posts, tags, admin, administration, tagging, navigation, terms, taxonomy Requires at least: 3.0 Tested up to: 3.3 Stable tag: 2.2 Add some tools for taxonomies : Terms suggestion, Mass Edit Terms, Auto link Terms, Ajax Autocompletion, Click Terms, Auto terms, Advanced manage terms, Advanced Post Terms, Related Posts by Terms, etc. == Description == Simple Tags is the successor of Simple Tagging Plugin **This is THE perfect tool to manage perfectly your WP terms for any taxonomy** It was written with this philosophy : best performances, more secured and brings a lot of new functions This plugin is developped on WordPress 3.3, with the constant WP_DEBUG to TRUE. * Administration * Tags suggestion from Yahoo! Term Extraction API, OpenCalais, Alchemy, Zemanta, Tag The Net, Local DB with AJAX request * Compatible with TinyMCE, FCKeditor, WYMeditor and QuickTags * tags management (rename, delete, merge, search and add tags, edit tags ID) * **Edit mass tags (more than 50 posts once)** * Auto link tags in post content * Auto tags ! * Type-ahead input tags / Autocompletion Ajax * Click tags * Possibility to tag pages (not only posts) and include them inside the tags results * **Easy configuration ! (in WP admin)** * Public * Technorati, Flickr and Delicious tags * Dynamic Tag Clouds with colors with Widgets (random order, etc) And more... == Installation == **Required PHP5.** The Simple Tags can be installed in 3 easy steps: 1. Unzip "Simple tags" archive and put all files into a folder like "/wp-content/plugins/simple-tags/" 2. Activate the plugin through the 'Plugins' menu in WordPress 3. Inside the Wordpress admin, go to Options > Simple Tags, adjust the parameters according to your needs, and save them. == Frequently Asked Questions == = Simple Tags is compatible with which WordPress versions ? = * 2.0 and upper are compatible only with WordPress 3.0 & 3.1 & 3.2 & 3.3 ! * 1.7 and upper are compatible only with WordPress 2.8, 2.9 ! * 1.6.7 and before are compatible with WordPress 2.3, 2.5, 2.6, 2.7 * Before WP 2.3, you must use the plugin Simple Tagging. == Screenshots == 1. A example tag cloud (with dynamic color and size) 2. Do you have a not yet tagged blog ? Edit mass tags options is perfect for you : tag 20, 30 or 50 articles with autocompletion in one step ! 3. Autotagging your content ! 4. Add tags easily with click tags ! 3. To help you to add easily tags, Simple Tags has an autocompletion script. When you begin to tape a letter or more, a list a tags appears : you have only to choose ! You can choose the down direction to see all the tags. 6. You also can suggest tags from lot's of service (Yahoo! Term Extraction API, OpenCalais, Alchemy, Zemanta, Tag The Net, Local DB) == Changelog == * Version 2.2 : * Add compatibility with WP3.3 * Move JavaScript register/enqueue to dedicated hook * Version 2.1.2 : * Add some nonces for improve security for settings panel * Version 2.1.1 : * Add a feature that allow deleting rarely used terms. (based on counter term) * Fix bug for allow Suggested Tags for page CPT. * Version 2.1 : * Add compatibility with WP 3.2 * Fix bug with autocompletion. (jQuery want now a strict content type text/plain) * Upgrade JS Libary (jQuery Autocomplete, jQuery Cookie, jQuery bgIframe) * Version 2.0-beta9 : * Fix conflict with plugin using Google Library Javascript for jQuery. Example : "Use Google Libraries" * Add an option for choose input text or textarea for old tags field * Add an option for min chars autocompletion * Version 2.0-beta8 : * Update POT. * Update french translation. * Version 2.0-beta7 : * Add a metabox on write page that allow to deactive autolinks or autotags for a specific post * Add an option for restore old feature "Manage terms" * Add an option for restore old feature "Related posts" * Remove "Clean DB" and "Rename slugs" in manage terms * Remove "include cat" on "Related Posts" settings * Optimize function "Related posts" * Reorganize admin for have a tab features with all features available * Use a input text for Simple Tags autocompletion field * Remove ID of term from autocompletion * Fix autocompletion on mange terms page * Add a field for advanced usage on tagcloud widget * Version 2.0-beta6 : * Add Japanese translation (thanks - kazuhisa) * Fix a bug with search and taxonomy param for mass edit terms. (ticket #233) * Fix a bug with auto tags and whole word option. (ticket #232) * Fix a bug with tag/pages for include pages in WP_Query for a tag * Improve performance of auto link * Fix a bug with max links by posts for auto links * Add an option for choose priority hook of auto links * Version 2.0-beta5 : * Fix a bug and a notice with st_the_tags() that not display any tags... * Version 2.0-beta4 : * Fix a fatal with error with autoterms. * Fix a bug with autoterms when saving post, somes times called twice... * Improve performance when saving posts. * Allow old tags field for each custom post type that use post tags. * Version 2.0-beta3 : * Fix a bug when the st_the_tags() function is called. * Version 2.0-beta2 : * Restore empty templates functions for skip errors * Fix a bug with autolinks * Restore custom post tags feature : st_the_tags() * Fix a bug with widget taxo option saving * Version 2.0-beta1 : * This version is a back to fondamentals. Somes features are removed ! * This version need testing ! * Remove old marker <!--st_tag_cloud--> * Remove related posts * Remove related tags * Remove tags as HTML keywords * Remove nofollow options * Remove custom function for display current post tags * Remove auto-add post tags * Remove embedded tags * Change method for tags for page. * Improve memory consommation : all feature can be deactived. * Improve memory consommation : Stop use class variables for options * Support mass edit with CPT/CT * Improve AJAX call by using WordPress hook * Version 1.8.1 : * Improve uninstaller * Improve code widgets * Improve support of custom taxonomies for simple tags features * Version 1.8.0 : * Compatibility 3.0 * Add an option for auto-tags * Remove somes notices * Fix a bug with tag cloud and empty terms * Fix a bug with comma on font-size CSS depending locales * Version 1.7.5 : * Fix a bug with auto links terms. (type input) * Fix cache conflict key * Fix a opencalais bug on firt pass integration * Fix a bug with limit days/category filter for tag cloud. * Fix javascript autocomplete for allow enter new tag. * Re-add list of tags on manage page. * Version 1.7.4.4 : * Fix a stupid during the first activation. (PHP4/PHP5) * Version 1.7.4.3 : * Fix a bug with PHP 4.4 and plugin activation. (PHP4 suck...) * Remove base class for compatibility PHP4. * Fix sanitized HTML on admin. * Fix random order for tag cloud. * Try a fix for support WP-O-Matic cron. * Version 1.7.4.2 : * Updated Traditional Chinese translation (thank to Neil Lin) * Fix a bug with selector taxonomy and user taxonomy. (thank to Nicolas Furno) * Version 1.7.4.1 : * Updated italian translation * Fix a bug with old random value for widget/tag cloud call (thank to marc@gregel.com) * Version 1.7.4 : * Release of version 1.7.4, to avoid confusion with the borked version 1.7.2 published in error. * Externalize options array on external file for diminue memory consommation. (call only on options page) * Fix importers embedded tags * Version 1.7.2 : * Add taxonomy support * Rewrite manage page * New JS for autocomplete, use AJAX for better performance * Fix PHP4. * Fix bug with Yahoo API/Tag the net for long post * Add OpenCalais, Alchemy and Zemanta (first pass, API offers much more possibilities!) * Version 1.7.1-rc1.2 : RC 1.2 (this version must be test !) * Fix compatibility PHP4 * Version 1.7.1-rc1.1 : RC 1.1 (this version must be test !) * Fix a bug with activation hook. * Version 1.7.1-rc1 : RC 1 (this version must be test !) * Somes ajust for Wordpress 2.9 * Remove 99,99% notices PHP from ST * Clean some part of the plugin. * Version 1.7.1-a1 : Alpha 1 * Check compatibility WP 2.9 ( fix somes UI bugs ) * Fix a bug with save Widget options * Version 1.7b1.1 * Add exclude option in auto tags link. * Version 1.7b1 * Add compatibily WP 2.8 * Remove support old WP versions * Change some things on architecture for optimize performance on admin. (stop copy class variables) * Use new API for Widgets * Use new API for Taxonomy * Remove somes "notices" PHP * Fix old cache method. * Version 1.6.6 * Add Belorussian translation * Version 1.6.5 * Fix redeclare class "Services_JSON_Error" bug * Version 1.6.4 * Fix a stupid bug with JavaScript add tags. * Version 1.6.3 * Fix a small bug with JSON class. * Version 1.6.2 * Click tags and suggested tags can work with default WordPress Tags. * The Simple Tags auto completion replace default WordPress Tags input. * Restore administration options. * Better management of Simple Tags with WP_Scripts and WP_Styles * Add an option for auto link tags. * Fix a potential error with compatibility old markers. * Update french and chineese translation. * Version 1.6.1 * Fix a JavaScript error for Suggested Tags. * Version 1.6.0 * Add compatibility with WordPress 2.7, use new API for HTTP and Admin. No new features ! * Version 1.5.7 * Move autolink after ShortCodes * Add Italian and German translation * Fix a potential bug during the plugin activation. * Version 1.5.6 * Improve performance of MetaKeywords and Autolink * Conform HTML W3C * Version 1.5.5 * Restore full manage page * Fix duplicate tags for click tags and autocompletion * Lot's of optimization... * Update translations * Add spanish translation * Version 1.5.3 * Fix counter for tags. (you must re-save your posts) * Update translations (ja, ru) * Version 1.5.2.1 * Fix internationalization with Gengo * Update zh_CN translation * Version 1.5.2 * Fix widgets * Edit priority * Fix internationalization * Version 1.5.1 * Wait plugin_init for start ST :) * Version 1.5 * Add compatibility with WordPress 2.5 * Version 1.3.9 * Fix nofollow rel feature * Remove warning with keywords feature * Version 1.3.8 * Fix internationalization when reset plugin options (and installation) * Fix auto link feature (word replaced keep original case) * Version 1.3.7 * Improved performance of Simple Tags (specially Related Posts) * Version 1.3.6 * Fix auto tags with all DB and this feature work also for auto tags save feature * Clean lot's url * Update japan language * Version 1.3.5 * Add an option for auto link case * Fix rel HTML for auto link * Restict tag cloud for published tag (exclude programmed) * Version 1.3.4 * Fix autolink (new algo) * Version 1.3.3 * Fix link to new page * Update languages * Version 1.3.2 * Update japan translation * Version 1.3.1 * Plugin compatible with mu-plugins without modifications (NOT TAGS SITE WIDE) (for truth !) * Include categories into Tag Cloud and Tag list * Improve performance with a better WP Object Cache management * Add a global option for rel="nofollow" attribute * Add an option to limit keywords in HTML header * Desactivate keywords generation if All In One SEO Pack is actived. * st_the_tags work outside loop now... * Add an option to uninstall all ST options * Add 2 options for auto tags features * Fix javascript autotag features * Fix lot's bugs in admin ;) * Version 1.3 * Plugin compatible with mu-plugins without modifications (NOT TAGS SITE WIDE) * Fix auto link tags now working without meta-keywords * New parameter for auto link tags (min usage) * Fix auto link PREG_REPLACE error. * New parameter for related posts (min tags shared) * Add marker %post_title_attribute% for related posts, to use into title attribute * Add Related Tags * Add Remove Related Tags * Fix alphabetical order in tag cloud with accent * New interface for Tags options, more options for easily configuration * AJAX admin * AJAX Pagination for Manage Tags pages * Fix excessive memory consomation * Tags suggestion from Yahoo Term Extractions API, Tag The Net and Local Tags with AJAX request * Compatible with TinyMCE, FCKeditor, WYMeditor and quicktags * Click tags with AJAX request * Preview color in Tag Cloud Admin Options * Version 1.2.4 * Fix a bug with inline tags post * Version 1.2.3 * Fix Widgets Order/Selection * Improve auto link feature * Add a param to desactive font-size during tags cloud generation * Add a param "min_usage" to display a tag in tags cloud * Smallest size and largest size can be the same... * Update translation * Version 1.2.2 * Add more options for inline related posts / tags * Fix empty title bug * Add maximum param for the function st_the_tags() * Update translation * Version 1.2.1 * Fix limit for tag cloud * Version 1.2 * New features * Auto link tags in post content * Auto tags (new and old content) * Importer for embedded tags * Tag Cloud * Fix Tag Cloud Widgets * New way for order tags cloud ( 2 steps ) * Allow embedded tag cloud * Add tag cloud for a specific category * Related Posts * New options for automatic insertion * Add a marker for post_excerpt * Fixed display nothing when no related posts * Current tags posts * New options for automatic insertion * Administration * Check WP version * Mass edit tags improved (search terms, filter untagged) * Removed untagged page * Improve special characters management (& ...) * Uniformize alert message * Autocompletion improved ! * Others * Improved plugin cache * Version 1.1.1 * Fix compatibily with MySQL < 4.1 (Marker "related_tags" of Related Posts is desactived.) * Version 1.1 * Fix XML-RPC and Embedded Tags * Improve compatibility JS with others plugins (calendar) * Minor improve in administration (order keeping on update) * Cleaner for empty terms * Add limit days for Tag Clouds and Related Posts * Add the marker: %relatedtags% for Related Posts => Display tag shared between 2 posts. * True random for tag cloud * Tag cloud can generate class level for CSS size/color * Add Order to Tag Cloud Widgets * Add 2 functions * st_meta_keywords() : Display keywords for manual insert in header * st_the_tags() : Improved the official the_tags() functions. * Add marker for Technorati, Flickr and Delicious * Version 1.0.4a (1.0.4a fix a small bug introduced in 1.0.4) * Update 3 translations for 1.0.4 * Add Japanese translation * Fix "exclude tags" in related posts * Version 1.0.3 * Add 3 translations (german and chineses (zh_TW and zh_CN)) * Fix a potential bug with posts relateds and WP Object Cache * Fix a bug with autocompletion JavaScript (tag not escape) * Possibility to customize date format in related posts * Optimization in meta keywords * New markers to related posts (see advanced usage), old markers are still available * Version 1.0.2 * Keywords * Fix a rare bug with problem encoding * Delete duplicate keywords * Related posts * Possibility to randomize post * New class for tag UL: "st-related-posts" * Tag cloud * Possibility to randomize tags * New class for tag UL: "st-tag-cloud" * Administration * Use WP roles instead old levels * Possibility to order "Mass edit Tags" by Date or ID * Counter now works on "Untagged" page" * Fix one bug on Mass Edit Tags, he was impossible to delete all tags for a post. * You can desactivate Widgets without have a fatal error * Version 1.0.1 * Fixes 2-3 minors bugs * Version 1.0 * Initial version == Upgrade Notice == Nothing to say...
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值