Problem on Perl DBI for Oracle-DBD-1.18
Problem on Perl DBI for Oracle-DBD-1.18
am 23.08.2006 16:55:14 von Keith.Lam
Hi DBI experts,
Could you please help me to resolve this Perl Oracle DBD problem.
I am using Oracle Client 10g, Perl 5.8.5 (default from RedHat ES4 =
installation) and Oracle-DBD-1.18.
The SQLPLUS and Perl cgi program runs and displays output as expected =
without any errors from the command line
I have the following error when running perl CGI script using Oracle DBD =
from the web browser:=20
"install_driver(Oracle) failed: Can't load =
'/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto /DBD/Oracle/O=
racle.so' for module DBD::Oracle: libclntsh.so.10.1: cannot open shared =
object file: No such file or directory at =
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230. at =
(eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected"
I searched on google and tried the suggestions from forums but still get =
the problem unsolved. These are what I tried:=20
=09
1. I've added /home/oracle/oracle/product/10.2.0/oraclient/lib to =
/etc/ld.so.conf and run "ldconfig" as shown below
[root@NetWatch ~]$echo $ORACLE_HOME/lib >> /etc/ld.so.conf =3D> OK
[root@NetWatch ~]$/sbin/ldconfig: =
/home/oracle/oracle/product/10.2.0/oraclient/lib/libexpat.so .0 is not a =
symbolic link
[root@NetWatch ~]$ldd =
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/ DBD/Oracle/Or=
acle.so
libclntsh.so.10.1 =3D> =
/home/oracle/oracle/product/10.2.0/oraclient/lib/libclntsh.s o.10.1 =
(0x00559000)
libdl.so.2 =3D> /lib/libdl.so.2 (0x00111000)
libm.so.6 =3D> /lib/tls/libm.so.6 (0x00115000)
libpthread.so.0 =3D> /lib/tls/libpthread.so.0 (0x00138000)
libnsl.so.1 =3D> /lib/libnsl.so.1 (0x0014a000)
libc.so.6 =3D> /lib/tls/libc.so.6 (0x00218000)
libnnz10.so =3D> =
/home/oracle/oracle/product/10.2.0/oraclient/lib/libnnz10.so =
(0x083c4000)
/lib/ld-linux.so.2 (0x00542000)
2. I put the following environment variables in the configuration file =
httpd.conf:
SetEnv LD_LIBRARY_PATH /home/oracle/oracle/product/10.2.0/oraclient/lib
SetEnv ORACLE_HOME /home/oracle/oracle/product/10.2.0/oraclient
3. I've given authority/access to every folder/object listed in the =
above paths to the user I am using.=20
4. Making sure all files were accesable and also need to make some links =
from the $ORACLE_HOME/lib dir to the */lib dir that perl can access.
5. All authority/access and symbolic links for libclntsh.so.10.1, =
libclntsh.so, libocci.so.10.1 and libocci.so are set up properly in =
/home/oracle/oracle/product/10.2.0/oraclient/lib
lrwxrwxrwx 1 oracle oracle 66 Aug 17 08:25 libclntsh.so -> =
/home/oracle/oracle/product/10.2.0/oraclient/lib/libclntsh.s o.10.1
-rwxrwxrwx 1 oracle oracle 0 Aug 23 10:34 libclntsh.so.10.1
lrwxrwxrwx 1 oracle oracle 15 Aug 17 08:25 libocci.so -> =
libocci.so.10.1
-rwxrwxrwx 1 oracle oracle 0 Aug 23 10:38 libocci.so.10.1
Could you please suggest me what else I should try to resolve this =
problem? I searched on google extensively but found no other sources of =
solutions beside those listed above.=20
Thanks,
Keith Lam
Corporate Security (IPC)
Tel: 416-327-1941
RE: Problem on Perl DBI for Oracle-DBD-1.18
am 23.08.2006 17:44:47 von eh1258
Does this sound familiar? Except I don't really know why he got this
problem and went that far without getting the DBD setup correctly with
Linux and Oracle 10g.
It is just a side-reading from a public DBI/DBD forum.
George Hsia
-----Original Message-----
From: Lam, Keith (MGS) [mailto:Keith.Lam@mgs.gov.on.ca]=20
Sent: Wednesday, August 23, 2006 7:55 AM
To: dbi-users@perl.org
Cc: Persaud, Rohan (MGS); Lam, Keith (MGS); khuyech@yahoo.com;
khuyech@gmail.com
Subject: Problem on Perl DBI for Oracle-DBD-1.18
Hi DBI experts,
Could you please help me to resolve this Perl Oracle DBD problem.
I am using Oracle Client 10g, Perl 5.8.5 (default from RedHat ES4
installation) and Oracle-DBD-1.18.
The SQLPLUS and Perl cgi program runs and displays output as expected
without any errors from the command line
I have the following error when running perl CGI script using Oracle DBD
from the web browser:=20
"install_driver(Oracle) failed: Can't load
'/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto /DBD/Oracle/
Oracle.so' for module DBD::Oracle: libclntsh.so.10.1: cannot open shared
object file: No such file or directory at
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230. at
(eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected"
I searched on google and tried the suggestions from forums but still get
the problem unsolved. These are what I tried:=20
=09
1. I've added /home/oracle/oracle/product/10.2.0/oraclient/lib to
/etc/ld.so.conf and run "ldconfig" as shown below
[root@NetWatch ~]$echo $ORACLE_HOME/lib >> /etc/ld.so.conf =3D> OK
[root@NetWatch ~]$/sbin/ldconfig:
/home/oracle/oracle/product/10.2.0/oraclient/lib/libexpat.so .0 is not a
symbolic link
[root@NetWatch ~]$ldd
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/ DBD/Oracle/O
racle.so
libclntsh.so.10.1 =3D>
/home/oracle/oracle/product/10.2.0/oraclient/lib/libclntsh.s o.10.1
(0x00559000)
libdl.so.2 =3D> /lib/libdl.so.2 (0x00111000)
libm.so.6 =3D> /lib/tls/libm.so.6 (0x00115000)
libpthread.so.0 =3D> /lib/tls/libpthread.so.0 (0x00138000)
libnsl.so.1 =3D> /lib/libnsl.so.1 (0x0014a000)
libc.so.6 =3D> /lib/tls/libc.so.6 (0x00218000)
libnnz10.so =3D>
/home/oracle/oracle/product/10.2.0/oraclient/lib/libnnz10.so
(0x083c4000)
/lib/ld-linux.so.2 (0x00542000)
2. I put the following environment variables in the configuration file
httpd.conf:
SetEnv LD_LIBRARY_PATH
/home/oracle/oracle/product/10.2.0/oraclient/lib
SetEnv ORACLE_HOME /home/oracle/oracle/product/10.2.0/oraclient
3. I've given authority/access to every folder/object listed in the
above paths to the user I am using.=20
4. Making sure all files were accesable and also need to make some links
from the $ORACLE_HOME/lib dir to the */lib dir that perl can access.
5. All authority/access and symbolic links for libclntsh.so.10.1,
libclntsh.so, libocci.so.10.1 and libocci.so are set up properly in
/home/oracle/oracle/product/10.2.0/oraclient/lib
lrwxrwxrwx 1 oracle oracle 66 Aug 17 08:25 libclntsh.so
-> /home/oracle/oracle/product/10.2.0/oraclient/lib/libclntsh.s o.10.1
-rwxrwxrwx 1 oracle oracle 0 Aug 23 10:34
libclntsh.so.10.1
lrwxrwxrwx 1 oracle oracle 15 Aug 17 08:25 libocci.so ->
libocci.so.10.1
-rwxrwxrwx 1 oracle oracle 0 Aug 23 10:38 libocci.so.10.1
Could you please suggest me what else I should try to resolve this
problem? I searched on google extensively but found no other sources of
solutions beside those listed above.=20
Thanks,
Keith Lam
Corporate Security (IPC)
Tel: 416-327-1941
RE: Problem on Perl DBI for Oracle-DBD-1.18
am 23.08.2006 17:48:56 von Philip.Garrett
Lam, Keith (MGS) wrote:
> Hi DBI experts,
>=20
> Could you please help me to resolve this Perl Oracle DBD problem.
>=20
> I am using Oracle Client 10g, Perl 5.8.5 (default from RedHat ES4
> installation) and Oracle-DBD-1.18.=20
>=20
> The SQLPLUS and Perl cgi program runs and displays output as expected
> without any errors from the command line=20
>=20
> I have the following error when running perl CGI script using Oracle
> DBD from the web browser:=20
>=20
> "install_driver(Oracle) failed: Can't load
>
'/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto /DBD/Oracle/
Oracle.so'
> for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object
> file: No such file or directory at
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
> at (eval 1) line 3 Compilation failed in require at (eval 1) line 3.=20
> Perhaps a required shared library or dll isn't installed where
> expected"=20
[snip]
>=20
> 5. All authority/access and symbolic links for libclntsh.so.10.1,
> libclntsh.so, libocci.so.10.1 and libocci.so are set up properly in
> /home/oracle/oracle/product/10.2.0/oraclient/lib =20
What are the permissions on that directory itself. If you su to nobody
(or whoever your server runs as), can you cd into that dir?
=20
> Could you please suggest me what else I should try to resolve this
> problem? I searched on google extensively but found no other sources
> of solutions beside those listed above. =20
If you're using Apache, you can start it with the -X option to run in
single-process debug mode. That will make it easier to use the LD_DEBUG
environment variable to track down your problem.
# dumps actual library search paths=20
LD_DEBUG=3Dlibs httpd -X
After the server has started up, you can hit the web page that will load
DBD::Oracle, at which point you should see the search path that ld is
using to find the library.
Regards
Philip
Re: Problem on Perl DBI for Oracle-DBD-1.18
am 23.08.2006 18:35:53 von bvasundhar
------=_Part_120928_31749651.1156350953074
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi Keith
On 8/23/06, Lam, Keith (MGS) wrote:
>
> Hi DBI experts,
>
> Could you please help me to resolve this Perl Oracle DBD problem.
>
> I am using Oracle Client 10g, Perl 5.8.5 (default from RedHat ES4
> installation) and Oracle-DBD-1.18.
>
> The SQLPLUS and Perl cgi program runs and displays output as expected
> without any errors from the command line
>
> I have the following error when running perl CGI script using Oracle DBD
> from the web browser:
>
> "install_driver(Oracle) failed: Can't load
> '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto /DBD/Oracle/Oracle.so'
> for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file:
> No such file or directory at
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230. at
> (eval 1) line 3
> Compilation failed in require at (eval 1) line 3.
> Perhaps a required shared library or dll isn't installed where expected"
>
> I searched on google and tried the suggestions from forums but still get
> the problem unsolved. These are what I tried:
>
> 1. I've added /home/oracle/oracle/product/10.2.0/oraclient/lib to
> /etc/ld.so.conf and run "ldconfig" as shown below
>
> 2. I put the following environment variables in the configuration file
> httpd.conf:
> SetEnv LD_LIBRARY_PATH
> /home/oracle/oracle/product/10.2.0/oraclient/lib
> SetEnv ORACLE_HOME /home/oracle/oracle/product/10.2.0/oraclient
> <*SNIPPED*>
> 4. Making sure all files were accesable and also need to make some links
> from the $ORACLE_HOME/lib dir to the */lib dir that perl can access.
>
> 5. All authority/access and symbolic links for libclntsh.so.10.1,
> libclntsh.so, libocci.so.10.1 and libocci.so are set up properly in
> /home/oracle/oracle/product/10.2.0/oraclient/lib
> <*SNIP AGAIN*>
> Could you please suggest me what else I should try to resolve this
> problem? I searched on google extensively but found no other sources of
> solutions beside those listed above.
1. There are no DLLs in Linux like in windows,
instead of writing so much text you could have
$perl -c ed the program you tried to run and pasted just the
errors.
However,
Please do a make;make test;make install of Oracle DBD and DBI
CGI is for the webinterface and DBI for the database so when problem is with
the Database
you probably need not mention the CGI issues in the mail.
and I think if you do DBD and DBI Install everything will be solved.
if now ... we are here to troubleshoot.
"Google is my Best friend, But I think I will ask the RIGHT Question at
RIGHT TIME as I know he is tricky"
Thanks,
>
> Keith Lam
> Corporate Security (IPC)
> Tel: 416-327-1941
>
>
--
Best,
Vasundhar
--
If Physics is my God, Linux is my Girlfriend.
I go to the temple of biology to understand God with my girlfriend. ;) [Some
call it Bioinformatics]
------=_Part_120928_31749651.1156350953074--
Help with my perl script
am 23.08.2006 20:04:42 von joebayerii
--0-474202526-1156356282=:82124
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Group,
I am trying to write a load testing script.
The script goes like this:
++++++++++++++++++++++++++++++++++
my $j = 0;
while ($j < 300)
{
$dbh[$j] = DBI->connect ( "dbi:Oracle:$instance[$i]",
"$username[$i]",
"$passwd[$i]",
{
PrintError => 1,
RaiseError => 1,
AutoCommit => 1
}
) || die "Database Connection not made $DBI::errstr" ;# Create a Database
#do some random, endless select statement here.
$j++;
}
++++++++++++++++++++++++++++++++++++++++++
What I want is 300 session do the select statement simultaneously. But this script will do one session after another.
Do I REALLY have to start 300 perl script in order to this testing, or there is some way in perl that one script can start up 300 session and do their invidual select simultaneously?
Thanks for your help.
Joe
---------------------------------
All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.
--0-474202526-1156356282=:82124--
RE: Help with my perl script
am 23.08.2006 20:11:52 von Will.Rutherdale
This is not really a DBI question, because, although your testing is
over DBI, the capabilities you're asking about concern elementary Perl.
Try
$ man perlfunc
and you will see there is a fork() function available standard in Perl
that lets you run multiple copies of the same code as separate
processes. The child code can then connect to DBI and run your testing
suite.
-Will
> -----Original Message-----
> From: joe bayer [mailto:joebayerii@yahoo.com]=20
> Sent: Wednesday 23 August 2006 14:05
> To: dbi-users@perl.org
> Subject: Help with my perl script
>=20
>=20
> Group,
> =20
> I am trying to write a load testing script.
> =20
> The script goes like this:
> ++++++++++++++++++++++++++++++++++
> my $j =3D 0;
> while ($j < 300)
> {
> $dbh[$j] =3D DBI->connect ( "dbi:Oracle:$instance[$i]",
> "$username[$i]",
> "$passwd[$i]",
> {
> PrintError =3D> 1,
> RaiseError =3D> 1,
> AutoCommit =3D> 1
> }
> ) || die "Database Connection not made=20
> $DBI::errstr" ;# Create a Database
> #do some random, endless select statement here.
> $j++;
> }
> ++++++++++++++++++++++++++++++++++++++++++
> =20
> What I want is 300 session do the select statement=20
> simultaneously. But this script will do one session after another.
> =20
> Do I REALLY have to start 300 perl script in order to this=20
> testing, or there is some way in perl that one script can=20
> start up 300 session and do their invidual select simultaneously?
> =20
> Thanks for your help.
> =20
> Joe
>=20
> =09
> ---------------------------------
> All-new Yahoo! Mail - Fire up a more powerful email and get=20
> things done faster.
>=20
- - - - - Appended by Scientific Atlanta, a Cisco company - - - - -=20
This e-mail and any attachments may contain information which is confidenti=
al, proprietary, privileged or otherwise protected by law. The information =
is solely intended for the named addressee (or a person responsible for del=
ivering it to the addressee). If you are not the intended recipient of this=
message, you are not authorized to read, print, retain, copy or disseminat=
e this message or any part of it. If you have received this e-mail in error=
, please notify the sender immediately by return e-mail and delete it from =
your computer.
Re: Help with my perl script
am 23.08.2006 22:26:33 von Stephen
joe bayer wrote:
> Group,
>
> I am trying to write a load testing script.
>
> The script goes like this: ++++++++++++++++++++++++++++++++++ my $j =
> 0; while ($j < 300) { $dbh[$j] = DBI->connect (
> "dbi:Oracle:$instance[$i]", "$username[$i]", "$passwd[$i]", {
> PrintError => 1, RaiseError => 1, AutoCommit => 1 } ) || die
> "Database Connection not made $DBI::errstr" ;# Create a Database #do
> some random, endless select statement here. $j++; }
> ++++++++++++++++++++++++++++++++++++++++++
>
> What I want is 300 session do the select statement simultaneously.
> But this script will do one session after another.
>
> Do I REALLY have to start 300 perl script in order to this testing,
> or there is some way in perl that one script can start up 300
> session and do their invidual select simultaneously?
Check out Parallel::ForkManager.
> Thanks for your help.
>
> Joe
>
> --------------------------------- All-new Yahoo! Mail - Fire up a
> more powerful email and get things done faster.
--
Stephen Carville
Unix and Network Admin
Nationwide Totalflood
6033 W. Century Blvd
Los Angeles, CA 90045
310-342-3602
Re: Help with my perl script
am 23.08.2006 22:47:42 von kevindotcar
------=_Part_36833_33158775.1156366062446
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On 8/23/06, Stephen Carville wrote:
>
> joe bayer wrote:
> > Group,
> >
> > I am trying to write a load testing script.
> >
> > The script goes like this: ++++++++++++++++++++++++++++++++++ my $j =
> > 0; while ($j < 300) { $dbh[$j] = DBI->connect (
> > "dbi:Oracle:$instance[$i]", "$username[$i]", "$passwd[$i]", {
> > PrintError => 1, RaiseError => 1, AutoCommit => 1 } ) || die
> > "Database Connection not made $DBI::errstr" ;# Create a Database #do
> > some random, endless select statement here. $j++; }
> > ++++++++++++++++++++++++++++++++++++++++++
> >
> > What I want is 300 session do the select statement simultaneously.
> > But this script will do one session after another.
> >
> > Do I REALLY have to start 300 perl script in order to this testing,
> > or there is some way in perl that one script can start up 300
> > session and do their invidual select simultaneously?
>
> Check out Parallel::ForkManager.
>
> > Thanks for your help.
> >
> > Joe
> >
> > --------------------------------- All-new Yahoo! Mail - Fire up a
> > more powerful email and get things done faster.
Hi Stephen,
Unless I'm missing something (I'm no expert in this arena)
It seems like a script will ecxecute one stmt at a time anyway-
so how about cranking up 300 separate Perl scripts that synchoronize (ie,
soak up all available system resources simultaneously) with a named
semaphore?
(Win)
$sem = Win32::Semaphore->new($initial,$maximum,$name);
(Unix)
$sem = new IPC::Semaphore(IPC_PRIVATE, 10, S_IRWXU | IPC_CREAT);
I would envision you building a 300-line script to start up each individual
DB connect, and a single Perl script to "lower the flag" - causing the 300
perl scripts to pounce.
It seems like this is a much better test anyway- because I very much doubt
as *single* perl script will have 300 separate DB connections... but then
again... I don't know what your environment needs.
HTH
KC
------=_Part_36833_33158775.1156366062446--
RE: Help with my perl script
am 23.08.2006 23:08:19 von Will.Rutherdale
I believe you *are* missing something. You're going to have to
understand how processes and forking work in Unix. The fork() call
invokes a new process. In effect it is a new script on its own.
Stephen's Parallel::ForkManager is just syntactic sugaring around the
same thing.
Semaphores have no meaning unless you have separate tasks running. A
process is a kind of task. You do not need the semaphore for your test
as I understand it. The operating system's scheduler is going to
allocate time slices to each process as it sees fit.
Each forked child process is a real process of its own, and each will
open a connection to the database, independent of the other child
processes. The time statements are actually executed relative to one
another is essentially random, which is I believe what you want.
I suggest you read the description of fork() in the perlfunc man page
*very* carefully, as it does a lot more than you may have realised the
first time through. Also you should try reading up on Unix process
semantics.
Again, I recommend simply using fork(), in a loop.
-Will
> -----Original Message-----
> From: Kevin Carothers [mailto:kevindotcar@gmail.com]=20
> Sent: Wednesday 23 August 2006 16:48
> To: Stephen Carville
> Cc: dbi-users@perl.org; joe bayer
> Subject: Re: Help with my perl script
>=20
>=20
> On 8/23/06, Stephen Carville wrote:
> >
> > joe bayer wrote:
> > > Group,
> > >
> > > I am trying to write a load testing script.
> > >
> > > The script goes like this:=20
> ++++++++++++++++++++++++++++++++++ my $j =3D
> > > 0; while ($j < 300) { $dbh[$j] =3D DBI->connect (
> > > "dbi:Oracle:$instance[$i]", "$username[$i]", "$passwd[$i]", {
> > > PrintError =3D> 1, RaiseError =3D> 1, AutoCommit =3D> 1 } ) || die
> > > "Database Connection not made $DBI::errstr" ;# Create a=20
> Database #do
> > > some random, endless select statement here. $j++; }
> > > ++++++++++++++++++++++++++++++++++++++++++
> > >
> > > What I want is 300 session do the select statement simultaneously.
> > > But this script will do one session after another.
> > >
> > > Do I REALLY have to start 300 perl script in order to=20
> this testing,
> > > or there is some way in perl that one script can start up 300
> > > session and do their invidual select simultaneously?
> >
> > Check out Parallel::ForkManager.
> >
> > > Thanks for your help.
> > >
> > > Joe
> > >
> > > --------------------------------- All-new Yahoo! Mail - Fire up a
> > > more powerful email and get things done faster.
>=20
>=20
>=20
> Hi Stephen,
>=20
> Unless I'm missing something (I'm no expert in this arena)
> It seems like a script will ecxecute one stmt at a time anyway-
> so how about cranking up 300 separate Perl scripts that=20
> synchoronize (ie,
> soak up all available system resources simultaneously) with a named
> semaphore?
>=20
> (Win)
> $sem =3D Win32::Semaphore->new($initial,$maximum,$name);
>=20
> (Unix)
> $sem =3D new IPC::Semaphore(IPC_PRIVATE, 10, S_IRWXU | IPC_CREAT);
>=20
> I would envision you building a 300-line script to start up=20
> each individual
> DB connect, and a single Perl script to "lower the flag" -=20
> causing the 300
> perl scripts to pounce.
>=20
> It seems like this is a much better test anyway- because I=20
> very much doubt
> as *single* perl script will have 300 separate DB=20
> connections... but then
> again... I don't know what your environment needs.
>=20
> HTH
>=20
> KC
>=20
- - - - - Appended by Scientific Atlanta, a Cisco company - - - - -=20
This e-mail and any attachments may contain information which is confidenti=
al, proprietary, privileged or otherwise protected by law. The information =
is solely intended for the named addressee (or a person responsible for del=
ivering it to the addressee). If you are not the intended recipient of this=
message, you are not authorized to read, print, retain, copy or disseminat=
e this message or any part of it. If you have received this e-mail in error=
, please notify the sender immediately by return e-mail and delete it from =
your computer.
Re: Help with my perl script
am 23.08.2006 23:28:14 von davidnicol
On 8/23/06, Rutherdale, Will wrote:
> Again, I recommend simply using fork(), in a loop.
a rabbit doesn't need a loop...
$start_time = time + 10;
... # one process
fork; # two here
fork; # four here
fork; # eight here
fork; # 16
fork; # 32
fork; # 64
fork; # 128 here
fork; # 256 here, load on something is high :)
# fork; # 512 , etc
# and whatever happens here will happen 256 times, in parallel,
# or at least as parallel as your OS can give you
select(undef,undef,undef,0.003) while(time < $start_time); #
wait for trigger
... # connect and crash server
--
David L Nicol
Dickenson on the flag
http://cronos.advenge.com/pc/EmilyDickenson/SecondBook/p39.h tml
RE: Help with my perl script
am 23.08.2006 23:59:46 von Will.Rutherdale
Cute, about the rabbits. :-)
-Will
> -----Original Message-----
> From: David Nicol [mailto:davidnicol@gmail.com]=20
> Sent: Wednesday 23 August 2006 17:28
> To: Rutherdale, Will
> Cc: dbi-users@perl.org
> Subject: Re: Help with my perl script
>=20
>=20
> On 8/23/06, Rutherdale, Will wrote:
>=20
> > Again, I recommend simply using fork(), in a loop.
>=20
> a rabbit doesn't need a loop...
>=20
> $start_time =3D time + 10;
> ... # one process
> fork; # two here
> fork; # four here
> fork; # eight here
> fork; # 16
> fork; # 32
> fork; # 64
> fork; # 128 here
> fork; # 256 here, load on something is high :)
> # fork; # 512 , etc
> # and whatever happens here will happen 256 times, in parallel,
> # or at least as parallel as your OS can give you
> select(undef,undef,undef,0.003) while(time < $start_time); #
> wait for trigger
> ... # connect and crash server
>=20
>=20
>=20
> --=20
> David L Nicol
> Dickenson on the flag
> http://cronos.advenge.com/pc/EmilyDickenson/SecondBook/p39.h tml
>=20
- - - - - Appended by Scientific Atlanta, a Cisco company - - - - - =
This e-mail and any attachments may contain information which is confident=
ial, proprietary, privileged or otherwise protected by law. The information=
is solely intended for the named addressee (or a person responsible for de=
livering it to the addressee). If you are not the intended recipient of thi=
s message, you are not authorized to read, print, retain, copy or dissemina=
te this message or any part of it. If you have received this e-mail in erro=
r, please notify the sender immediately by return e-mail and delete it from=
your computer.