I have prepared a module that will show the CPU utilization, current processes, memory utilization and disk quota of a remote system when asked on a PHP page
Below is the syntax and code in PHP and HTML just copy and paste it on the desired directory.
<table width="900" border="0" cellpadding="3" cellspacing="3">
<tr bgcolor="#666666">
<td align="center"><font color="#FFFFFF"><b><h1><?php system("hostname"); ?></h1></b></font></td>
</tr>
<tr bgcolor="#000000">
<td><font color="#FFFFFF"><b>Uptime:</b></font></td>
</tr>
<tr bgcolor="#FFE4E1">
<td><?php system("uptime"); ?></td>
</tr>
<tr bgcolor="#000000">
<td><font color="#FFFFFF"><b>System Information:</b></font></td>
</tr>
<tr bgcolor="#FFDAB9">
<td><?php system("uname -a"); ?></td>
</tr>
<tr bgcolor="#000000">
<td><font color="#FFFFFF"><b>Memory Usage (MB):</b></font></td>
</tr>
<tr bgcolor="#FFF0F5">
<td><?php system("free -m"); ?></td>
</tr>
<tr bgcolor="#000000">
<td><font color="#FFFFFF"><b>Disk Usage:</b></font></td>
</tr>
<tr bgcolor="#E6E6FA">
<td><?php system("df -h"); ?></td>
</tr>
<tr bgcolor="#000000">
<td><font color="#FFFFFF"><b>CPU Information:</b></font></td>
</tr>
<tr bgcolor="#F0FFF0">
<td><?php system("cat /proc/cpuinfo | grep \"model name\\|processor\""); ?></td>
</tr>
</table>
0 comments:
Post a Comment