Any input would be welcome
Thanks,
John P

SN wrote:http://www.bryxx.com has now been up 10 days, 53 minutes (and in that time served about 3,500 page impressions to users in 33 different countries)
Wozarib_ wrote:SN wrote:http://www.bryxx.com has now been up 10 days, 53 minutes (and in that time served about 3,500 page impressions to users in 33 different countries)
Hey there,
How are you able to view the uptime in the fashion you're doing that? Would like to do the same thing
pwl wrote:Wozarib_ wrote:SN wrote:http://www.bryxx.com has now been up 10 days, 53 minutes (and in that time served about 3,500 page impressions to users in 33 different countries)
Hey there,
How are you able to view the uptime in the fashion you're doing that? Would like to do the same thing
Can you tell where did you found the anwsers? Beacuse I have a small problem how to 'extract this data and put it on website'
I mean the uptime
Holy One wrote:you mean like this: http://81.174.146.46/ ?
its just basic php, specifically the system function. e.g.
<?php system("df -h"); ?>
<?php system("top -b -n1");?>
etc
<?php
$data = shell_exec('uptime');
echo $data;
?><html>
<head>
<body bgcolor="#000000" text="808080">
</head>
<body>
<div align="left">
<pre>
<IMG SRC="rasp1.jpg" WIDTH=58 HEIGHT=69><IMG SRC="debian1.jpg" WIDTH=68 HEIGHT=68>
<IMG SRC="pi1.jpg" WIDTH=338 HEIGHT=260>
<h2>System Information:</h2>
<?php system("uname -a"); ?>
<h2>Uptime:</h2>
<?php system("uptime"); ?>
<h2>Memory Usage (MB):</h2>
<?php system("free -m"); ?>
<h2>Disk Usage:</h2>
<IMG SRC="sdcard1.jpg" WIDTH=57 HEIGHT=76>
<br>
<?php system("df -h"); ?>
<h2>CPU Information:</h2>
<?php system("cat /proc/cpuinfo | grep \"model name\\|processor\""); ?>
<?php system("cat /proc/cpuinfo | grep \"BogoMIPS\\|BogoMips\""); ?>
<h2>CPU usage:</h2>
<?php system("top -b -n1");?>
</align>
</pre>
</div>
</div>
# Uptime | System Boot up
----------------------------+---------------------------------------------------
-> 1 22 days, 23:04:15 | Linux 3.2.27+ Sat Nov 17 17:55:38 2012
2 18 days, 05:55:29 | Linux 3.1.9+ Fri Aug 10 11:23:26 2012
3 13 days, 20:10:25 | Linux 3.2.27+ Thu Sep 20 16:53:12 2012
4 11 days, 04:54:32 | Linux 3.2.27+ Fri Oct 19 08:39:20 2012
5 9 days, 21:11:51 | Linux 3.2.27+ Fri Aug 31 14:48:28 2012
6 8 days, 18:23:43 | Linux 3.2.27+ Tue Oct 9 15:12:04 2012
7 7 days, 00:06:10 | Linux 3.2.27+ Mon Nov 5 09:42:49 2012
8 6 days, 20:23:09 | Linux 3.1.9+ Fri Aug 3 14:59:08 2012
9 5 days, 20:54:57 | Linux 3.2.27+ Tue Oct 30 12:47:39 2012
10 4 days, 23:24:42 | Linux 3.1.9+ Wed Jul 18 09:02:20 2012
----------------------------+---------------------------------------------------
NewRec 4 days, 17:08:45 | since Wed Dec 5 23:51:06 2012
up 138 days, 04:04:53 | since Tue Jul 17 11:45:03 2012
down 8 days, 02:09:57 | since Tue Jul 17 11:45:03 2012
%up 94.469 | since Tue Jul 17 11:45:03 2012
uprecords
# Uptime | System Boot up
----------------------------+---------------------------------------------------
-> 1 22 days, 06:19:55 | Linux 3.2.27+ Sun Nov 18 10:41:10 2012
2 16 days, 18:41:02 | Linux 3.2.27+ Wed Oct 31 15:11:40 2012
3 5 days, 18:51:47 | Linux 3.2.27+ Tue Oct 23 17:16:47 2012
4 1 day , 02:58:01 | Linux 3.2.27+ Tue Oct 30 12:13:30 2012
5 0 days, 19:10:29 | Linux 3.2.27+ Mon Oct 29 16:58:02 2012
6 0 days, 16:44:47 | Linux 3.2.27+ Sat Nov 17 09:16:30 2012
7 0 days, 04:21:20 | Linux 3.2.27+ Mon Oct 29 11:16:47 2012
8 0 days, 00:00:33 | Linux 3.2.27+ Tue Oct 30 11:16:47 2012
----------------------------+---------------------------------------------------
NewRec 5 days, 11:38:52 | since Wed Dec 5 05:22:12 2012
up 47 days, 15:07:54 | since Tue Oct 23 17:16:47 2012
down 0 days, 09:36:24 | since Tue Oct 23 17:16:47 2012
%up 99.167 | since Tue Oct 23 17:16:47 2012
wozarib wrote:Currently sat at:
16:51:51 up 82 days, 21:47, 1 user, load average: 0.02, 0.02, 0.05
Is there perhaps a way of running an uptime server of sorts? similar to what eggdrop has at uptime.eggheads.org have?
would be nice to see a list of raspberrypi uptimes in the same fashion.
#!/bin/bash
echo "Content-type: text/html"
echo ""
echo "<HTML><HEAD>"
echo "<TITLE>Raspberry Pi `whichpi` hosting sn.ickl.in / bryxx.com</TITLE>"
echo "</HEAD>"
echo "<BODY>"
echo "Raspberry Pi `whichpi` hosting sn.ickl.in / bryxx.com"
echo "<p>"
uname -a
echo "<P>"
uptime
echo "</BODY></HTML>"
uprecords
# Uptime | System Boot up
----------------------------+---------------------------------------------------
1 30 days, 05:03:22 | Linux 3.2.27+ Wed Dec 12 12:26:21 2012
2 22 days, 23:26:51 | Linux 3.2.27+ Sat Nov 17 17:55:38 2012
3 18 days, 05:55:29 | Linux 3.1.9+ Fri Aug 10 11:23:26 2012
4 13 days, 20:10:25 | Linux 3.2.27+ Thu Sep 20 16:53:12 2012
5 11 days, 04:54:32 | Linux 3.2.27+ Fri Oct 19 08:39:20 2012
6 9 days, 21:11:51 | Linux 3.2.27+ Fri Aug 31 14:48:28 2012
7 8 days, 18:23:43 | Linux 3.2.27+ Tue Oct 9 15:12:04 2012
8 7 days, 00:06:10 | Linux 3.2.27+ Mon Nov 5 09:42:49 2012
9 6 days, 20:23:09 | Linux 3.1.9+ Fri Aug 3 14:59:08 2012
10 5 days, 20:54:57 | Linux 3.2.27+ Tue Oct 30 12:47:39 2012
----------------------------+---------------------------------------------------
-> 20 1 day , 05:48:59 | Linux 3.2.27+ Tue Jan 15 09:03:57 2013
----------------------------+---------------------------------------------------
1up in 0 days, 16:32:42 | at Thu Jan 17 07:25:36 2013
t10 in 4 days, 15:05:59 | at Mon Jan 21 05:58:53 2013
no1 in 28 days, 23:14:24 | at Thu Feb 14 14:07:18 2013
up 175 days, 01:40:26 | since Tue Jul 17 11:45:03 2012
down 8 days, 02:27:27 | since Tue Jul 17 11:45:03 2012
%up 95.577 | since Tue Jul 17 11:45:03 2012
uprecords
# Uptime | System Boot up
----------------------------+---------------------------------------------------
-> 1 59 days, 04:12:50 | Linux 3.2.27+ Sun Nov 18 10:41:10 2012
2 16 days, 18:41:02 | Linux 3.2.27+ Wed Oct 31 15:11:40 2012
3 5 days, 18:51:47 | Linux 3.2.27+ Tue Oct 23 17:16:47 2012
4 1 day , 02:58:01 | Linux 3.2.27+ Tue Oct 30 12:13:30 2012
5 0 days, 19:10:29 | Linux 3.2.27+ Mon Oct 29 16:58:02 2012
6 0 days, 16:44:47 | Linux 3.2.27+ Sat Nov 17 09:16:30 2012
7 0 days, 04:21:20 | Linux 3.2.27+ Mon Oct 29 11:16:47 2012
8 0 days, 00:00:33 | Linux 3.2.27+ Tue Oct 30 11:16:47 2012
----------------------------+---------------------------------------------------
NewRec 42 days, 09:31:47 | since Wed Dec 5 05:22:11 2012
up 84 days, 13:00:49 | since Tue Oct 23 17:16:47 2012
down 0 days, 09:36:24 | since Tue Oct 23 17:16:47 2012
%up 99.529 | since Tue Oct 23 17:16:47 2012
uprecords
# Uptime | System Boot up
----------------------------+---------------------------------------------------
1 30 days, 05:03:22 | Linux 3.2.27+ Wed Dec 12 12:26:21 2012
2 22 days, 23:26:51 | Linux 3.2.27+ Sat Nov 17 17:55:38 2012
3 18 days, 05:55:29 | Linux 3.1.9+ Fri Aug 10 11:23:26 2012
4 13 days, 20:10:25 | Linux 3.2.27+ Thu Sep 20 16:53:12 2012
5 11 days, 04:54:32 | Linux 3.2.27+ Fri Oct 19 08:39:20 2012
6 9 days, 21:11:51 | Linux 3.2.27+ Fri Aug 31 14:48:28 2012
7 8 days, 18:23:43 | Linux 3.2.27+ Tue Oct 9 15:12:04 2012
8 7 days, 00:06:10 | Linux 3.2.27+ Mon Nov 5 09:42:49 2012
9 6 days, 20:23:09 | Linux 3.1.9+ Fri Aug 3 14:59:08 2012
10 5 days, 20:54:57 | Linux 3.2.27+ Tue Oct 30 12:47:39 2012
----------------------------+---------------------------------------------------
-> 20 1 day , 05:51:01 | Linux 3.2.27+ Tue Jan 15 09:03:57 2013
----------------------------+---------------------------------------------------
1up in 0 days, 16:30:40 | at Thu Jan 17 07:25:37 2013
t10 in 4 days, 15:03:57 | at Mon Jan 21 05:58:54 2013
no1 in 28 days, 23:12:22 | at Thu Feb 14 14:07:19 2013
up 175 days, 01:42:28 | since Tue Jul 17 11:45:03 2012
down 8 days, 02:27:27 | since Tue Jul 17 11:45:03 2012
%up 95.577 | since Tue Jul 17 11:45:03 2012
sudo shutdown -h now