Monday, February 4, 2013

Apache cluster active server

So you have Apache running in a cluster and you want to know which server is active right now. PHP can help you there.

Put this line of code in whoami.php

<?php system('hostname', $retval); ?>

No comments:

Post a Comment