Dear Monks,
I wrote a CGI code to get the load averga of my CentOS server. It gives 1 minute , 5 minutes and 15 minutes Load averages.
I can see it via URL http://ipaddress/cgi-bin/Sys_Load.cgi
Now, What I need is to INSERT this Sys_Load.cgi url to my home.cgi code. My ulitimate goal is to access URL http://ipaddress/cgi-bin/home.cgi.
Then, Everything in home.cgi should be displayed.
I have already dispalyed other codes with "<img src = >"
I can dispaly them since it PRINTS a png image to the browser.
here's my home.cgi
#!/usr/bin/perl use strict; use warnings; use CGI ':standard'; my $date = localtime(); print "Content-type: text/html\n\n"; print "<body bgcolor=\"#c0e0f9\">"; print qq!<br/><center> <h1>Home</h1> <h3>$date</h3> <img src = "root_partition.cgi"><br/><br/><br/> <img src = "var_partition.cgi"><br/><br/><br/> <img src = "stacked_Bar_graph.cgi"><br/><br/><br/> <img src = "topsenders_hbar.cgi"><br/><br/><br/> <img src = "toprecipients_hbar.cgi"><br/><br/><br/></center>!; print "</body>";
Here's my Sys_Load.cgi code. I think If can PRINT CGI html table to a PNG file, It will be OK. I am right aint't I? How can I do it? seeking help...
#!/usr/bin/perl use strict; use warnings; use CGI ':standard'; use Sys::Load qw/getload uptime/; print "Content-type: text/html\n\n"; print "<body bgcolor=\"#c0e0f9\">"; my ($one_m, $five_m, $fifteen_m) = (getload())[0,1,2]; print "<br/>"; print "Load Average \n"; print '<table style=width:20%><tr><th bgcolor=#FFDD00 height=25>1 Minu +te</th><th bgcolor=#FFDD00 height=25>5 Minutes</th><th bgcolor=#FFDD0 +0 height=25>15 Minutes</th></tr>'; print "\n <tr style=\"font-family:verdana\" bgcolor=\"#FFFFFF\"><t +d>$one_m</td><td>$five_m</td><td>$fifteen_m</td></tr>"; print '</table>'; print "</body>";
In reply to How to PRINT CGI html table to a PNG file by theravadamonk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |