Hey · IT Guy!

HOME Archive Tags GITHUB ABOUT RSS

LInux performance tuning basic

2013-07

Case 1 . CPU

shell bomp


:() { :|:& };:
</pre>

Example 3-1 uptime output from a CPU strapped system

18:03:16 up 1 day, 2:46, 6 users, load average: 182.53, 92.02, 37.95

zhangchl perl]$ cat cpuhigh.pl 

\#!/usr/bin/perl -w

use strict;

my $maxchp=20;

my $i=0;

#for (my $i=0;$i<=100;$i++)

while(1)  

{ 

   print "currect process is $$.....$i\n";

    $i++;

   my $pid=fork();

   if (!(defined $pid))

      {   die "can't fork a child process!\n";}

   elsif($pid==0)

      { print "This is child process$$\n";

        exit;}

   else

      { print "This is parent process$$\n";}

}
</pre>
It's a internal traning material