  In this article, we first establish the main tool - an integral formula for
Riemannian manifolds with multiple boundary components (or without boundary).
This formula generalizes Reilly's original formula from \cite{Re2} and the
recent result from \cite{QX}. It provides a robust tool for sub-static
manifolds regardless of the underlying topology.
  Using this formula and suitable elliptic PDEs, we prove Heintze-Karcher type
inequalities for bounded domains in general sub-static manifolds which recovers
some of the results from Brendle \cite{Br} as special cases.
  On the other hand, we prove a Minkowski inequality for static convex
hypersurfaces in a sub-static warped product manifold. Moreover, we obtain an
almost Schur lemma for horo-convex hypersurfaces in the hyperbolic space and
convex hypersurfaces in the hemi-sphere, which can be viewed as a special
Alexandrov-Fenchel inequality.
