Do modern airliners have oxygen sensors in the cabin? I know that airliners have pressure sensors to check the cabin pressure, and thus check if we can breathe (and get enough O2) inside it so we don't get hypoxia. But that got me thinking:


Is there any oxygen sensor to check if there is enough O2 inside the cabin?
Is there any situation (emergency or not) in which some other gas could pressurize the cabin and lower the O2 percentage inside it?
While it would not significantly affect the O₂ percentage one thing that must be tabulated on a cargo aircraft is the amount of dry ice loaded. Dry ice is very common in packaging to keep perishable shipments cool during transport. Since dry ice sublimates into gaseous CO₂ as it warms there is a limit to how much can be loaded into an aircraft. If there is too much there's a possibility that the pilots could be overcome by gas trapped inside the plane. It's a rather insidious threat because you can't smell it so you would only realize something was wrong when you started feeling physiological effects. 

An O₂ sensor would not help since pilots would be overcome long before it made any detectable difference in O₂ levels. AFAIK there are no sensors for CO₂ either. The amount of dry ice loaded is carefully tabulated and pilots who fly cargo containing dry ice are aware of the possible hazard and how to recognize symptoms of CO₂ poisoning.