get hostname and ip