Carbon nanotubes (CNTs) are nanomaterials with extremely favorable mass sensor properties. In this paper, we propose that CNTs under clamped boundary condition and an axial tensile load are considered as CNTbased resonators. Moreover, the resonant frequencies and frequency shifts of the CNTs with attached nanomass are investigated based on vibration analysis, which used the nonlocal Euler-Bernoulli beam model. Using the present methods, we analyze and discuss the effects of the aspect ratio, the concentrated mass and the axial force on the resonant frequency of the CNTs. The results indicate that the CNT beam under the axial tensile loads could provide higher sensitivity as nanomechanical mass sensor.