Skip to content
AnswerWell geo Documentation

Research · 7 min read · Answerwell

Extension System Resource APIs: CPU, Memory, Storage, Processes, and Idle

How Chrome extension APIs expose CPU, RAM, storage, browser processes, idle state, and platform info—and when to use each.

This page summarises Chrome extension APIs that let an extension read machine-level resources (CPU layout and usage, physical memory, disk capacity), inspect live browser processes, detect user idle time, and read OS and CPU architecture through runtime. The same concepts appear under the browser.* namespace (Manifest V3) and legacy chrome.* references (Manifest V2); property names and limits described here apply to both unless your manifest blocks an API entirely.

Developers typically reach for these APIs when background work should throttle under load, when diagnostics UI should list renderer CPU or memory, or when features should pause after the user has been inactive for a set number of seconds.

system.cpu: query processor metadata and per-core time

Section titled “system.cpu: query processor metadata and per-core time”

The system.cpu API answers “what CPU is this?” and “how busy is each logical core?” It requires the system.cpu permission in the manifest.

Use the system.cpu API to query CPU metadata.

— Chrome, system.cpu

Property Meaning
archName Architecture name of the processors (string).
modelName Marketing or model name of the processors.
numOfProcessors Count of logical processors.
processors ProcessorInfo[]—one entry per logical CPU.
features Capability codes such as mmx, sse, sse2, sse3, ssse3, sse4_1, sse4_2, and avx.

Each ProcessorInfo exposes cumulative time in a usage object (CpuTime) with user, kernel, idle, and total, where total equals user + kernel + idle. These values are cumulative since boot (or since the browser began tracking them), not a single instant snapshot—compute deltas between two reads if you need “percent busy now.”

temperatures is a list of readings in degrees Celsius from each thermal zone. Chrome documents it as supported on Chrome OS only:

List of CPU temperature readings from each thermal zone of the CPU. Temperatures are in degrees Celsius.

Currently supported on Chrome OS only.

— Chrome, system.cpu

Do not assume temperature arrays exist on Windows, macOS, or Linux builds.

system.memory and system.storage: RAM and disk headroom

Section titled “system.memory and system.storage: RAM and disk headroom”

system.memory reports host RAM in bytes:

Property Meaning
capacity Total physical memory capacity.
availableCapacity Memory still available to allocate.

Use this when deciding whether to cache large datasets in the extension or defer work; it is machine-wide RAM, not JavaScript heap size inside a single process.

system.storage enumerates storage units and free space. Each unit includes name, type (StorageUnitType), capacity, availableCapacity, and a transient id:

The transient ID that uniquely identifies the storage device. This ID will be persistent within the same run of a single application. It will not be a persistent identifier between different runs of an application, or between different applications.

— Chrome, system.storage

Cache disk IDs only for the current browser session when correlating multiple calls; do not store them as stable database keys.

getAvailableCapacity results copy the id from the function parameter—pair requests and responses with the same id argument.

chrome.processes and browser.processes: live browser child processes

Section titled “chrome.processes and browser.processes: live browser child processes”

The processes API returns metrics for child processes of the current browser process—renderers, GPU, utilities—not arbitrary OS processes.

Requesting process lists and memory detail

Section titled “Requesting process lists and memory detail”

getProcessInfo accepts:

Parameter Behaviour
processIds One ID, an array of IDs, or an empty list meaning all processes.
includeMemory When true, fills detailed memory fields; costs extra CPU.

True if detailed memory usage is required. Note, collecting memory usage information incurs extra CPU usage and should only be queried for when needed.

— Chrome, processes

Manifest V2 callbacks return a dictionary of Process objects indexed by ID; Manifest V3 returns a Promise<object> when collection finishes.

Field Availability / notes
id, osProcessId, type, profile Always present identifiers and classification (ProcessType).
cpu Optional; % of one core used by all threads (can exceed 100% on many-core machines). Only in onUpdated / onUpdatedWithMemory callbacks.
network Optional bytes per second; same callback restriction.
privateMemory Optional bytes; onUpdatedWithMemory or getProcessInfo with includeMemory.
jsMemoryUsed, jsMemoryAllocated Optional JS heap metrics; callback APIs only.
cssCache, imageCache, scriptCache Optional Cache objects (liveSize, size); callback APIs only.
tasks TaskInfo[] for tasks on the process.

