Location: PHPKode > projects > DebWeb GUI > debwgui/sysinfo.php
<?php require_once("includes/acl.inc"); ?>
<p class="pgtitle">Status: System</p>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">

  <tr>
    <td colspan="2" class="listtopic">System information</td>
  </tr>
  <tr>
    <td width="25%" class="vncellt">Hostname</td>
    <td width="75%" class="listr"><?php print exec("$CMD_SYSCTL -n kernel.hostname"); ?></td>
  </tr>
  <tr>
    <td width="25%" valign="top" class="vncellt">Debian Version</td>
    <td width="75%" class="listr">
      <strong><?php print exec("$CMD_CAT /etc/debian_version"); ?></strong><br>
      <?php print exec("$CMD_SYSCTL -n kernel.version"); ?></td>
  </tr>
  <tr>

    <td width="25%" valign="top" class="vncellt">Kernel Version</td>
    <td width="75%" class="listr"><?php print exec("$CMD_SYSCTL -n kernel.ostype"); ?>&nbsp;<?php print exec("$CMD_SYSCTL -n kernel.osrelease"); ?></td>
  </tr>
  <tr>
    <td width="25%" class="vncellt">Platform</td>
    <td width="75%" class="listr">
<?php
$cpuinfo = exec("$CMD_CAT /proc/cpuinfo | $CMD_GREP \"model name\" ");
$cpuinfo = stristr($cpuinfo, ':');
$cpuinfo = substr($cpuinfo, 1);  
print "$cpuinfo";

?>
</td>
  </tr>
  <tr>
    <td width="25%" class="vncellt">Date</td>
    <td width="75%" class="listr"><?php print date("G:i @ j/m/Y"); ?></td>
  </tr>

  <tr>
    <td width="25%" class="vncellt">Uptime</td>
    <td width="75%" class="listr">
<?php 
include_once('functions/uptime.php');
print calcuptime();
?>
 </td>
  </tr>
    <tr>
    <td width="25%" class="vncellt">Memory usage</td>
    <td width="75%" class="listr"><?php include_once('functions/memory.php'); ?>
<img src="images/bar_left.gif" height="15" width="4" border="0" alt=" "><img src="images/bar_used.gif" height="15" width="<?php print $memUsage; ?>" border="0" alt=" "><img src="images/bar_gray.gif" height="15" width="<?php print (100-$memUsage); ?>" border="0" alt=" "><img src="images/bar_right.gif" height="15" width="5" border="0" alt=" ">&nbsp;<?php print $memUsage; ?>%</td>
  </tr>

    <tr>
    <td width="25%" class="vncellt">Swap usage</td>
    <td width="75%" class="listr">
<img src="images/bar_left.gif" height="15" width="4" border="0" alt=" "><img src="images/bar_used.gif" height="15" width="<?php print $swapUsage; ?>" border="0" alt=" "><img src="images/bar_gray.gif" height="15" width="<?php print (100-$swapUsage); ?>" border="0" alt=" "><img src="images/bar_right.gif" height="15" width="5" border="0" alt=" ">&nbsp;<?php print $swapUsage; ?>%</td>
  </tr>

<tr>
    <td width="25%" class="vncellt">free space thingy</td>
    <td width="75%" class="listr">php space code</td>
</tr>

  <tr>
    <td width="25%" class="vncellt">Load averages</td><td width="75%" class="listr">
<?php 
exec("$CMD_UPTIME", $result); 
echo substr(strrchr($result[0], "load averages:"),14);
?>&nbsp;<small>[<a href="index.php?p=status_process">show process information</a></small>]    </td>
  </tr>
Return current item: DebWeb GUI