The global temperature distribution of the cosmic gas-phase oxygen at z \sim 3 is determined by combining high resolution cosmological simulations of individual proto-galactic , as well as larger , regions with the observed , extinction-corrected , rest-frame V-band galaxy luminosity function . The simulations have been performed with three different stellar initial mass functions ( IMFs ) , a Kroupa ( K98 ) , a Salpeter ( S ) and an Arimoto- Yoshii ( AY ) , spanning a range of a factor of five in chemical yield and specific SNII energy feedback . Gas-phase oxygen is binned according to T as log ( T ) \la 4.0 ( “ cold ” ) , log ( T ) \sim 4.5 ( “ warm ” ) , and log ( T ) \sim 5.0 , 5.5 , 6.0 , 6.5 , 7.0 ( “ hot ” phases ) . Oxygen is found to be distributed over all T phases , in particular for the top-heavy AY IMF . But , at variance with previous works , it is found that for the K98 and S IMFs the cold phase is the most important . For these IMFs it contains 47 and 37 % , respectively , of all gas-phase oxygen , mainly at fairly high density , n _ { H } \ga 0.1 cm ^ { -3 } . The implications of this in relation to observational damped Lyman- \alpha absorber ( DLA ) studies are discussed . In relation to “ missing metals ” it is found that a significant fraction of the oxygen is located in a warm/hot phase that may be very difficult to detect . Moreover , it is found that less than about 20-25 % of the cosmic oxygen is associated with galaxies brighter than M _ { V } \sim - 22 , i.e. , the faintest galaxy luminosities probed by current metallicity determinations for Lyman Break Galaxies ( LBGs ) . Hence , 75-80 % of the oxygen is also in this sense “ missing ” . From the LBG based , \lambda \sim 1500 Å UV luminosity density history at z \geq 3 , we obtain an essentially IMF independent constraint on the mean oxygen density at z =3 . We compare this to what is obtained from our models , for the three different IMFs . We find that the K98 IMF is strongly excluded , as the chemical yield is simply too small , the Salpeter is marginally excluded , and the AY matches the constraint well . The K98 IMF can only match the data if the \lambda \sim 1500 Å extinction corrections have been overestimated by factor of \sim 4 , which seems highly unlikely . The yields for K98 are also far too small to match the observational data for C iv . The optimal IMF should have a yield intermediate between the S and AY .