In this paper, we show, by using the approach of effective mass, that the model of a twodimensional Dirac oscillator can be used to describe the thermal properties of graphene under an uniform magnetic field. All thermal quantities of graphene, such as the free energy, the mean energy, the entropy and the specific heat, have been found by using an approach based on the zeta function.