Record High Load Average

David C Lawrence tale at pawl.rpi.edu
Fri May 19 05:44:21 AEST 1989


In article <16202 at sequent.UUCP> rbk at sequent.UUCP (Bob Beck) offers a
method for driving up the load average of vfork.  I tried a modified
version of his suggestion which is very simple, drives the load
average up and steps back down.  Simple perhaps isn't a good
enough word -- the header is as long as the programme.  Quite an
amusing thing to spring on an unsuspecting soul.  It of course shows
up in ps, but a couple of minutes of work could make it very
mysterious.  Load metres love it, too. :-)

/*                               -*- Mode: C -*- 
 * upload.c --- Tom-foolery for the load average
 * Author          : David C Lawrence
 * Created On      : Thu May 18 14:52:26 1989
 * Last Modified By: David C Lawrence
 * Last Modified On: Thu May 18 14:56:52 1989
 * Update Count    : 1
 * Status          : sinister
 */

#include <vfork.h>

int main()

{
  int forks=0;

  while (forks < 32) {
    (void)vfork();
    forks++;
  }
  sleep(20);
  _exit(0);
}
--
 (setq mail '("tale at pawl.rpi.edu" "tale at itsgw.rpi.edu" "tale at rpitsmts.bitnet"))
 (error "UUCP not spoken here.  Long bang paths unlikely to get mail replies.")



More information about the Comp.unix.wizards mailing list