There are examples of groups formed by a small number of galaxies which are enveloped in a large cloud of hot gas (ICM), visible by its X-ray emission. One may assume that the electron density distribution associated with the X-ray brightness is in hydrostatic equilibrium, and one can extract the ICM radial density profiles by fits.
The amount of matter in the form of hot gas can be deduced from the intensity of this radiation. Adding the gas mass to the observed luminous matter, the total amount of baryonic matter, Mb, can be estimated, see M. Markevitch & al.  and C. De Boni & G. Bertin . In clusters studied, the gas fraction increases with the distance from the center; the dark matter appears more concentrated than the visible matter.
The temperature of the gas depends on the strength of the gravitational field, from which the total amount of gravitating matter, Mgrav, in the system can be deduced. In many such small galaxy groups one finds Mgrav / Mb ≥ 3, testifying to a dark halo present. An accurate estimate of Mgrav requires that also dark energy is taken into account, because it reduces the strength of the gravitational potential. There are sometimes doubts whether all galaxies appearing near these groups are physical members. If not, they will artificially increase the velocity scatter and thus lead to larger virial masses.
On the scale of large clusters of galaxies like the Coma, it is generally observed that DM represents about 85% of the total mass and that the visible matter is mostly in the form of a hot ICM.