Determining the locking state of a Fabry-Pérot laser