def check_system_query_status(data):
    """Check if any server crashed.

    Args:
        data (dict): dictionary of system query data obtained from
            DmgCommand.system_query()

    Returns:
        bool: True if no server crashed, False otherwise.

    """
    failed_states = ("Unknown", "Evicted", "Errored", "Unresponsive")
    failed_rank_list = []

    # Check the state of each rank.
    for rank in data:
        rank_info = [
            "{}: {}".format(key, data[rank][key])
            for key in sorted(data[rank].keys())
        ]
        print("Rank {} info:\n  {}".format(rank, "\n  ".join(rank_info)))
        if "state" in data[rank] and data[rank]["state"] in failed_states:
            failed_rank_list.append(rank)

    # Display the details of any failed ranks
    if failed_rank_list:
        for rank in failed_rank_list:
            print(
                "Rank {} failed with state '{}'".format(
                    rank, data[rank]["state"]))

    # Return True if no ranks failed
    return not bool(failed_rank_list)