slitaz-forge diff chub/web/index.php @ rev 581
tank & co: may display smart self test result
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Oct 26 10:22:08 2014 +0100 (2014-10-26) |
parents | 83836dfbf1da |
children |
line diff
1.1 --- a/chub/web/index.php Mon Mar 19 13:46:33 2012 +0100 1.2 +++ b/chub/web/index.php Sun Oct 26 10:22:08 2014 +0100 1.3 @@ -65,6 +65,7 @@ 1.4 <h4>Disk usage</h4> 1.5 <pre> 1.6 <?php 1.7 +system("[ -d /sys/block ] && [ -x /usr/sbin/smartctl ] && { cd /sys/block ; for i in [hs]d? ; do echo -n \$i ; /usr/sbin/smartctl -a /dev/\$i 2> /dev/null | sed '/Power_On_Hours/{s/.*Pow/: Pow/;s/ours.*-/ours/;p};/offline/!d;q'; echo; done; }"); 1.8 system("df -h | sed '/^rootfs/d' | grep '\(^/dev\|Filesystem\)'"); 1.9 ?> 1.10 </pre>