Extremum Seeking For Linear Accelerators