For those who are interested:
Download: http://derkev.in/rpisysinfoscript/
Demo: http://keschy.dlinkddns.com/sysinfo/ (might be a bit slow - 14kb/s upload)
Screenshot: http://imgur.com/YRUtS
It's pretty basic at the time but it's a good alternative (not competitor) to Raspcontrol because it doesn't need any root permissions.
My RPi php-Sysinfo-Script - no sudo access required
My Webpage: http://derkev.in
Re: My RPi php-Sysinfo-Script - no sudo access required
Hi Keschy,
This is good. I like the fact that it has near zero dependency (nothing apart from php and server), being just one single file and of course the no sudo is an extra bonus. If you don't mind, I will borrow some of your ideas (e.g bar charting) for my own similar tool written in perl. ( http://www.windon.themoon.co.uk/NVSM/WebControl ). If it is alright with you, I will also include a link to your site on my help pages for people who are looking for php alternatives (I have already included raspcontrol)
Saif
This is good. I like the fact that it has near zero dependency (nothing apart from php and server), being just one single file and of course the no sudo is an extra bonus. If you don't mind, I will borrow some of your ideas (e.g bar charting) for my own similar tool written in perl. ( http://www.windon.themoon.co.uk/NVSM/WebControl ). If it is alright with you, I will also include a link to your site on my help pages for people who are looking for php alternatives (I have already included raspcontrol)
Saif
Re: My RPi php-Sysinfo-Script - no sudo access required
Thanks for the prositive feedback.
Of course you can use the code. Glad to help you
Edit: I just added your site to my blogroll. I really like your project.
Of course you can use the code. Glad to help you

Edit: I just added your site to my blogroll. I really like your project.
My Webpage: http://derkev.in
Re: My RPi php-Sysinfo-Script - no sudo access required
my server status on my RPI
Click the server status menu at the top
probably too much info but i wanted to see how much and how quick..
it also displays cpu speed (variable!) ad cpu temperature
Click the server status menu at the top
probably too much info but i wanted to see how much and how quick..
it also displays cpu speed (variable!) ad cpu temperature
http://212.159.76.122:81/serendipity/
Re: My RPi php-Sysinfo-Script - no sudo access required
ooh thats prettyKeschy wrote:For those who are interested:
Download: http://derkev.in/rpisysinfoscript/
Demo: http://keschy.dlinkddns.com/sysinfo/ (might be a bit slow - 14kb/s upload)
Screenshot: http://imgur.com/YRUtS
It's pretty basic at the time but it's a good alternative (not competitor) to Raspcontrol because it doesn't need any root permissions.

http://212.159.76.122:81/serendipity/
Re: My RPi php-Sysinfo-Script - no sudo access required
Nice script.
My memory modification.
$active_mem = $total_mem - ($free_mem + $buffer_mem + $cache_mem);
Code
http://pastebin.com/4fsEXEGF
My memory modification.
$active_mem = $total_mem - ($free_mem + $buffer_mem + $cache_mem);
Code
http://pastebin.com/4fsEXEGF
- Attachments
-
- screenshot
- sysinfo.png (35.35 KiB) Viewed 6612 times
Re: My RPi php-Sysinfo-Script - no sudo access required
There is an error in version 2 of the Sysinfo script. In the "updateText" Javascript function, it uses the method "innerText", which is non-standard and does not work on Firefox. Changing the script to use the "textContent" method fixes the problem.
Re: My RPi php-Sysinfo-Script - no sudo access required
Thanks. It worked like a charm!andrum99 wrote:There is an error in version 2 of the Sysinfo script. In the "updateText" Javascript function, it uses the method "innerText", which is non-standard and does not work on Firefox. Changing the script to use the "textContent" method fixes the problem.
-
- Posts: 21
- Joined: Mon Dec 17, 2012 7:12 am
Re: My RPi php-Sysinfo-Script - no sudo access required
Nice script, but unfortunately it includes a lot of exec() calls. For every exec(), a shell process has to be spawned, which results in a significant system load and memory consumption. In fact, I was able to crash the RPi by repeatedly accessing the script from several computers concurrently. Also, sometimes the shell process wouldn't terminate and turn into zombies.
So, I rewrote it to use only php-internal calls to gather the same info. You can get my version here: http://pastebin.com/1MYJVw4W. The CPU load and memory consumption are now greatly reduced. I would also recommend using lighttpd with fastcgi, again resulting in lower CPU usage and memory consumption:
So, I rewrote it to use only php-internal calls to gather the same info. You can get my version here: http://pastebin.com/1MYJVw4W. The CPU load and memory consumption are now greatly reduced. I would also recommend using lighttpd with fastcgi, again resulting in lower CPU usage and memory consumption:
Code: Select all
sudo apt-get install lighttpd
sudo lighty-enable-mod fastcgi-php
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/lighttpd start
sudo update-rc.d apache2 disable
sudo update-rc.d lighttpd enable
arm_freq=1100 / core_freq=500 / sdram_freq=450 / over_voltage=6
Re: My RPi php-Sysinfo-Script - no sudo access required
Uptime 75 days 4 hours 11 minutesadream wrote:my server status on my RPI
Click the server status menu at the top
probably too much info but i wanted to see how much and how quick..
it also displays cpu speed (variable!) ad cpu temperature
nice

