This paper studies a systemic risk control problem by the central bank, which dynamically plans monetary supply for the interbank system with borrowing and lending activities. Facing both heterogeneity among banks and the common noise, the central bank aims to find an optimal strategy to minimize the average distance between log-monetary reserves and some prescribed capital levels for all banks. A weak formulation is adopted, and an optimal randomized control can be obtained in the system with finite banks by applying Ekeland's variational principle. As the number of banks grows large, we further prove the convergence of optimal strategies using the Gamma-convergence arguments, which yields an optimal weak control in the mean field model. It is shown that the limiting optimal control is linked to a solution of a stochastic Fokker-Planck-Kolmogorov (FPK) equation. The uniqueness of the solution to the stochastic FPK equation is also established under some mild conditions.