Aiming at the problem of untimely fault location in optical fiber maintenance and no early warning capability of optical fiber faults, a real-time optical fiber online detection device is designed and implemented. Based on the OTDR detection principle, ZYNQ is the main control chip, high-speed AD interface is integrated on the PL side of ZYNQ, and PetaLinux system is integrated on the PS side to realize real-time reception and processing of optical fiber signals. Real-time inspection of optical fibers. After a large number of tests and verifications, the equipment can detect the optical fiber status online in real time, report the fault information in a timely manner, and analyze the historical detection data to obtain the optical fiber attenuation trend and achieve fault early warning.