abstract: We consider a one-dimensionnal chain of harmonic oscillators perturbed by a conservative noise. This chain is in contact with two heat reservoirs at different temperature. This model satisfies Fourier's law and a linear profile of temperature is observed in the nonequilibrium stationary state. We derive the large deviation function for the probability of finding, in the stationary state, a profile different from the linear profile.