refactor server_status.php : 1. move functions to libraries files 2. fix code style