Created
January 4, 2015 13:11
-
-
Save OjosAlertaAC/fa93790acecc145c47ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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