You can use the Application Metrics API to periodically poll for data about your runtime environment.

Language
Click Try It! to start a request and see the response here!