Hi,
I have a list of URLs in a csv file which I'm checking for page status. It just prints the URL and the status as output. This works perfectly fine.
I'm looking to run this in multiple threads to make this process faster.
I'm pretty new to Perl and I managed to complete this. It would be helpful if someone help me out with multiple threading.
Right now I use
Code:
perl checkURLs.pl check.csv > /tmp/results.txt
Code:
#!/usr/bin/perl
use strict;
while (my $line = <>){
my $url = $line;
$url =~ s/[ *\\]*\n//g;
my $page = `curl -s -D - $url`;
if ($page =~ /^HTTP\/\d.\d (\d+)/){
print "$url status: $1\n";
} else {
print "Could not get page status\n";
}
}
Hi,
I have a program that runs two threads in stead of two processes. I want to use pipe to redirect the output of the first thread to the input of the second thread.
One thread is continuously writing to a pipe, and the other thread will read from the pipe.
How do I do that?
Is there... (2 Replies)
Hi All,
Please explain me when i have to use multiple process and when I have to use Multiple threads? Please give me an example.It will be very helpful for me.
Thanks in advance. (0 Replies)
I am writing java application on windows.
There are more than 100 threads run within java.exe.
I want to know what threads run within process java.exe so that I can find out if there are abnormal java threads. (4 Replies)
Hello all,
I have a directory of files of varying sizes.
I want to copy all these files in n number of threads to another directory such that each
copy set is more or less the same size.
Example :
Say /mydirA
It has around say 23 files of various sizes.
Number of copy... (0 Replies)
Scenario:
I have two PCs (named as A & B) which would send some traps to my third PC (named as C).
In PC C, I have to write a shell script such that it should accept the datas from both the PC-A & B parallely.
So my question is, is it possible to have two different child threads/tasks... (2 Replies)
Hello,
Is there any method thorugh which script can take argument if pass otherwise if argument doesn't pass then it takes the argument from the configuration file
i.e I am workiing on a script which will run through crontab and the script will
chekout the code ,zip and copy to the... (3 Replies)
Hello,
In a unix Solaris environment, (for simulation) how to start multiple threads (as Light Weight Process, not background process)?
thanks,
J. (7 Replies)
Hi , i need to run multiple scripts parallely ,on my server....i have 8 cpus . planning to run minimum of 6 scripts paralley ....could you please suggest someone .
thanks in advance , (3 Replies)
hi guys. i have a question for you
i have a one file and inside this file there are 1000 lines and each line is a linux command
running this commands takes long time so i want to create one bash script and run this lines in a loop with max number of threads
for example i want to run... (2 Replies)
Discussion started by: avtaritet
2 Replies
LEARN ABOUT DEBIAN
dimbl
dimbl(1) General Commands Manual dimbl(1)NAME
dimbl - Distributed Timbl
SYNOPSYS
dimbl [timbl options] [-S <num of threads>]
DESCRIPTION
dimbl extends timbl with the possibility to run the classification task on multiple threads. This is done by splitting up the Instancebase
in parts that are handled in parallel. Every test instance is tested against each partial Instancebase. The results are merged and then
the k Nearest Neighbours are calculated.
NOTES
dimbl only works for the IB1 variants of timbl.
Not all timbl options are fully supported.
Documentation is lacking.
OPTIONS -S <threads>
run the server on 'threads' parallel threads.
all timbl options are documenented in timbl(1)
dimbl handles most of them in the same way as timbl except for
-i filename
and
-I filename
-I will create 'threads' Instancebase files and store their names in 'filename' together with the name of the weighting file.
-i will use such a file to read back in 'threads' Instancebases for a classifying task. The -S option is ignored in that case. dimbl will
use the number of files found in 'filename'.
BUGS
possibly
AUTHORS
Ko van der Sloot Timbl@uvt.nl
Antal van den Bosch Timbl@uvt.nl
SEE ALSO timbl(1)
2010 december 09 dimbl(1)