  We systematically study the X-ray and ultraviolet emission of a subsample of
M dwarfs from a recent proper-motion survey, selecting all M dwarfs within 10pc
to obtain a nearly volume-limited sample (~90% completeness). Archival ROSAT,
XMM-Newton and GALEX data are combined with published spectroscopic studies of
Halpha emission and rotation to obtain a broad picture of stellar activity on M
dwarfs. We make use of synthetic model spectra to determine the relative
contributions of photospheric and chromospheric emission to the ultraviolet
flux. We also analyse the same diagnostics for a comparison sample of young M
dwarfs in the TWHya association (~10Myrs). We find that generally the emission
in the GALEX bands is dominated by the chromosphere but the photospheric
component is not negligible in early-M field dwarfs. The surface fluxes for the
Halpha, near-ultraviolet, far-ultraviolet and X-ray emission are connected via
a power law dependence. We present here for the first time such flux-flux
relations involving broad-band ultraviolet emission for M dwarfs. For given
spectral type the activity indices, defined as flux ratio between the activity
diagnostic and the bolometric flux of the star, display a spread of 2-3 dex
which is largest for M4 stars. The mean activity index for fast rotators,
likely representing the saturation level, decreases from X-rays over the FUV to
the NUV band and Halpha, i.e. the fractional radiation output increases with
atmospheric height. The comparison to the ultraviolet and X-ray properties of
TWHya members shows a drop of nearly three orders of magnitude for the
luminosity in these bands between ~10Myr and few Gyrs age. A few young field
dwarfs (< 1Gyr) in the 10pc sample bridge the gap indicating that the drop in
magnetic activity with age is a continuous process. The slope of the age decay
is steeper for the X-ray than for the UV luminosity.
