Abstract
Probing the structures of stellar winds is of prime importance for theunderstanding of massive stars. Based on their optical spectral morphology andvariability, the stars of the Oef class have been suggested to featurelarge-scale structures in their wind. High-resolution X-ray spectroscopy andtime-series of X-ray observations of presumably-single O-type stars can help usunderstand the physics of their stellar winds. We have collected XMM-Newtonobservations and coordinated optical spectroscopy of the O6Ief star lambda Cepto study its X-ray and optical variability and to analyse its high-resolutionX-ray spectrum. We investigate the line profile variability of the He II 4686and H-alpha emission lines in our time series of optical spectra, including asearch for periodicities. We further discuss the variability of the broadbandX-ray flux and analyse the high-resolution spectrum of lambda Cep usingline-by-line fits as well as a code designed to fit the full high-resolutionX-ray spectrum consistently. During our observing campaign, the He II 4686 linevaries on a timescale of ~18 hours. On the contrary, the H-alpha line profiledisplays a modulation on a timescale of 4.1 days which is likely the rotationperiod of the star. The X-ray flux varies on time-scales of days and could infact be modulated by the same 4.1 days period as H-alpha, although bothvariations are shifted in phase. The high-resolution X-ray spectrum revealsbroad and skewed emission lines as expected for the X-ray emission from adistribution of wind-embedded shocks. Most of the X-ray emission arises withinless than 2R* above the photosphere.