The purpose of the research was to find out the most efficient method to measure the longitudinal profile irregularities of the railway track geometry.Some researchers used an accelerometer installed at the axle-box bogie to monitor the longitudinal profile of the railway track.However, the method was risky because the accelerometer could disappear due to improper installation.In this research, the accelerometer was installed in the train cabin.The scope of analysis started with the IMU calibration by manual technique, filtering the Z-axis acceleration of IMU data by the Kalman Filter method, and converting to longitudinal profile data by double integral calculation.The normal distribution of the longitudinal profile of the railway track based on the acceleration data and measurement data of the track geometry measuring train (TGMT) was tested by the Kolmogorov-Smirnov Method.The paired comparison test used the Wilcoxon signed-ranks test method, and test results showed the P-value is 0.725 (left rail) and 0.073 (right rail), which are greater than 0.05.Therefore, no difference between the longitudinal profile based on the TGMT data and the longitudinal profile based on accelerometer data analysis, and the longitudinal profile irregularities can be monitored by using the accelerometer in the train cabin.The use of this method will support SDGs 9, build resilient infrastructure.