You can try running "/usr/bin/time -v perl checkwiki.pl". This command  
will show you how much CPU time you are spending in system calls. It  
looks like your scriptie is using a simple http fetch to grab the  
article text. Your process should block and not use any CPU while it's  
waiting for the article:

sub raw_text ...
        my $ua2 = LWP::UserAgent->new;
        $response2 = $ua2->get( $url2 );

-Darren

On 11 Jun 2009, at 1:56 PM, Stefan Kühn wrote:

> Maybe a guru for perl can make a look at the script. I hope anyone  
> have
> a idea.
>
> Stefan
>
>
>
> River Tarnell schrieb:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Stefan Kühn:
>>> The most time my script is waiting. This is a problem because  
>>> there is a high
>>> CPU usage.
>>
>> that doesn't make sense.  if it was waiting, it wouldn't be using  
>> any CPU.  if
>> it's using CPU, it's not waiting, it's doing something.
>>
>>      - river.
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.9 (HP-UX)
>>
>> iEYEARECAAYFAkoxbiIACgkQIXd7fCuc5vL1bQCgihqAbqvlw+IJ+/HtAAyVR4fK
>> n7kAoJA4ZyBi3dr6Qy1Y4yw1JIQF1vFo
>> =TPyX
>> -----END PGP SIGNATURE-----
>>
>> _______________________________________________
>> Toolserver-l mailing list
>> [email protected]
>> https://lists.wikimedia.org/mailman/listinfo/toolserver-l
>
>
> -- 
> Stefan Kühn
> Kuntschberg 6 / 01169 Dresden
> Privat: 0351-4107780 / Handy:  0163-2763261
> Email: [email protected] / Web: http://www.webkuehn.de
>
> _______________________________________________
> Toolserver-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/toolserver-l
>

--
Darren Hardy
Ph.D. Candidate
Bren School of Environmental Science & Management
University of California, Santa Barbara
http://www.bren.ucsb.edu/~dhardy
[email protected]


_______________________________________________
Toolserver-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/toolserver-l

Reply via email to