  We address the problem of continuous-variable quantum phase estimation in the
presence of linear disturbance at the Hamiltonian level, by means of Gaussian
probe states. In particular we discuss both unitary and random disturbance, by
considering the parameter which characterizes the unwanted linear term present
in the Hamiltonian as fixed (unitary disturbance) or random with a given
probability distribution (random disturbance). We derive the optimal input
Gaussian states at fixed energy, maximizing the quantum Fisher information over
the squeezing angle and the squeezing energy fraction, and we discuss the
scaling of the quantum Fisher information in terms of the output number of
photons $n_{out}$. We observe that in the case of unitary disturbance the
optimal state is a squeezed vacuum state and the quadratic scaling is
conserved. As regards the random disturbance, we observe that the optimal
squeezing fraction may not be equal to one, and, for any non-zero value of the
noise parameter, the quantum Fisher information scales linearly with the
average number of photons. We finally discuss the performance of homodyne
measurement, comparing the achievable precision with the ultimate limit posed
by the quantum Cram\'er-Rao bound.
