Acoustic cavitation is known to be a primary source of both cleaning and damage of wafers during their megasonic processing. Understanding the response of process fluids to variables like acoustic power recipe and dissolved gases is an important first step in achieving damage-free megasonic cleaning of wafers. This paper reports the development of a portable, UV light tight, cavitation threshold (CT) cell to measure sonoluminescence (SL) signal arising from cavitation. The closed cell, integrated with a gas sensor and contactor, allows SL measurements under very controlled conditions. Using the CT cell the effect of the concentration of dissolved O2, CO2 and air on SL signal has been investigated. Results show that SL varies linearly with dissolved O2 concentration while CO2 is found to be incapable of supporting SL. This study also demonstrates a novel method for precise control of SL through addition of an O2 scavenger with fast O2 removal kinetics.