The most recent measurement of the process’s CPU usage, expressed as the percentage of a single CPU core used in total, by all of the process’s threads. This gives a value from zero to CpuInfo.numOfProcessors*100, which can exceed 100% in multi-threaded processes.

— Chrome, processes

naclDebugPort remains documented for Native Client debugging; treat it as irrelevant on current Chrome builds where NaCl is removed.

chrome.idle and browser.idle: detect user inactivity

Section titled “chrome.idle and browser.idle: detect user inactivity”

idle reports whether the user is idle based on input idle time and an optional locked screen state. The key tunable is intervalInSeconds:

Threshold, in seconds, used to determine when the system is in an idle state.

— Chrome, idle

Use a longer interval when deferring sync or analytics; use a shorter one only if the UX truly needs fast reaction, because frequent wake-ups can fight power-saving goals.

Idle reflects user activity, not low CPU—combine with system.cpu or process CPU if you throttle heavy extension work.

runtime PlatformInfo: OS and architecture without system permissions

Section titled “runtime PlatformInfo: OS and architecture without system permissions”

runtime exposes PlatformInfo for feature gating without declaring system.cpu:

Property Meaning
arch PlatformArch: arm, arm64, x86-32, x86-64, mips, mips64, riscv64.
os PlatformOs: mac, win, android, cros, linux, openbsd.
nacl_arch Deprecated since Chrome 149 after Native Client removal.

An object containing information about the current platform.

— Chrome, runtime

For release-level platform tags (for example comparing builds to Version History platform identifiers such as win64, mac_arm64, or android), map PlatformInfo to those strings in your own code—the extension enum uses shorter names (win, mac) than the version-history table (win64, mac_arm64).

The Compute Pressure API on the open web addresses adaptive performance in ordinary pages; extension authors who need privileged machine metrics still rely on system.* and processes under extension permissions rather than page JavaScript alone.

Goal API Manifest permission (typical)
Logical cores, feature flags, cumulative core times system.cpu system.cpu
Total / available RAM system.memory system.memory
Disk space per unit system.storage system.storage
Per-browser-process CPU, network, JS memory processes processes (as required by your manifest version)
User away from keyboard idle idle
OS / CPU arch only runtime none extra for getPlatformInfo

Request the narrowest permission set: runtime platform data does not substitute for RAM or process memory readings.

  • Treating Process.cpu as machine-wide utilization—it is per browser child process and may be missing unless you use update events.
  • Calling getProcessInfo with includeMemory: true on a tight interval—documentation warns this increases CPU use.
  • Persisting system.storage device id values across browser restarts—they are not stable across runs.
  • Assuming temperatures from system.cpu on desktop platforms—Chrome OS only.
  • Using idle alone to detect “the system is under heavy compute load.”
  1. In your extension project, open the manifest and confirm only the needed permissions (system.cpu, system.memory, system.storage, processes, idle) are declared, matching the tables in the system.cpu, system.memory, system.storage, processes, and idle references.

  2. Load the unpacked extension in Chrome, open the service worker or background page console, and call chrome.system.cpu.getInfo, chrome.system.memory.getInfo, or chrome.runtime.getPlatformInfo (or browser.* equivalents) to verify fields match the reference types.

  3. If you use process metrics, register chrome.processes.onUpdatedWithMemory (or browser.processes), trigger navigation to spin up renderers, and confirm cpu, jsMemoryUsed, and cache objects populate compared with a one-shot getProcessInfo without listeners—as described in processes.

  4. On Chrome OS hardware (if available), compare temperatures from system.cpu with system tools; on other OSes, confirm the field is absent rather than empty by mistake.

  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page does not match the current Chrome extension references, email yimasynthetic@gmail.com with the page URL and the exact statement you believe is wrong, and we will clarify or correct it.