Irreversible processes of few hard-ball (N) mechanical systems are investigated numerically and compared with the theoretical results of quasistatic processes. The thermodynamic second law is valid for N>or=2 for both equilibrium and nonequilibrium systems if the average ensemble of the large number of identical systems is taken.