[ 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_memory.php 17475 2004-11-28 19:01:45Z $ 21 22 $scale_factor = 2; 23 $mem = sys_meminfo(); 24 25 $ram .= create_bargraph($mem['ram']['percent'], $mem['ram']['percent'], $scale_factor); 26 $ram .= ' ' . $mem['ram']['percent'] . '% '; 27 28 $swap .= create_bargraph($mem['swap']['percent'], $mem['swap']['percent'], $scale_factor); 29 30 $swap .= ' ' . $mem['swap']['percent'] . '% '; 31 32 33 $_text = '<table width="100%" align="center">' 34 . '<tr><td align="left"><b><font size="-1">' . $text['type'] . '</font></b></td>' 35 . '<td align="left"><b><font size="-1">' . $text['percent'] . '</font></b></td>' 36 . '<td align="right"><b><font size="-1">' . $text['free'] . '</font></b></td>' 37 . '<td align="right"><b><font size="-1">' . $text['used'] . '</font></b></td>' 38 . '<td align="right"><b><font size="-1">' . $text['size'] . '</font></b></td></tr>' 39 40 . '<tr><td align="left"><font size="-1">' . $text['phymem'] . '</font></td>' 41 . '<td align="left"><font size="-1">' . $ram . '</font></td>' 42 . '<td align="right"><font size="-1">' . format_bytesize($mem['ram']['t_free']) . '</font></td>' 43 . '<td align="right"><font size="-1">' . format_bytesize($mem['ram']['t_used']) . '</font></td>' 44 . '<td align="right"><font size="-1">' . format_bytesize($mem['ram']['total']) . '</font></td>' 45 46 . '<tr><td align="left"><font size="-1">' . $text['swap'] . '</font></td>' 47 . '<td align="left"><font size="-1">' . $swap . '</font></td>' 48 . '<td align="right"><font size="-1">' . format_bytesize($mem['swap']['free']) . '</font></td>' 49 . '<td align="right"><font size="-1">' . format_bytesize($mem['swap']['used']) . '</font></td>' 50 . '<td align="right"><font size="-1">' . format_bytesize($mem['swap']['total']) . '</font></td>' 51 52 . '</table>'; 53 54 $tpl->set_var('memory', makebox($text['memusage'], $_text, '100%')); 55 56 ?>
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 |