A terrific blog for reading the details found in sys.dm_os_ring_buffers (including the query you seek) may be found here:
https://bwunder.wordpress.com/2012/07/29/monitoring-and-troubleshooting-with-sys-dm_os_ring_buffers/
-Eddie
Eddie Wuerch
MCM: SQL