Esempio n. 1
0
	SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

	The views and conclusions contained in the software and documentation are those
	of the authors and should not be interpreted as representing official policies,
	either expressed or implied, of the NAS4Free Project.
*/
require "auth.inc";
require "guiconfig.inc";
$pgtitle = array(gettext("Status"), gettext("Processes"));
function get_process_info()
{
    exec("top -b", $result);
    return implode("\n", $result);
}
if (is_ajax()) {
    $procinfo = get_process_info();
    render_ajax($procinfo);
}
include "fbegin.inc";
?>
<script type="text/javascript">//<![CDATA[
$(document).ready(function(){
	var gui = new GUI;
	gui.recall(0, 5000, 'status_process.php', null, function(data) {
		$('#procinfo').val(data.data);
	});
});
//]]>
</script>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
sajax_handle_client_request();
include "fbegin.inc";
?>
<script type="text/javascript">//<![CDATA[
<?php 
sajax_show_javascript();
?>
//]]>
</script>
<script type="text/javascript" src="javascript/status_process.js"></script>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="tabcont">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<?php 
html_titleline(gettext("Processes information"));
?>
			  <tr>
			    <td class="listt">
			    	<pre><textarea id="procinfo" name="procinfo" class="listcontent" cols="95" rows="30" readonly="readonly"><?php 
echo htmlspecialchars(get_process_info());
?>
</textarea></pre>
			    </td>
			  </tr>
			</table>
		</td>
	</tr>
</table>
<?php 
include "fend.inc";