We study the nonequilibrium entropy of the heat transport problem by performing molecular dynamics simulations of a quasi-one-dimensional gas of hard disks in the steady state. The entropy density, flux, and production rate, associated with the entropy balance of the system, are obtained from the numerically measured velocity distributions, based on the kinetic theory analysis of the Boltzmann entropy. We obtain an equilibriumlike Clausius relation from the computer experiments which, in turn, fulfills the generalized Gibbs relation for spatially inhomogeneous states.