Device Graph metrics are fixed; retrieve CPU usage per core via Esper Device API
Android
Title: Device Graph shows fixed metrics — retrieve per-core CPU usage via APIWhen reviewing device performance in the Esper Console, the Device Graph tab displays a fixed set of hardware metrics. Per-core CPU usage is not included in those metrics and cannot be added to the graph view, but the data is available through the Esper Device API.
Why this happens
The Device Graph tab is built around a predefined metric set that applies uniformly across all device models. Per-core CPU usage is exposed at the API level through the device detail endpoint, where it is reported as a point-in-time snapshot each time the device syncs with Esper.
What the Device Graph tab does show
The following metrics are available in Devices & Groups → [Device Name] → Device Graph and cannot be customised:
- Available Internal Storage
- Available RAM
- Battery Capacity Count
- Battery Capacity Total
- Battery Current
- Battery Current Average
- Battery Level
- Battery Temperature
- Battery Voltage
- Data Usage
- OS Occupied Storage
- WiFi Frequency
- WiFi Link Speed
- WiFi Signal Strength
Retrieve per-core CPU usage via the API
Before you begin
Collect the following three values from your Esper environment before making the API call:
-
Endpoint name — the subdomain of your Esper Console URL (for example,
acmeinacme.esper.cloud) - Enterprise ID — found in Settings → Enterprise Details
- Device ID — found in Devices & Groups → [Device Name] → Device Info
- API bearer token — generated in Settings → API Key Management
-
Confirm the device is online. Navigate to Devices & Groups → [Device Name] → Overview and verify the device status shows as active. The API returns a stale or empty
cpuUsagesarray if the device has not synced recently. -
Send a GET request to the Device Detail endpoint. Replace each placeholder with your actual values:
curl -X GET \ "https://{endpoint}-api.esper.cloud/api/enterprise/{enterprise_id}/device/{device_id}/" \ -H "Authorization: Bearer {your_api_token}" -
Locate the
cpuStatsobject in the JSON response. The relevant section looks like this:"cpuStats": { "cpuUsages": [12.0, 9.18, 10.1, 11.65, 22.33, 22.12, 40.38, 41.38], "cpuTemperatures": null } -
Read the
cpuUsagesarray. Each value is the utilisation percentage of one CPU core at the moment the device last reported data. The number of values equals the number of cores — eight values indicate an 8-core processor. This is a point-in-time snapshot, not a time-series or rolling average. -
Validate the core count. Confirm that the number of values in
cpuUsagesmatches the expected core count for the device model. A mismatch may indicate the device has not completed a full sync.
200 status and a cpuUsages array whose length matches the core count of the device. If the device is online and synced, values should be non-zero and reflect recent activity.
Troubleshooting
-
cpuUsagesisnullor an empty array — The device is offline or has not synced. Verify the device is online in Devices & Groups → [Device Name] → Overview and retry after the next sync interval. -
API returns
401or403— The bearer token has expired or does not have enterprise-level scope. Generate a new token in Settings → API Key Management. -
cpuTemperaturesis alwaysnull— CPU temperature reporting depends on OEM hardware support and is not available on all devices. This is expected behaviour on unsupported hardware. -
cpuStatsis missing entirely — Confirm the device is online and running a current version of the Esper Agent. Navigate to Devices & Groups → [Device Name] → Device Info to check the agent version.
If this doesn't resolve it
If cpuUsages remains empty or missing after confirming the device is online and the token is valid, contact Esper Support. When submitting your request, include the Device ID, Enterprise ID, the full API response body, and the agent version shown in Devices & Groups → [Device Name] → Device Info.
Still need help?
If the steps above don't resolve the issue, submit a support ticket with your device model, Android version, Esper Agent version, and a description of what you've already tried — this helps the support team investigate without a follow-up.
Please sign in to leave a comment.
Comments
0 comments