Real time monitoring

K

Karel

LS,

I hope this is the correct bb to ask this question.
For a while now I have been looking for a perl cgi script that does
some sort of realtime monitoring.
That is: my cgi-script loops over a certain number of files and does a
system call of several minutes. The result (succes or no success) is
captured and printed in a HTML table. After the script is finished the
HTML page with the table is printed.

What i like to achieve is that the HTML page is updated/refreshed
after every system call and a growing HTMl table is printed.

I already know about how to turn of the Perl buffering but that does
not help to make my browser immediately display the output.

Anybody know any pointers to this problem or any other tricks to fool
the browser.

Thanks in advance.

KArel
 
T

Tore Aursand

Anybody know any pointers to this problem or any other tricks to fool
the browser.

What is your Perl question? You're asking about something that has to do
with browser/HTML behaviour.
 
G

Gunnar Hjalmarsson

Karel said:
For a while now I have been looking for a perl cgi script that does
some sort of realtime monitoring.
That is: my cgi-script loops over a certain number of files and
does a system call of several minutes.

*One* system call of several minutes from a CGI script? In that case,
doesn't the CGI process time out?
The result (succes or no success) is captured and printed in a
HTML table. After the script is finished the HTML page with the
table is printed.

What i like to achieve is that the HTML page is updated/refreshed
after every system call and a growing HTMl table is printed.

I already know about how to turn of the Perl buffering but that
does not help to make my browser immediately display the output.

It should help, provided that you do it right. Maybe you could post a
short but complete script where you have turned off buffering, but
that still doesn't display any output in the browser until the process
has finished.

For some reason I also come to think of the thread with this message:
http://groups.google.com/[email protected]
 
J

Joe Smith

Karel said:
I hope this is the correct bb to ask this question.

Actually, comp.lang.perl.misc is a USENET newsgroup, not a bb.
What i like to achieve is that the HTML page is updated/refreshed
after every system call and a growing HTMl table is printed.

Some browsers (including older versions of Netscape) will not
display anything until </TABLE> is seen. What you're asking for
simply cannot be done in all browsers.
-Joe
 
V

Vetle Roeim

[...]
Some browsers (including older versions of Netscape) will not
display anything until </TABLE> is seen. What you're asking for
simply cannot be done in all browsers.

Well... He could write a complete table and then perhaps fill it
in by creating rows with Javascript.

Server-sent events would be a better choice, but there aren't
any browsers that support it... :(
<URL:
http://www.hixie.ch/specs/html/server-sent-events/server-sent-events >

I've heard of a technique for events that uses an iframe that continously
polls a URL, but I have no experience with this myself.

Theres also some Microsoft/IE-specific thingy called XMLHTTP that enables
a web page to request XML from a URL using Javascript (i.e. without
reloading), that would probably be excellent for his problem... I don'
know much about it though, except that Google uses it in GMail.

But this is waaaaaay off topic in this ng. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top