Hi,
ive got a basic lamp server with lighttpd. i would like a /admin page that shows the amount of free ram on the pi, etc. how would i do this? would i need to somehow run a python script on the site?
thanks
-
- Posts: 29
- Joined: Sun Dec 09, 2012 9:15 pm
Re: System stats on a website?
Get Raspcontrol or Webmin. http://www.randrade.tk/index.php/2013/0 ... from-home/
Re: System stats on a website?
you could try this:
http://derkev.in/rpisysinfoscript/
simply extract the zip file in your lighttpd-www-directory
http://derkev.in/rpisysinfoscript/
simply extract the zip file in your lighttpd-www-directory
My Webpage: http://derkev.in
Re: System stats on a website?
the one i'm using here http://93.97.163.97:81/livestatus/status.php is quite good although the temp reading isn't working at the moment
http://212.159.76.122:81/serendipity/
Re: System stats on a website?
adream: Care to share the source of your live stats?
- tonyhughes
- Posts: 951
- Joined: Wed Dec 26, 2012 3:46 am
Re: System stats on a website?
The Server Utils section of Baked Raspberry Pi Mod will install phpsysinfo for you, which is shows a heap of detail.
I just used it to install phpsysinfo as a demo for you here:
http://www.tall.co.nz/phpsysinfo/index.php?disp=dynamic
I did note that there is no option but to install to /var/www/ so if you need it in a different directory, you will need to move it, or install it manually (just drag and drop the whole phpsysinfo dir if needed).
This will be fixed in the next release.
I just used it to install phpsysinfo as a demo for you here:
http://www.tall.co.nz/phpsysinfo/index.php?disp=dynamic
I did note that there is no option but to install to /var/www/ so if you need it in a different directory, you will need to move it, or install it manually (just drag and drop the whole phpsysinfo dir if needed).
This will be fixed in the next release.
Last edited by tonyhughes on Wed Feb 20, 2013 3:55 am, edited 1 time in total.
- tonyhughes
- Posts: 951
- Joined: Wed Dec 26, 2012 3:46 am
Re: System stats on a website?
And the most simple way I can think of to display the free ram is this:
Create a script:then paste in:
and save it (CTRL+X)
then type:then run:
Then you can just browse to http://www.domain.com/freeram.txt to see it.
There are a million ways to improve on this, and get the output looking good, or piped into another page somewhere.
Create a script:
Code: Select all
nano ~/freeram.sh
Code: Select all
#! /bin/bash
RAM=$(free -m)
echo $RAM > /var/www/freeram.txt
then type:
Code: Select all
chmod +x ~/freeram.sh
Code: Select all
~/./freeram.sh
There are a million ways to improve on this, and get the output looking good, or piped into another page somewhere.
Re: System stats on a website?
Here is it http://raspisimon.no-ip.org/livestatushelp.php65coupei6 wrote:adream: Care to share the source of your live stats?
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)