  Tolman proposed that the proper temper $T$ of a static self-gravitating fluid
in thermodynamic equilibrium satisfies the relation $\chi T=constant$, where
$\chi$ is the redshift factor of the spacetime. The Tolman law has been proven
for radiation in stationary spacetimes and for perfect fluids in stationary,
asymototically flat and axisymmetric spacetimes. It is unclear whether the
proof can be extended to more general cases. In this paper, we prove that under
some reasonable conditions, the Tolman law always holds for a perfect fluid in
a stationary spacetime. The key assumption in our proof is that the particle
number density $n$ can not be determined by the energy density $\rho$ and
pressure $p$ via the equations of state. This is true for many known fluids
with the equation of state $p=p(\rho)$. Then, by requiring that the total
entropy of the fluid is an extremum for the variation of $n$ with a fixed
metric, we prove the Tolman law. In our proof, only the conservations of stress
energy and the total particle number are used, and no field equations are
involved. Our work suggests that the Tolman law holds for a generic perfect
fluid in a stationary spacetime, even beyond general relativity.
