Difference between revisions of "PhpSysInfo"

From Amahi Wiki
Jump to: navigation, search
m (update of editing config.php so it works under amahi 5.1)
Line 1: Line 1:
 
[[Category:Apps]]
 
[[Category:Apps]]
 
==PHP SysInfo==
 
 
PHP SysInfo is a php script that displays information about the host being accessed. Things like uptime and CPU memory are displayed using phpsysinfo. To run it from your hda:
 
 
1. Navigate to the /var/hda/web-apps directory on your hda.
 
 
2. Search for a phpsysinfo tarball through a web browser. You can find one at
 
http://phpsysinfo.sourceforge.net/
 
 
3. Download the tarball into the web-apps directory using wget or another method. For example:
 
 
'''wget http://downloads.sourceforge.net/phpsysinfo/phpSysInfo-3.0-RC6.tar.gz'''
 
 
 
4. Unpack the phpsysinfo tarball with the tar command:
 
 
'''tar -zxvf phpSysInfo-3.0-RC6.tar.gz''' 
 
 
This will create a phpsysinfo directory and unpack all the files.
 
 
 
5. Remove the tarball since it will no longer be needed
 
 
'''rm -rf phpSysInfo-3.0-RC6.tar.gz'''
 
 
 
6. Enter the new phpsysinfo directory: '''cd phpsysinfo'''
 
 
7. Next, copy the php new configuration file to config.php using the cp command:
 
 
'''cp config.php.new config.php'''
 
 
 
8. Use nano or another editor to modify config.php as desired. 
 
 
'''nano config.php'''
 
 
 
9. Save and close the config.php file. Go to your hda Web Apps tab in a browser (http://setup then select Web Apps). Click on New Web App.
 
 
10. Enter "phpsysinfo" in the Name field. The Root Path field will automatically append the directory name onto the /var/hda/web-apps directory.
 
 
11. Click Create. A URL will be created and displayed.
 
 
12. PHPSysInfo should now be succesfully installed and running. To verify, click on the URL. If you are presented with your system information, phpsysinfo has been successfully installed.
 
  
 
== Getting More Info ==
 
== Getting More Info ==

Revision as of 18:12, 9 April 2010


Getting More Info

After the one click install of phpsysinfo in Amahi 5.1 I needed to do some modifications to get all system information displayed. For other users, this is what I did.

first open a terminal session and login as root from another computer in windows with putty or in linux: ssh root@hda

type

yum install lm_sensors

sensors-detect

keep pressing enter for default answers.

cd /var/hda/web-apps/phpsysinfo/html

cp config.php config.php_bak

to make a backup of your original config file

nano config.php

I changed the following lines, but of course this is optional. define('sensorProgram', 'LMSensors'); define('hideMounts', '/boot'); define('hideFstypes', 'tmpfs'); define('hddTemp', 'tcp'); define('loadBar', true);

after saving the config.php phpsysinfo also provides voltage, fan and temperature data.