Train-monitoring system