To predict the X-ray observables associated with the diffuse baryons in clusters of galaxies , we develop a new physical model for such a hot intra-cluster plasma . Our framework is provided by the hierarchical clustering cosmogony for the dark matter , and by the standard FRW or Lemaître cosmologies constrained by cosmic ages . As to the plasma dynamics and thermodynamics we propose a semi-analytical approach based on punctuated equilibria . This comprises the following blocks that we compute in detail : Monte Carlo “ merging histories ” to describe the dynamics of dark matter condensations on scales of order 1 - 10 Mpc , and the associated evolution of the gravitational potential wells ; the central hydrostatic disposition for the ICP , reset to a new equilibrium after each merging episode ; conditions of shock , or of closely adiabatic compression at the boundary with the external gas , preheated by stellar energy feedbacks . Shocks of substantial strength are shown to prevail at the outskirts of rich clusters in a universe with decelerated expansion . From our model we predict the L - T relation , consistent with the data as for shape and scatter . This we combine with the mass distribution provided by the canonical hierarchical clustering ; the initial perturbation spectra are dominated by Cold Dark Matter but include enough baryons to account for the high abundance sampled by the X–ray clusters , and are COBE–normalized . Thus we predict the z -resolved luminosity functions , with the associated source counts and redshift distributions . We predict also the complementary contribution by the unresolved groups and clusters to the soft X-ray background . These results are compared with two recent surveys from ROSAT ; one defines the local luminosity function over nearly three decades of L , and the other shows little or no evolution out to z \sim 0.8 . Our results confirm that the critical cosmology coupled with Standard CDM is ruled out by its overproduction of local clusters . On account of underproduction , instead , we rule out open cosmologies ( the cheapest way to solve the baryonic crisis and to freeze evolution ) , except for a narrow range around \Omega _ { o } = 0.5 ; even there , we find the consistency with the full data base to be hardly marginal . For the CDM cosmogony with \Omega _ { o } = 0.3 but in flat geometry , we obtain acceptable fits . For the tilted CDM perturbation spectrum with high baryonic content in the critical universe , we obtain marginal consistency . The cosmogonical/cosmological sectors of the cluster history are independently testable by means of a lower bound to the evolved temperature distribution , as can be measured with SAX and XMM out to moderate z . Finally , we discuss the effective limitations of X-ray clusters and groups as cosmological signposts , and their brighter prospects toward the astrophysics of the ICP and the cosmogony of large , high–contrast structures .