Nonequilibrium entropy. Characterization of stationary states