Collecting system metrics