refactor server_status_queries.php