are you using the sdcard or have you linked it to a hdd/ssd?
Re: My RPi php-Sysinfo-Script - no sudo access required
Thanks for the re-write, it works fine on my piserver now
-heisenberg- wrote:Nice script, but unfortunately it includes a lot of exec() calls. For every exec(), a shell process has to be spawned, which results in a significant system load and memory consumption. In fact, I was able to crash the RPi by repeatedly accessing the script from several computers concurrently. Also, sometimes the shell process wouldn't terminate and turn into zombies.
So, I rewrote it to use only php-internal calls to gather the same info. You can get my version here: http://pastebin.com/1MYJVw4W. The CPU load and memory consumption are now greatly reduced. I would also recommend using lighttpd with fastcgi, again resulting in lower CPU usage and memory consumption:
Code: Select all
sudo apt-get install lighttpd sudo lighty-enable-mod fastcgi-php sudo /etc/init.d/apache2 stop sudo /etc/init.d/lighttpd start sudo update-rc.d apache2 disable sudo update-rc.d lighttpd enable
http://212.159.76.122:81/serendipity/
Re: My RPi php-Sysinfo-Script - no sudo access required
I'm using an SD card yes, it will be interesting to see how long it lasts, i suspect quite a long time
the server is pretty busy so a fair number of writes to card,mysql etc..
now i just need to find a way to keep it powered while i install a ups,
quite proud of 75 days
the server is pretty busy so a fair number of writes to card,mysql etc..
now i just need to find a way to keep it powered while i install a ups,
quite proud of 75 days

permaband wrote:Uptime 75 days 4 hours 11 minutesadream wrote:my server status on my RPI
Click the server status menu at the top
probably too much info but i wanted to see how much and how quick..
it also displays cpu speed (variable!) ad cpu temperature
nice
are you using the sdcard or have you linked it to a hdd/ssd?
http://212.159.76.122:81/serendipity/
Re: My RPi php-Sysinfo-Script - no sudo access required
indeed the above script is great EXCEPT
my pi has been taken down by a ddos aimed at the script page, 1500 requests for the script over 90 seconds and apache went into terminal meltdown, and the pi needs rebooting
just aim apachbench at the page and see the results, i was attacked from germany and portugal at the same time and it was terminal
i have since tested this vulnerability with lighttpd instead of apache and the pi crashed
heres a repeated message from lighttpd error log just before death
2013-02-12 23:45:08: (mod_fastcgi.c.2676) FastCGI-stderr: PHP Notice: Undefined variable: shared_mem in /var/www/sysinfo/index.php on line 106
my pi has been taken down by a ddos aimed at the script page, 1500 requests for the script over 90 seconds and apache went into terminal meltdown, and the pi needs rebooting
just aim apachbench at the page and see the results, i was attacked from germany and portugal at the same time and it was terminal
i have since tested this vulnerability with lighttpd instead of apache and the pi crashed
heres a repeated message from lighttpd error log just before death
2013-02-12 23:45:08: (mod_fastcgi.c.2676) FastCGI-stderr: PHP Notice: Undefined variable: shared_mem in /var/www/sysinfo/index.php on line 106
http://212.159.76.122:81/serendipity/