View previous topic :: View next topic |
Author |
Message |
bikecruiser.co.uk -
Joined: 21 Jan 2005 Posts: 2 Location: Liverpool UK
|
Posted: Fri Jan 21, 2005 5:26 pm Post subject: Server Uptime |
|
|
Hi everyone.. is it possible to display the current server uptime on a webpage that everyone can see??? I only need to display the server uptime.
Thanks
dave _________________ http://www.bikecruiser.co.uk |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Fri Jan 21, 2005 6:31 pm Post subject: |
|
|
Download the newest Beta in the Beta 2.0 forum , you can use SSI or CGI to
display the statistics of your Abyss Web Server. I wonder if anyone else knew
about this new thing added to the beta of Abyss Web Server v2 lol. |
|
Back to top |
|
 |
admin Site Admin
Joined: 03 Mar 2002 Posts: 1332
|
|
Back to top |
|
 |
bikecruiser.co.uk -
Joined: 21 Jan 2005 Posts: 2 Location: Liverpool UK
|
Posted: Sat Jan 22, 2005 2:06 am Post subject: |
|
|
Hey.. i checked out the updated variables in beta 3..
Quote: | X_ABYSS_STATS_SERVER_UPTIME: The total time in seconds during which the server was up. |
i was wondering if its possible to format the uptime like shown on the stats page..
????
Thanks in advance..
dave _________________ http://www.bikecruiser.co.uk |
|
Back to top |
|
 |
k1ll3rdr4g0n -
Joined: 04 Jul 2004 Posts: 609
|
Posted: Sat Jan 22, 2005 4:57 am Post subject: |
|
|
What is stored in that variable? Seconds? Minutes? Hours? _________________
 |
|
Back to top |
|
 |
admin Site Admin
Joined: 03 Mar 2002 Posts: 1332
|
Posted: Sat Jan 22, 2005 11:27 pm Post subject: |
|
|
bikecruiser.co.uk wrote: |
Quote: | X_ABYSS_STATS_SERVER_UPTIME: The total time in seconds during which the server was up. |
i was wondering if its possible to format the uptime like shown on the stats page..
????
|
You can do so by writing a small script to convert these seconds to years/days/hours/minutes/seconds.
For example in PHP:
Code: |
<?php
$uptime = intval($_ENV['X_ABYSS_STATS_SERVER_UPTIME']);
echo "I've been running for ", floor($uptime/86400), " days, ", floor(($uptime%86400)/3600), " hours, ", floor(($uptime%3600)/60), " minutes, ", ($uptime % 60), " seconds.";
?>
|
|
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Mon Jan 24, 2005 12:28 pm Post subject: |
|
|
Here's the Total Uptime script that shows the stats in a table...
Code: |
<table border='1'>
<tr>
<th>Days</th>
<th>Hours</th>
<th>Minutes</th>
<th>Seconds</th>
</tr>
<?php
$uptime = intval($_SERVER['X_ABYSS_STATS_SERVER_UPTIME']);
$day = floor($uptime/86400);
$hour = floor(($uptime%86400)/3600);
$min = floor(($uptime%3600)/60);
$sec = ($uptime % 60);
echo "<tr>\n";
echo "<td>$day</td>\n";
echo "<td>$hour</td>\n";
echo "<td>$min</td>\n";
echo "<td>$sec</td>\n";
echo "</tr>";
?>
</table> |
|
|
Back to top |
|
 |
eyn -
Joined: 11 Sep 2004 Posts: 32 Location: Canada
|
Posted: Sun Jan 30, 2005 7:44 am Post subject: |
|
|
The server uptime is only updated each time console is initiated or server is restarted, am I right?
I displayed the server uptime on my page together with output, however, I notice that each time I refresh the page, the uptime stay the same while the output is updated at once. The uptime will not be updated no matter how long a time period has passed, unless console is triggered or server is restarted, for my case.
Is this how the server is configured? Or is it my problem? Thanks! |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sun Jan 30, 2005 5:36 pm Post subject: |
|
|
eyn wrote: | Is this how the server is configured? Or is it my problem? Thanks! |
Oops!!! That's our problem... The server uptime is not updated on a regular basis. This is a bug and we'll fix it. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
WolfRamiO -
Joined: 30 May 2004 Posts: 121 Location: Viña del Mar, Chile
|
Posted: Tue Feb 22, 2005 10:35 am Post subject: |
|
|
Try SigX (its the best and free!) |
|
Back to top |
|
 |
WolfRamiO -
Joined: 30 May 2004 Posts: 121 Location: Viña del Mar, Chile
|
Posted: Tue Mar 15, 2005 11:15 am Post subject: |
|
|
i mean this! (look at my sign) |
|
Back to top |
|
 |
|