Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 08-14-2005, 02:12 PM Server Uptime
Junior Talker

Posts: 2
Trades: 0
Ive developed an extremely simple PHP code that echo's the uptime of the server, which im sure is in seconds.

Here's the code:

PHP Code:
<?php
$uptime 
exec("cat /proc/uptime");
$uptime split(" ",$uptime);
$uptime $uptime[0];
?>
<html>
<body>
<font face="verdana" size="1pt">
Uptime For This Month = <b><?php echo $uptime?></b>
</font>
</html>
However, i need to further develop this code to make it complete, and im a novice at PHP.

Could anyone help me? I need it to echo the uptime for that monthly ONLY and in a percentage. Could anyone help me?

thanks in advance!
Prevost is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-14-2005, 06:32 PM
asm
Extreme Talker

Posts: 217
Location: UK.Lancashire(true)
Trades: 0
how would the script know that the server has been rebooted/shutdown?
a page would have to open as the server boots so that a time entery can be made in the database (or file). then you would get the down time and subtract from total possible up time and this will give you the actual up time. to get a percent from this just devide one by the other
asm is offline
Reply With Quote
View Public Profile Visit asm's homepage!
 
Old 08-15-2005, 07:23 AM
Junior Talker

Posts: 2
Trades: 0
Ok, but how would this be done, like i said im a novice.

Could anyone give me a quote on how much you would want to develop this script?
Prevost is offline
Reply With Quote
View Public Profile
 
Old 08-15-2005, 08:39 AM
asm
Extreme Talker

Posts: 217
Location: UK.Lancashire(true)
Trades: 0
i use the IPCOP system
http://www.ipcop.org/

it is easy to install on any old PC. It is a router firewall system. do you think you could do this?
asm is offline
Reply With Quote
View Public Profile Visit asm's homepage!
 
Reply     « Reply to Server Uptime
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13626 seconds with 12 queries