Skip to main content

Metrics Client

Discover nearby Metrics Servers and view live device metrics streamed over Bluetooth LE.

iPhoneiPadMacApple Vision ProApple TVApple Watch
Discovery tab: scanning for nearby Metrics Servers with status and refresh controls.
When no servers are found, a checklist helps with troubleshooting.
Discovery tab with scanning indicator and available servers list.

Overview​

Metrics Client connects to a Metrics Server running on another device and displays the server's live metrics in real time. It receives CPU usage, per-core CPU activity, device identity (server name, device model, device name), and timestamps — all streamed over Bluetooth Low Energy.

Table Of Contents​

Tabs​

Metrics Client has two tabs. You can swipe between them or tap the tab titles.

  • Discovery — scan for and connect to nearby servers.
  • Metrics — view live data from the connected server.

Discovery Tab​

The Discovery tab is the landing screen. It scans for nearby Metrics Server peripherals and lets you connect to one.

Discovery Status Card​

The status card shows:

  • A scanning indicator — a colored dot with a label:
    • Scanning (blue, with loading animation) — actively scanning for peripherals.
    • Idle (gray) — scanning is paused.
  • Discovered Servers — the count of Metrics Server peripherals currently visible.
  • A Refresh button — stops and restarts the BLE scan to pick up new servers.

Scanning starts automatically when the tool is opened.

Available Servers List​

Below the status card, discovered servers are listed. Only peripherals that advertise the Metrics Server BLE service UUID are shown — other Bluetooth devices are filtered out.

When no servers are found, a troubleshooting checklist is displayed:

  • A device is running the Metrics Server tool
  • Local Network permission is granted in Settings
  • Both devices are on the same network / within BLE range

Servers that disappear from BLE advertisements are kept in the list for a short grace period (3 seconds) to avoid flickering.

Server Row​

Each discovered server is displayed as a row containing:

  • Server name — the name configured in Metrics Server (e.g. "iPhone 16 Pro Max (iPhone17,2)"). Display names are debounced for 1.5 seconds to avoid rapid flickering when the BLE advertisement name changes.
  • RSSI — the signal strength in dBm, with a color-coded 3-bar signal indicator:
    • Green (3 bars) — strong signal (>= -60 dBm)
    • Orange (2 bars) — moderate signal (>= -75 dBm)
    • Red (1 bar) — weak signal (< -75 dBm)
  • Service availability — a green or gray dot indicating whether the server is advertising the Metrics service UUID.
  • A Connect / Disconnect button:
    • Connect (blue) — initiates a BLE connection to this server.
    • Connecting (gray, with loading spinner) — connection in progress.
    • Disconnect (red) — disconnects from the current server.

Only one server connection is supported at a time. While connecting to one server, other server rows are disabled.


Metrics Tab​

When connected, the Metrics tab displays live data streamed from the server. The client automatically switches to this tab upon successful connection.

Connection Status Card​

The top card shows:

  • Connection state — a colored dot with a label:
    • Connected (green)
    • Disconnected (red)

When connected, additional details appear:

  • Signal Strength — a 5-bar indicator with a quality label (Excellent, Good, Fair, Poor, Very Poor) and the raw RSSI value in dBm:

    RSSI RangeQualityBars
    >= -50 dBmExcellent5
    -51 to -65 dBmGood4
    -66 to -75 dBmFair3
    -76 to -85 dBmPoor2
    Below -85 dBmVery Poor1
  • RSSI History — a rolling line graph of signal strength readings (up to 120 samples), providing a visual sense of connection stability.

  • Server identity — three key-value rows showing the data transmitted by the server:

    FieldDescription
    Server NameThe name configured in Metrics Server (e.g. "iPhone 16 Pro Max (iPhone17,2)").
    Device ModelThe server device's marketing name (e.g. "iPhone 16 Pro Max").
    DeviceThe user-assigned device name from iOS Settings (e.g. "Rogerio's iPhone 16ProMax").
  • Error messages — if any BLE errors occur (connection failure, disconnection, etc.), they appear as a red warning.

  • A Disconnect button (red, full-width) to terminate the connection.

Real-Time Metrics Card​

When metrics are being received, this card displays:

FieldDescription
CPU UsageThe server device's current overall CPU usage percentage (e.g. 30.0%), displayed as a large number.
Core CountThe number of CPU cores on the server device (e.g. 6).
Last UpdateThe timestamp of the most recent metrics packet, shown as a time string.

CPU Usage History​

A rolling line graph showing the server's CPU usage over time. The graph holds up to 100 data points, providing roughly 100 seconds of history at the 1-second update rate.

Per-Core Usage​

When the server provides per-core CPU data, a Per-Core Usage view is shown below the history graph. This displays the current usage percentage for each individual CPU core, matching the same per-core visualization used in the CPU Monitor tool.

No Metrics State​

When not connected or when no metrics have arrived yet, the Metrics tab shows a placeholder with a chart icon and a prompt to connect to a server using the Discovery tab.


How To Use With Metrics Server​

  1. On the device you want to observe, open Tools > Metrics Server and tap Start Server.
  2. On the device running Metrics Client, open Tools > Metrics Client.
  3. In the Discovery tab, find the server and tap Connect.
  4. The client automatically switches to the Metrics tab to display live readings.

Permissions​

  • Bluetooth permission — required for BLE scanning and connection. If permission is denied, enable Bluetooth access for Lirum in iOS Settings.
  • Bluetooth permission is handled automatically by CoreBluetooth. The system prompt appears the first time the tool initializes.

Technical Details​

  • The client acts as a BLE Central using CBCentralManager. It scans for all nearby peripherals and filters the list to show only those advertising the Metrics Server service UUID.
  • Upon connection, the client discovers the Metrics Server GATT service and subscribes to both the summary and per-core notify characteristics.
  • Metrics arrive as binary payloads approximately once per second. The client decodes:
    • Summary: server name, device model, device name, overall CPU usage (Float), core count (UInt16), timestamp (UInt64 milliseconds).
    • Per-core: core count, per-core usage array (Float per core), timestamp (UInt64 milliseconds).
  • The client supports both v1 (legacy) and v2 (current) payload formats for backward compatibility with older Metrics Server versions. v2 adds device model, server name as separate fields, and millisecond-precision timestamps.
  • RSSI for the connected server is polled every 2 seconds via readRSSI(). An RSSI history of up to 120 samples is maintained for the signal graph.
  • Signal smoothing — in the discovery list, RSSI values are exponentially smoothed (alpha = 0.15) to reduce visual jitter in the signal bars.
  • Name stabilization — server display names in the discovery list are debounced for 1.5 seconds to prevent flickering when BLE advertisement names change rapidly.
  • Vanish grace period — servers that disappear from BLE advertisements are retained in the list for 3 seconds before being removed, preventing the list from flickering.
  • CoreBluetooth state restoration is enabled, allowing the client to recover an existing connection if the app is relaunched by the system.
  • Metrics history is capped at 100 entries, corresponding to roughly 100 seconds of data at the default 1-second update interval.

Notes And Limitations​

  • This tool uses Bluetooth LE, not Wi-Fi networking. Both devices must be within BLE range.
  • Only one server connection is supported at a time.
  • RSSI is an approximate indicator of signal strength and can fluctuate due to environmental factors.
  • The metrics stream includes CPU usage, per-core usage, core count, and device identity. Other device metrics (memory, storage, thermals) are not currently transmitted.
  • On visionOS, Metrics Client is unavailable because the BLE central role is not supported on that platform.