The Buddha was once staying in the upper storey of the Migáramátupásáda when he heard the new entrants to the Order, in the cells below, making a great uproar, talking about the food they had eaten, and other such worldly topics. The Buddha desired Moggallána to come and, when he appeared, the Buddha asked him to frighten the monks by a display of iddhi-power.
By his psychic power Moggallána caused the whole building to rock to and fro like a ship, and when the monks, in terror, sought the Buddha's protection, he explained to them that Moggallána gave them the fright as a lesson to them to lead active and energetic lives, for death lays hold of the slothful.
The monks having listened to the Buddha's sermon, concentrated their minds on it, and soon after became arahants. Sn.vv.331-4; SnA.i.336f; cf. S.v.269ff.
See also Pásádakampana Sutta.