Uptime

Reply

Join Date: May 2003
Posts: 107
Reputation: root is an unknown quantity at this point 
Solved Threads: 0
root root is offline Offline
Junior Poster

Uptime

 
0
  #1
Dec 10th, 2003
I created this into a cgi file

#!/usr/bin/perl
#
# sload - current server load
#

print "Content-type: text/html\n\n";

print <<EOM;
<META HTTP-EQUIV="Refresh" CONTENT=15>
<TITLE> $ENV{SERVER_NAME} HTTPD Load </TITLE>

<H2> Current load average of
<A HREF=/>$ENV{SERVER_NAME}</A><HR></H2>
EOM

print `uptime`;
print "<P>";
Now I want that on my website.. how do I create the html to show it on my index.htm instead of having another window poping up showing the uptime.cgi
Last edited by root; Dec 10th, 2003 at 4:10 am.
Open your mind, or shut your mouth.
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 360
Reputation: Gary King will become famous soon enough Gary King will become famous soon enough 
Solved Threads: 5
Team Colleague
Gary King's Avatar
Gary King Gary King is offline Offline
PHP/vBulletin Guru

Re: Uptime

 
0
  #2
Dec 23rd, 2003
I don't think you can have CGI in an HTML file?
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 95
Reputation: jayant will become famous soon enough jayant will become famous soon enough 
Solved Threads: 1
jayant's Avatar
jayant jayant is offline Offline
Junior Poster in Training

Re: Uptime

 
1
  #3
Dec 24th, 2003
you can use <iframe> tag provided by html

or use php
[php]<?php
$data = shell_exec(uptime);
echo $data;
?>[/php]
Jayant Kumar Gandhi

My exams are over!!! I am back :)
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 360
Reputation: Gary King will become famous soon enough Gary King will become famous soon enough 
Solved Threads: 5
Team Colleague
Gary King's Avatar
Gary King Gary King is offline Offline
PHP/vBulletin Guru

Re: Uptime

 
1
  #4
Dec 24th, 2003
Yep, but remember that it must be a PHP file then if you want to use PHP (unless you use frames again, which I highly dislike personally :p)
Reply With Quote Quick reply to this message  
Join Date: Jan 2004
Posts: 468
Reputation: TKS will become famous soon enough TKS will become famous soon enough 
Solved Threads: 18
TKS's Avatar
TKS TKS is offline Offline
Posting Pro in Training

Re: Uptime

 
0
  #5
Mar 25th, 2004
You should be able to cross over into a small flash button or half banner and embed that code...I think...not sure on that.
My Home Away from Home: Yet Another Linux Blog
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 209
Reputation: i686-linux is on a distinguished road 
Solved Threads: 12
i686-linux's Avatar
i686-linux i686-linux is offline Offline
Posting Whiz in Training

Re: Uptime

 
0
  #6
Mar 25th, 2004
What http server are you using? I would recommend a SSI (server-side include) if possible.
PARANOIA:
A healthy understanding of the way the universe works.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC