We have a webpage for analysing WebLogic log files which writes the progress to the browser. This interactive processing can sometimes take several hours depending on the number and size of the log files and necessitates the PC remaining switched on.

I have now modified our webpages so now there is an option to process the log files as a background task.

Here is the code:

#!/usr/bin/perl -w use CGI qw/:standard/; my $q=new CGI; use strict; umask 000; # This will set the permission of new files to the default +for the user running this script. $|=1; # Autoflush after every print statement. print $q->header(); # i.e. this is the same as: print "Content-type: t +ext/html\n\n"; my $default_dir = "/www/develop/jms/bridge_errors"; my $default_files_dir = "/www/develop/jms/bridge_errors/files"; my $identifier = $q->param("identifier"); #print "\$identifier = $identifier\n"; #exit; print <<HTMLcode; <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:/ +/www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Background Processing</title> <link rel="stylesheet" href="/jms/css/jumble.css"> </head> <body> <h1>JMS Bridge Error Summariser Background Task</h1> <div class=panel> <p>Background processing of the '$identifier' log files has started .. +.</p> </div> <br> <hr> <br> <address> <a href="mailto:aaa.bbb\@xxx.yyy">Contact</a> </address> </body> </html> HTMLcode # Launch the WLS Log Analyser script as a background task. exec "nohup ./error_summariser.cgi $identifier > $default_files_dir/$i +dentifier/processing-log.txt &" or die "Can't exec: $!\n";

My question is how to stop this webpage taking ages in Firefox showing the message "Transferring data from <server name>" at the bottom left corner of the browser and progress being shown in the bottom right. The webpage can take up to 5 minutes to display 'Done'!

BTW, we are running Apache 2.2.16 on OEL5.3.


Is there any way I can get this webpage to complete more quickly?


Thanks


Paul McIlfatrick


In reply to exec command taking ages by pmcilfatrick

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.