PhpSysInfo

From Amahi Wiki
Revision as of 22:12, 25 September 2009 by Cpg (talk | contribs)
Jump to: navigation, search


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

After the one click install of phpsysinfo 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 sensors-detect keep pressing enter for default answers.

cd /var/hda/web-apps/phpsysinfo/html cp config.php config.php_bak 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', 'suid');

I also tried to set "define('loadBar', true);" but this did not work on my sytem.

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