We study the partial and total pressures of the mixed gases in a rubidium vapor cell through its absorption spectrum under the influence of the natural broadening, the self-broadening, the pressure broadening, the pressure shift, and the Doppler broadening. A comprehensive model of the absorption coefficient on Rb D2 line is developed, which takes into account the influence of multiple gas species. The importance of light intensity selection and frequency calibration to obtain accurate experimental results are discussed. The accurate abundances are deduced from the experimentally measured absorption spectra of vacuum cells, and are used to optimize the abundance parameters in our model. We fit the experimentally measured absorption spectrum of a gas-filled cell to the optimized model, and get a root mean square error better than 0.1%. The extracted partial pressures indicate that the mixture ratio agrees well with the designed value, while the total pressure has an increment of about 17% of its nominal value. We further estimate the helium leakage amount of a cell to be 89.1 Torr for six months. Moreover, by using a series of absorption spectra generated by our model as benchmarks, we evaluate the effectiveness of the commonly used single- and double- Lorentzian fitting models and give some suggestions on using the double Lorentzian model.