Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: OT: Pin a CPU in Solaris
On Tuesday 12 June 2001 10:40, Erik Williams wrote:
> Does anyone know how to pin a Solaris CPU at a high utilization? I am doing
> some testing and want to evaluate a system under a high CPU load. Thanks.
>
> Erik
The philosophical context of this excercise is already well covered, so I just had some fun making a Perl script to do it.
Run it in a loop, add a loop to the script, run as many of these as you want.
Fire up 50 of these babies simultaneously and bring your system administrator to his knees, along with your systems.
Change the factorial from 2,000,000 to 200,000,000 for extra special effects. ;)
You're welcome. :)
Jared
print factorial([1..2000000]), "\n";
sub factorial {
$refArray2Factor = shift; clear(); my $factored=0; my $arrayMax = @$refArray2Factor; for ( my $i=0; $i<$arrayMax; $i++ ) { $factored = _factorial(${$refArray2Factor}[$i]); } return $factored;
{
my $factorial;
sub _factorial {
my $factor = shift; $factorial = 1 unless defined $factorial; $factorial *= $factor; return $factorial;
sub clear { undef $factorial }
}
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jared Still INET: jkstill_at_cybcon.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Jun 13 2001 - 00:58:18 CDT