A dialysis machine (e.g., a peritoneal dialysis (PD) machine) can include a pressure sensor (151A, 151B) mounted at a proximal end of a patient line (130) that provides PD solution to a patient through a catheter. During treatment, an occlusion (1008) can occur at different locations in the patient line and/or the catheter. Elastic waves may be generated at a pump that introduces (e.g., for fill cycles) or withdraws (e.g., for drain cycles) the solution into/out of the patient line. For example, when the solution is introduced or withdrawn suddenly, elastic waves travel distally down the patient line until they encounter the occlusion, and are then reflected back (e.g., toward the pressure sensor).