Skip to content

Instantly share code, notes, and snippets.

@OjosAlertaAC
Created January 4, 2015 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OjosAlertaAC/fa93790acecc145c47ba to your computer and use it in GitHub Desktop.
Save OjosAlertaAC/fa93790acecc145c47ba to your computer and use it in GitHub Desktop.
<?php
/* Alfonso Orozco Aguilar for Ojos Alerta AC - ojosalerta.org
Using LGPL 2.0 Exclusively
https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html
Original version: 03/jan/2011
Comments to : github(nospam)@alfonsoorozco.com
The purpose of this file is give me some important info about linux servers
and the status they have. Normally i save with a diff name in each server.
The info is not critical but is better use a rare filename for that
*/
echo "<h1>".$_SERVER['SERVER_NAME'];
$ipAddress = gethostbyname($_SERVER['SERVER_NAME']);
echo " in $ipAddress</h1>";
echo $_SERVER['DOCUMENT_ROOT']."<br>";
echo "<pre>";
system ("uptime");
echo "<hr>";
system ("free -m");
echo "<hr>";
system ("ps aux");
echo "</pre><hr><pre>";
system ("vmstat -s");
echo "</pre>";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment