[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 // 3 // phpSysInfo - A PHP System Information Script 4 // http://phpsysinfo.sourceforge.net/ 5 // 6 // This program is free software; you can redistribute it and/or 7 // modify it under the terms of the GNU General Public License 8 // as published by the Free Software Foundation; either version 2 9 // of the License, or (at your option) any later version. 10 // 11 // This program is distributed in the hope that it will be useful, 12 // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 // GNU General Public License for more details. 15 // 16 // You should have received a copy of the GNU General Public License 17 // along with this program; if not, write to the Free Software 18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 // 20 // $Id: table_vitals.php 17475 2004-11-28 19:01:45Z $ 21 22 $ar_buf = sys_loadavg(); 23 24 for ($i=0;$i<3;$i++) { 25 if ($ar_buf[$i] > 2) { 26 $load_avg .= '<font color="#ff0000">' . $ar_buf[$i] . '</font>'; 27 } else { 28 $load_avg .= $ar_buf[$i]; 29 } 30 $load_avg .= ' '; 31 } 32 33 $_text = '<table border="0" width="90%" align="center">' 34 . '<tr><td><font size="-1">'. $text['hostname'] .'</font></td><td><font size="-1">' . sys_chostname() . '</font></td></tr>' 35 . '<tr><td><font size="-1">'. $text['ip'] .'</font></td><td><font size="-1">' . sys_ip_addr() . '</font></td></tr>' 36 37 . '<tr><td><font size="-1">'. $text['kversion'] .'</font></td><td><font size="-1">' . sys_kernel() . '</font></td></tr>' 38 . '<tr><td><font size="-1">'. $text['uptime'] .'</font></td><td><font size="-1">' . sys_uptime() . '</font></td></tr>' 39 . '<tr><td><font size="-1">'. $text['users'] .'</font></td><td><font size="-1">' . sys_users() . '</font></td></tr>' 40 . '<tr><td><font size="-1">'. $text['loadavg'] .'</font></td><td><font size="-1">' . $load_avg . '</font></td></tr>' 41 . '</table>'; 42 43 $tpl->set_var('vitals', makebox($text['vitals'], $_text, '100%')); 44 45 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |