Changes

From Amahi Wiki
Jump to: navigation, search
1,405 bytes added ,  11:20, 7 December 2014
after saving phpsysinfo.ini phpsysinfo will provide voltage, fan, temperature data and more
It should also be possible to display === Configure SMART information from your disks, but I did not manage to get it working yet. Please update this page if you succeed===
I started with
yum install smartmontools
PLUGINS="SMART"
DEVICES="/dev/sda, /dev/sdb" You also need to give apache permission to use smartctl with the sudo command: (source http://mewbies.com/how_to_install_phpsysinfo_nix_tutorial.html) Because the cmd 'smartctl' is only available to root; it will not work for your web server, we need to set some permissions on it and change the command it uses: nano /var/hda/web-apps/phpsysinfo/html/plugins/SMART/class.SMART.inc.phpSearch for (Ctrl+w) (line 60): --allIt has this:if (CommonFunctions::executeProgram('smartctl', '--all'.((PSI_PLUGIN_SMART_DEVICE) ? ' --device '.PSI_PLUGIN_SMART_DEVICE : '').' '.$disk, $buffer, PSI_DEBUG)) {Change it to:if (CommonFunctions::executeProgram('sudo', '/usr/sbin/smartctl --all '.((PSI_PLUGIN_SMART_DEVICE) ? ' --device '.PSI_PLUGIN_SMART_DEVICE : '').' '.$disk, $buffer, PSI_DEBUG)) { Just a note that all we changed was: 'smartctl', '--all'To: 'sudo', '/usr/sbin/smartctl --all 'Change yours to be the same, including the space: all 'Be sure that line isn't broken into multiple lines. If it is you'll see on your xml.php?plugin=SMART page errors containing: \nAnd be sure that /usr/sbin/smartctl is the correct path for your installation of smartctl. Next we need to add your web server group to sudo to be able to run smartctl cmds: sudo visudoPaste in this line under '# User privilege specification', changing yourweb server group (apache) to your own. For example I have pasted in: apache ALL=NOPASSWD: /usr/sbin/smartctl '''(WARNING you are using the vi-editor, first google "vi commands" for some guidance!)'''
20

edits