From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Carl Christopher Bavington @ Langley" Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: Script to create a lot of processes? Date: Fri, 14 Feb 2003 16:31:27 +0000 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Trace: main.gmane.org 1045240835 23110 80.91.224.249 (14 Feb 2003 16:40:35 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 14 Feb 2003 16:40:35 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.22.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 18jiiQ-0005HI-00 for ; Fri, 14 Feb 2003 17:29:30 +0100 Original-Received: (qmail 23337 invoked by uid 5); 14 Feb 2003 16:31:39 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 23328 invoked by uid 49493); 14 Feb 2003 16:31:39 -0000 Original-Received: from Carl.Bavington@ntl.com by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.54. spamassassin: 2.50-cvs. Clear:SA:0(-5.2/5.0):. Processed in 0.39472 secs); 14 Feb 2003 16:31:39 -0000 Original-Received: from unknown (HELO emroute3.ornl.gov) (160.91.4.110) by 0 with SMTP; 14 Feb 2003 16:31:38 -0000 Original-Received: from emroute3.ornl.gov (localhost [127.0.0.1]) by emroute3.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HAB00FDZ4KOAL@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Fri, 14 Feb 2003 11:31:37 -0500 (EST) Original-Received: from mast-dc0-sm07.private.ntl.com (cabletel1.cableol.net [194.168.3.4]) by emroute3.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HAB00G744KLNX@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Fri, 14 Feb 2003 11:31:34 -0500 (EST) Original-Received: from mast-dc0-se03.private.ntl.com (unverified) by mast-dc0-sm07.private.ntl.com (Content Technologies SMTPRS 4.2.10) with ESMTP id for ; Fri, 14 Feb 2003 16:31:31 +0000 Original-Received: by mast-dc0-se03.private.ntl.com with Internet Mail Service (5.5.2653.19) id ; Fri, 14 Feb 2003 16:31:31 +0000 Content-return: allowed Original-To: "Tru64 Managers Mail Group \(E-mail\)" X-Mailer: Internet Mail Service (5.5.2653.19) Xref: main.gmane.org gmane.os.tru64.managers:3335 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:3335 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