Query the system events and extract information from them. This example runs until exited via Ctrl-C
include