tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: Script to create a lot of processes?
@ 2003-02-14 16:31 Carl Christopher Bavington @ Langley
  0 siblings, 0 replies; only message in thread
From: Carl Christopher Bavington @ Langley @ 2003-02-14 16:31 UTC (permalink / raw)


Managers, Thanks to all who replied, espically to Dr. Thomas P. Blinn and Dr
Tim Cutts
The while loop several people suggested were owned by 1 when killing the
shell.
The one i popped for was a perl script:

Try the following perl script.  This is a *really* nasty fork bomb, so
don't run it on a production system.  Some systems behave very badly if
you do this to them  :-)

#!/usr/bin/perl

my @pids = ();
my $pidcount = 0;
my ($pid);

while (defined($pid = fork)) {
    if ($pid) {
        push (@pids, $pid);
        $pidcount++;
    } else {
        @pids = ();
        sleep 3600;
        exit 0;
    }
}

if (@pids) {
    kill 9, @pids;
    print $pidcount, "\n";
}



> -----Original Message-----
> From:	Carl Christopher Bavington @ Langley 
> Sent:	14 February 2003 14:43
> To:	Tru64 Managers Mail Group (E-mail)
> Subject:	Script to create a lot of processes?
> 
> I am wanting a script which creates a lot of PIDs with the same PPID to
> test the max-proc-per-user kernel param regarding another problem i have.
> And im be v.stupid and cant think of an easy way to do this, trying to use
> & in a loop makes the PPID 1
> 
> Any ideas???.
> 
> Carl Bavington
> Senior Technical Analyst (CAS)
> ntl
> 


The contents of this email and any attachments are sent for the personal attention
of the addressee(s) only and may be confidential.  If you are not the intended
addressee, any use, disclosure or copying of this email and any attachments is
unauthorised - please notify the sender by return and delete the message.  Any
representations or commitments expressed in this email are subject to contract. 
 
ntl Group Limited



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-02-14 16:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-14 16:31 SUMMARY: Script to create a lot of processes? Carl Christopher Bavington @ Langley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox