ADVERTISE HERE

VM Load Generator

Title: VM Load Generator
Author(s): Xtravirt (Paul Davey)
Target Audience: Technical - Novice
Current Revision: 1.0 April 2008
First Published: 1 April 2008
Products: Perl, VBscript
UID: XD10061
Information
Title: 
VM Load Generator
Author(s): 
Xtravirt (Paul Davey)
Target Audience: 
Technical - Novice
First Published: 
1 April 2008
Products: 
Perl, VBscript
UID: 
XD10061

Scripts to generate a load under a Windows or Linux VM

1.0 Overview

These could be used for stress testing your ESX Servers  One is VBscript for Windows VM's and the other is Perl for *nix (Unix/Linux) VM's.  Once you've started the .vbs one you can stop it by killing the wscript process under Windows Task Manager. 

cpubusy.pl

#!/usr/bin/perl

$goal = 2181818;
while (TRUE) {
for ($i=0; $i<=$goal; $i++) {
$x = 0.000001;
$y = sin($x);
$y = $y + 0.00001;
}
next;
$y = $y + 0.01;
}

cpubusy.vbs

Dim goal
Dim before
Dim x
Dim y
Dim i
goal = 2181818

Do While True
before = Timer
For i = 0 to goal
x = 0.000001
y = sin(x)
y = y + 0.00001
Next
y = y + 0.01
Loop

Tags
capacity
ESX
load generator
perl
vbscript
VMware
Management

Spotlight:

VMware Documentation Downloader v10.08.13

Updated for vSphere 4.1 - A free tool for those on the move who need information FAST

Mobile Cloud Computing World Forum

Join the 1 day conference and exhibition on Enterprise Mobile Cloud Computing and Enterprise Apps or watch the event streamed LIVE online free of charge

E-book: Deploy ESX4 – The Ultimate Guide

PXE booting, WDS, %pre/%post scripting, videos and a whole lot more

Technology Exchange: