Differential production cross sections of J/$\psi$ and $\psi$(2S) charmonium and $\Upsilon$(nS) (n = 1, 2, 3) bottomonium states are measured in proton-proton collisions at $\sqrt{s} =$ 13 TeV, with data collected by the CMS detector at the LHC, corresponding to an integrated luminosity of 2.3 fb$^{-1}$ for the J/$\psi$ and 2.7 fb$^{-1}$ for the other mesons. The five quarkonium states are reconstructed in the dimuon decay channel, for dimuon rapidity $|y| <$ 1.2. The double-differential cross sections for each state are measured as a function of $y$ and transverse momentum, and compared to theoretical expectations. In addition, ratios are presented of cross sections for prompt $\psi$(2S) to J/$\psi$, $\Upsilon$(2S) to $\Upsilon$(1S), and $\Upsilon$(3S) to $\Upsilon$(1S) production.
The production of J/psi and Upsilon mesons in pp collisions at sqrt(s) = 8 TeV is studied with the LHCb detector. The J/psi and Upsilon mesons are reconstructed in the mu+mu- decay mode and the signal yields are determined with a fit to the mu+mu- invariant mass distributions. The analysis is performed in the rapidity range 2.0<y<4.5 and transverse momentum range 0<p_T<14(15) GeV/c of the J/psi(Upsilon) mesons. The J/psi and Upsilon production cross-sections and the fraction of J/psi mesons from b-hadron decays are measured as a function of the meson p_T and y.