Real time monitoring

Discussion in 'Perl Misc' started by Karel, Jul 14, 2004.

  1. Karel

    Karel Guest

    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
     
    Karel, Jul 14, 2004
    #1
    1. Advertising

  2. Karel

    Tore Aursand Guest

    On Wed, 14 Jul 2004 07:31:16 -0700, Karel wrote:
    > 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.


    --
    Tore Aursand <>
    "Every man usually has something he can do better than anyone else.
    Usually it is reading his own handwriting." (Unknown)
     
    Tore Aursand, Jul 14, 2004
    #2
    1. Advertising

  3. Karel wrote:
    > 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/groups?selm=

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, Jul 14, 2004
    #3
  4. Karel

    Joe Smith Guest

    Karel wrote:

    > 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
     
    Joe Smith, Jul 16, 2004
    #4
  5. Karel

    Vetle Roeim Guest

    eOn Fri, 16 Jul 2004 04:44:46 GMT, Joe Smith <> wrote:

    [...]
    > 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. :)

    --
    It's not a bug, it's the future.
     
    Vetle Roeim, Jul 16, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGF2ZSBEZXNzZXg=?=

    What tool to use for Real Time Event Monitoring Apps?

    =?Utf-8?B?RGF2ZSBEZXNzZXg=?=, May 9, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    382
    Lucas Tam
    May 10, 2005
  2. Sosh123
    Replies:
    2
    Views:
    448
    Sosh123
    Jun 1, 2005
  3. msdngroup
    Replies:
    5
    Views:
    721
    msgroup
    Jan 30, 2008
  4. msdngroup
    Replies:
    0
    Views:
    592
    msdngroup
    Dec 15, 2007
  5. Mehdi

    Real-time monitoring

    Mehdi, May 18, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    112
    Mehdi
    May 18, 2006
Loading...

Share This Page