The second principle of thermodynamics in vibrations