VMware Cloud Community
Subatomic
Enthusiast
Enthusiast
Jump to solution

Where can I find cpubusy.pl?

I am looking the the Perl version of CPU busy to run on Linux guests.

Does anyone know where I can get a copy?

Thanks in advance

If the comments were useful, please consider awarding points for helpful or correct. Thanks - SA -
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

Here you go, I just knocked this up based on the Windows VBS script, does the same thing but in Perl. Smiley Happy

#!/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;

}

View solution in original post

0 Kudos
8 Replies
Ken_Cline
Champion
Champion
Jump to solution

Google is your friend: http://my-speakeasy.com/vmware/

Ken Cline VMware vExpert 2009 VMware Communities User Moderator Blogging at: http://KensVirtualReality.wordpress.com/
0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

The link for that file does not work though. I found that also but could not download the file....

0 Kudos
Ken_Cline
Champion
Champion
Jump to solution

Ah yes...the infamous "500 Internal Server Error" Smiley Sad

Ken Cline VMware vExpert 2009 VMware Communities User Moderator Blogging at: http://KensVirtualReality.wordpress.com/
0 Kudos
FredPeterson
Expert
Expert
Jump to solution

You know, its just as easy to do this:

cpubusy.vbs

\----


Dim i

For i = 0 to 1000000000

Next

\----


Its the script I wrote when I wanted to see all four core's in a dual dual core windows server churn away in task manager. The real script spits out timings of when it started and stopped etc.

I got another that copy's a file from the network and another that creates a file of x size and fills it with random data writing in chunks you specify. I call it my little VMPerf - but I've started using it on physicals as well, just to get a comparison.

0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

But what if you do not have a Windows VM to run it on....

0 Kudos
admin
Immortal
Immortal
Jump to solution

Here you go, I just knocked this up based on the Windows VBS script, does the same thing but in Perl. Smiley Happy

#!/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;

}

0 Kudos
FredPeterson
Expert
Expert
Jump to solution

But what if you do not have a Windows VM to run it

on....

Well thats just asking to much, geez! Smiley Happy

0 Kudos
NavyChief
Contributor
Contributor
Jump to solution



#!/usr/bin/perl

# cpubusy.pl

if ($^O =~ /Win/) {
        $goal = 2700000;
} else {
        $goal = 3000000;
}

while (1) {
        $before = time();
        for ($i = 0; $i < $goal; $i ++) {
                $x = 0.000001;
                $y = sin($x);
                $y = $y + 0.00001;
        }
        $y += 0.01;
        print "I did three million sines in ", time() - $before, " seconds!\n";
}
0 Kudos