Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: Perl modules (was: Re: Begginer's question: ...)

by predrag (Scribe)
on Jan 23, 2017 at 16:26 UTC ( [id://1180164]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Perl modules (was: Re: Begginer's question: ...)
in thread Begginer's question: If loops one after the other. Is that code correct?

One way to do this would be with a cron job calling a Perl script that generates the charts twice a day and saves them as image files. Then, the web server would only have to serve up static files, without the need of calling a CGI script to get the images.

Hauke D, thank you for that new suggestion, I didn't think that way.

So, all these images with that chart should be saved under the same file name. And that image file will be inserted in html page. When data change, new image will be saved and automatically will become visible in html page after page refreshing or a new visiting? Did I understood well?

It is really extremely simple. The only con is that it can't show data in a table. But really excellent solution and I can use it for that project or something else.

Replies are listed 'Best First'.
Re^5: Perl modules (was: Re: Begginer's question: ...)
by haukex (Archbishop) on Jan 23, 2017 at 16:35 UTC

    Hi predrag,

    So, all these images with that chart should be saved under the same file name. And that image file will be inserted in html page. When data change, new image will be saved and automatically will become visible in html page after page refreshing or a new visiting? Did I understood well?

    Yes, exactly!

    The only con is that it can't show data in a table.

    The same principle can be applied to HTML pages as well: In the Perl script that generates the charts, you could also generate an HTML page that is saved to the web server directory that includes the data in a table as well. (This Perl script that is run at a fixed interval, in this case twice a day, can generate as many different files as it likes.)

    Regards,
    -- Hauke D

      Hauke D your help is really great.

      I've understood what you've wrote about HTML pages.

      Just to let you know I've just created a new node number #1180180 with a title Web monitoring with Perl, comments and suggestions on general approach please. Your suggestions are included too.

      I could never imagine I will receive such a big help here and will learn so much from just my first question. Thanks to all monks again

      Kind regards

      predrag

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1180164]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-03-28 17:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found