A cardiac rhythm management device for obtaining transthoracic impedance. The device comprises a sensor for obtaining a signal indicative of an action of a heart, an impedance measurement circuit adapted to measure transthoracic impedance and a processor for utilizing the signal indicative of the action of the heart to sample the transthoracic impedance at sampling intervals commenced by fiducial markers in the signal indicative of the action of the heart, where the sampling of the impedance signal removes the component of a stroke volume of the heart from the signal and thereby provides lung ventilation information.