Electron beams propagating in the ion focused regime (Bennett pinch) are of interest for various sources of coherent electromagnetic radiation (pasotrons, ion-channel lasers, ion-channel guided free-electron lasers). The transition of a beam from a quasi-laminar state near the gun to a phase-mixed equilibrium state is accompanied with appearance of betatron oscillations. In pasotrons these oscillations play a negative role because they often result in certain beam losses due to the interception of beam electrons oscillating with large amplitudes by the chamber walls. The betatron oscillations and the beam losses can be monitored by using a weak local external magnetic field (magnetic lens) in the transition region. The results obtained show that, by using a properly designed and positioned magnetic lens, a halo in the phase-mixed beam can be greatly reduced and the beam losses can be practically eliminated.