  The thermodynamics of the diffuse, X-ray emitting gas in clusters of galaxies
is determined by gravitational processes associated with shock heating,
adiabatic compression, and non-gravitational processes such as heating by SNe,
stellar winds, activity in the central galactic nucleus, and radiative cooling.
The effect of gravitational processes on the thermodynamics of the Intra
Cluster Medium (ICM) can be expressed in terms of the ICM entropy S ~
ln(T/\rho^{2/3}). We use a generalized spherical model to compute the X-ray
properties of groups and clusters for a range of initial entropy levels in the
ICM and for a range of mass scales, cosmic epochs and background cosmologies.
We find that the statistical properties of the X-ray clusters strongly depend
on the value of the initial excess entropy. Assuming a constant, uniform value
for the excess entropy, the present-day X-ray data are well fitted for the
following range of values K_* = kT/\mu m_p \rho^{2/3} = (0.4\pm 0.1) \times
10^{34} erg cm^2 g^{-5/3} for clusters with average temperatures kT>2 keV; K_*
= (0.2\pm 0.1) \times 10^{34} erg cm^2 g^{-5/3} for groups and clusters with
average temperatures kT<2 keV. These values correspond to different excess
energy per particle of kT \geq 0.1 (K_*/0.4\times 10^{34}) keV. The dependence
of K_* on the mass scale can be well reproduced by an epoch dependent external
entropy: the relation K_* = 0.8(1+z)^{-1}\times 10^{34} erg cm^2 g^{-5/3} fits
the data over the whole temperature range. Observations of both local and
distant clusters can be used to trace the distribution and the evolution of the
entropy in the cosmic baryons, and ultimately to unveil the typical epoch and
the source of the heating processes.
