Telemetry Extension API overview

This document gives a function-level documentation of the Telemetry Extension API. It is separated in the three namespaces telemetry, diagnostics and events.

Diagnostics

Types

Enum RoutineType

Property Name
ac_power
battery_capacity
battery_charge
battery_discharge
battery_health
cpu_cache
cpu_floating_point_accuracy
cpu_prime_search
cpu_stress
disk_read
dns_resolution
memory
nvme_wear_level
smartctl_check
lan_connectivity
signal_strength
dns_resolver_present
gateway_can_be_pinged
sensitive_sensor
nvme_self_test
fingerprint_alive
smartctl_check_with_percentage_used
emmc_lifetime

Enum RoutineStatus

Property Name
unknown
ready
running
waiting_user_action
passed
failed
error
cancelled
failed_to_start
removed
cancelling
unsupported
not_run

Enum RoutineCommandType

Property Name
cancel
remove
resume
status

Enum UserMessageType

Property Name
unknown
unplug_ac_power
plug_in_ac_power

Enum DiskReadRoutineType

Property Name
linear
random

Enum AcPowerStatus

Property Name
connected
disconnected

Enum NvmeSelfTestType

Property Name
short_test
long_test

RunAcPowerRoutineRequest

Property NameTypeDescription
expected_statusAcPowerStatusThe expected status of the AC (‘connected’, ‘disconnected’ or ‘unknown’)
expected_power_type*stringIf specified, this must match the type of power supply for the routine to succeed.

RunBatteryDischargeRoutineRequest

Property NameTypeDescription
length_secondsnumberLength of time to run the routine for
maximum_discharge_percent_allowednumberThe routine will fail if the battery discharges by more than this percentage

RunBatteryChargeRoutineRequest

Property NameTypeDescription
length_secondsnumberLength of time to run the routine for
minimum_charge_percent_requirednumberThe routine will fail if the battery charges by less than this percentage

RunCpuRoutineRequest

Property NameTypeDescription
length_secondsnumberLength of time to run the routine for

RunDiskReadRequest

Property NameTypeDescription
typeDiskReadRoutineTypeType of disk read routine that will be started
length_secondsnumberLength of time to run the routine for
file_size_mbnumbertest file size, in mega bytes, to test with DiskRead routine. Maximum file size is 10 GB

GetRoutineUpdateRequest

Property NameTypeDescription
idnumberId of the routine you want to query
commandRoutineCommandTypeWhat kind of updated should be performed

GetRoutineUpdateResponse

Property NameTypeDescription
progress_percentnumberCurrent progress of the routine
outputstringOptional debug output
statusRoutineStatusCurrent routine status
status_messagestringOptional routine status message
user_messageUserMessageTypeReturned for routines that require user action (e.g. unplug power cable)

RunNvmeWearLevelRequest

Property NameTypeDescription
wear_level_thresholdnumberThreshold number in percentage which routine examines wear level status against

RunNvmeSelfTestRequest

Property NameTypeDescription
test_typeNvmeSelfTestTypeSelects between a “short_test” or a “long_test”.

RunSmartctlCheckRequest

Property NameTypeDescription
percentage_used_thresholdnumberan optional threshold number in percentage, range [0, 255] inclusive, that the routine examines percentage_used against. If not specified, the routine will default to the max allowed value (255).

Functions

Function NameDefinitionPermission needed to accessReleased in dpsl version
getAvailableRoutines() => Promise<List<RoutineType>>os.diagnosticsM96
getRoutineUpdate(params: GetRoutineUpdateRequest) => Promise<GetRoutineUpdateResponse>>os.diagnosticsM96
runAcPowerRoutine(params: RunAcPowerRoutineRequest) => Promise<Routine>os.diagnosticsM105
runBatteryCapacityRoutine() => Promise<Routine>os.diagnosticsM96
runBatteryHealthRoutine() => Promise<Routine>os.diagnosticsM96
runBatteryDischargeRoutine(params: RunBatteryDischargeRoutineRequest) => Promise<Routine>os.diagnosticsM96
runBatteryChargeRoutine(params: RunBatteryChargeRoutineRequest) => Promise<Routine>os.diagnosticsM96
runCpuCacheRoutine(params: RunCpuRoutineRequest) => Promise<Routine>os.diagnosticsM96
runCpuFloatingPointAccuracyRoutine(params: RunCpuRoutineRequest) => Promise<Routine>os.diagnosticsM99
runCpuPrimeSearchRoutine(params: RunCpuRoutineRequest) => Promise<Routine>os.diagnosticsM99
runCpuStressRoutine(params: RunCpuRoutineRequest) => Promise<Routine>os.diagnosticsM96
runDiskReadRoutine(params: RunDiskReadRequest) => Promise<Routine>os.diagnosticsM102
runDnsResolutionRoutine() => Promise<Routine>os.diagnosticsM108
runDnsResolverPresentRoutine() => Promise<Routine>os.diagnosticsM108
runEmmcLifetimeRoutine() => Promise<Routine>os.diagnosticsM110
runFingerprintAliveRoutine() => Promise<Routine>os.diagnosticsM110
runGatewayCanBePingedRoutine() => Promise<Routine>os.diagnosticsM108
runLanConnectivityRoutine() => Promise<Routine>os.diagnosticsM102
runMemoryRoutine() => Promise<Routine>os.diagnosticsM96
runNvmeSelfTestRoutine(params: RunNvmeSelfTestRequest) => Promise<Routine>os.diagnosticsM110
runNvmeWearLevelRoutine(params: RunNvmeWearLevelRequest) => Promise<Routine>os.diagnosticsM102
runSensitiveSensorRoutine() => Promise<Routine>os.diagnosticsM110
runSignalStrengthRoutine() => Promise<Routine>os.diagnosticsM108
runSmartctlCheckRoutine(params: RunSmartctlCheckRequest?) => Promise<Routine>os.diagnosticsinitial release: M102, new parameter added: M110. The parameter is only available if “smartctl_check_with_percentage_used” is returned from GetAvailableRoutines

Events

Types

Enum EventCategory

Property Name
audio_jack
lid

Enum EventSupportStatus

Property Name
supported
unsupported

EventSupportStatusInfo

Property NameTypeDescription
statusEventSupportStatusSupport status of an event

Enum AudioJackEvent

Property Name
connected
disconnected

Enum AudioJackDeviceType

Property Name
headphone
microphone

AudioJackEventInfo

Property NameTypeDescription
eventAudioJackEventThe event that occurred
deviceTypeAudioJackDeviceTypeThe device type of

Enum LidEvent

Property Name
closed
opened

LidEventInfo

Property NameTypeDescription
eventLidEventThe event that occurred

Functions

Function NameDefinitionPermission needed to accessReleased in dpsl versionDescription
isEventSupported(category: EventCategory) => Promise<EventSupportStatusInfo>os.eventsM115Checks whether an event is supported. The information returned by this method is valid across reboots of the device
startCapturingEvents(category: EventCategory) => ()os.eventsM115Starts capturing events for EventCategory. After calling this method, an extension can expect to be updated about events through invocations of on<EventCategory>Event, until either the PWA is closed or stopCapturingEvents is called. Note that an extension is only able to subscribe to events if the PWA is currently open
stopCapturingEvents(category: EventCategory) => ()os.eventsM115Stops capturing EventCategory events. This means on<EventCategory>Event won't be invoked until startCapturingEvents is successfully called

Events

Function NameDefinitionPermission needed to accessReleased in dpsl versionEmitted on
onAudioJackEventfunction(AudioJackEventInfo)os.eventsM115An audio device was plugged in or out
onLidEventfunction(LidEventInfo)os.eventsM115The device lid was opened or closed

Telemetry

Types

AudioOutputNodeInfo

Property NameTypeDescription
idnumberNode id
namestringThe name of this node. For example, “Speaker”
deviceNamestringThe name of the device that this node belongs to. For example, “HDA Intel PCH: CA0132 Analog:0,0”
activebooleanWhether this node is currently used for output. There is one active node for output
nodeVolumenumberThe node volume in [0, 100]

AudioInputNodeInfo

Property NameTypeDescription
idnumberNode id
namestringThe name of this node. For example, “Internal Mic”
deviceNamestringThe name of the device that this node belongs to. For example, “HDA Intel PCH: CA0132 Analog:0,0”
activebooleanWhether this node is currently used for input. There is one active node for input
nodeGainnumberThe input node gain set by UI, the value is in [0, 100]

AudioInfo

Property NameTypeDescription
outputMutebooleanIs the active output device mute or not
inputMutebooleanIs the active input device mute or not
underrunsnumberNumber of underruns
severeUnderrunsnumberNumber of severe underruns
outputNodesArrayOutput nodes
inputNodesArrayInput nodes

BatteryInfo

Property NameTypeDescription
chargeFullnumberFull capacity (Ah)
chargeFullDesignnumberDesign capacity (Ah)
chargeNownumberBattery's charge (Ah)
currentNownumberBattery's current (A)
cycleCountnumberBattery's cycle count
manufactureDatestringManufacturing date in yyyy-mm-dd format. Included when the main battery is Smart
modelNamestringBattery's model name
serialNumberstringBattery's serial number
statusstringBattery's status (e.g. charging)
technologystringUsed technology in the battery
temperaturenumberTemperature in 0.1K. Included when the main battery is Smart
vendorstringBattery's manufacturer
voltageMinDesignnumberDesired minimum output voltage
voltageNownumberBattery's voltage (V)

BlockDeviceInfo

Property NameTypeDescription
namestringThe name of the block device.
typestringThe type of the block device, (e.g. “MMC”, “NVMe” or “ATA”).
sizenumberThe device size in bytes.

Enum CpuArchitectureEnum

Property Name
unknown
x86_64
aarch64
armv7l

PhysicalCpuInfo

Property NameTypeDescription
logicalCpusArrayLogical CPUs corresponding to this physical CPU
modelNamestringThe CPU model name

LogicalCpuInfo

Property NameTypeDescription
cStatesArrayInformation about the logical CPU's time in various C-states
idleTimeMsnumberIdle time since last boot, in milliseconds
maxClockSpeedKhznumberThe max CPU clock speed in kilohertz
scalingCurrentFrequencyKhznumberCurrent frequency the CPU is running at
scalingMaxFrequencyKhznumberMaximum frequency the CPU is allowed to run at, by policy
coreIdnumberThe ID of this logical CPU core

CpuCStateInfo

Property NameTypeDescription
namestringState name
timeInStateSinceLastBootUsnumberTime spent in the state since the last reboot, in microseconds

CpuInfo

Property NameTypeDescription
architectureCpuArchitectureEnumThe CPU architecture - it‘s assumed all of a device’s CPUs share the same architecture
numTotalThreadsnumberNumber of total threads available
physicalCpusArray<PhysicalCpuInfo>Information about the device's physical CPUs

Enum NetworkType

Property Name
cellular
ethernet
tether
vpn
wifi

Enum NetworkState

Property Namedescription
uninitializedThe network type is available but not yet initialized
disabledThe network type is available but disabled or disabling
prohibitedThe network type is prohibited by policy
not_connectedThe network type is available and enabled or enabling, but no network connection has been established
connectingThe network type is available and enabled, and a network connection is in progress
portalThe network is in a portal state
connectedThe network is in a connected state, but connectivity is limited
onlineThe network is connected and online

NetworkInfo

Property NameTypeDescription
typeNetworkTypeThe type of network interface (wifi, ethernet, etc.)
stateNetworkStateThe current state of the network interface (disabled, enabled, online, etc.)
macAddressstring(Added in M110): The currently assigned mac address. Only available with the permission os.telemetry.network_info.
ipv4AddressstringThe currently assigned ipv4Address of the interface
ipv6AddressesArray<string>The list of currently assigned ipv6Addresses of the interface
signalStrengthnumberThe current signal strength in percent

InternetConnectivityInfo

Property NameTypeDescription
networksArray<NetworkInfo>List of available network interfaces and their configuration

MarketingInfo

Property NameTypeDescription
marketingNamestringContents of CrosConfig in /branding/marketing-name

MemoryInfo

Property NameTypeDescription
totalMemoryKiBnumberTotal memory, in kilobytes
freeMemoryKiBnumberFree memory, in kilobytes
availableMemoryKiBnumberAvailable memory, in kilobytes
pageFaultsSinceLastBootnumberNumber of page faults since the last boot

OemDataInfo

Property NameTypeDescription
oemDatastringOEM's specific data. This field is used to store battery serial number by some OEMs

OsVersionInfo

Property NameTypeDescription
releaseMilestonestringThe release milestone (e.g. “87”)
buildNumberstringThe build number (e.g. “13544”)
patchNumberstringThe build number (e.g. “59.0”)
releaseChannelstringThe release channel (e.g. “stable-channel”)

VpdInfo

Property NameTypeDescription
skuNumberstringDevice's SKU number, a.k.a. product number
serialNumberstringDevice's serial number
modelNamestringDevice's model name
activateDatestringDevice's activate date: Format: YYYY-WW

StatefulPartitionInfo

Property NameTypeDescription
availableSpacenumberThe currently available space in the user partition (Bytes)
totalSpacenumberThe total space of the user partition (Bytes)

Enum TpmGSCVersion

Property Name
not_gsc
cr50
ti5

TpmVersion

Property NameTypeDescription
gscVersionTpmGSCVersionThe version of Google security chip(GSC), or “not_gsc” if not applicable
familynumberTPM family. We use the TPM 2.0 style encoding (see here for reference), e.g.: TPM 1.2: “1.2” -> 0x312e3200 TPM 2.0: “2.0” -> 0x322e3000
specLevelnumberThe level of the specification that is implemented by the TPM
manufacturernumberA manufacturer specific code
tpmModelnumberThe TPM model number
firmwareVersionnumberThe current firmware version of the TPM
vendorSpecificstringInformation set by the vendor

TpmStatus

Property NameTypeDescription
enabledbooleanWhether the
ownedbooleanWhether the TPM has been owned
specLevelbooleanWhether the owner password is still retained (as part of the TPM initialization)

TpmDictionaryAttack

Property NameTypeDescription
counternumberThe current dictionary attack counter value
thresholdnumberThe current dictionary attack counter threshold
lockoutInEffectbooleanWhether the TPM is currently in some form of dictionary attack lockout
lockoutSecondsRemainingnumberThe number of seconds remaining in the lockout (if applicable)

TpmInfo

Property NameTypeDescription
versionTpmVersionThe current version of the Trusted Platform Module (TPM)
statusTpmStatusThe current status of the TPM
dictionaryAttackTpmDictionaryAttackTPM dictionary attack (DA) related information

UsbBusInterfaceInfo

Property NameTypeDescription
interfaceNumbernumberThe zero-based number (index) of the interface
classIdnumberThe class id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids)
subclassIdnumberThe subclass id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids)
protocolIdnumberThe protocol id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids)
driverstringThe driver used by the device. This is the name of the matched driver which is registered in the kernel. See “{kernel root}/drivers/” for the list of the built in drivers

Enum FwupdVersionFormat

Property NameDescription
plainAn unidentified format text string
numberA single integer version number
pairTwo AABB.CCDD version numbers
tripletMicrosoft-style AA.BB.CCDD version numbers
quadUEFI-style AA.BB.CC.DD version numbers
bcdBinary coded decimal notation
intelMeIntel ME-style bitshifted notation
intelMe2Intel ME-style A.B.CC.DDDD notation
surfaceLegacyLegacy Microsoft Surface 10b.12b.10b
surfaceMicrosoft Surface 8b.16b.8b
dellBiosDell BIOS BB.CC.DD style
hexHexadecimal 0xAABCCDD style

FwupdFirmwareVersionInfo

Property NameTypeDescription
versionstringThe string form of the firmware version
version_formatFwupdVersionFormatThe format for parsing the version string

Enum UsbVersion

Property Name
unknown
usb1
usb2
usb3

Enum UsbSpecSpeed

An enumeration of the usb spec speed in Mbps. Source:

  1. https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-usb
  2. https://www.kernel.org/doc/Documentation/ABI/stable/sysfs-bus-usb
  3. https://en.wikipedia.org/wiki/USB
Property NameDescription
unknownUnknown speed
n1_5MbpsLow speed
n12MbpsFull speed
n480MbpsHigh Speed
n5GbpsSuper Speed
n10GbpsSuper Speed+
n20GbpsSuper Speed+ Gen 2x2

UsbBusInfo

Property NameTypeDescription
classIdnumberThe class id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids)
subclassIdnumberThe subclass id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids)
protocolIdnumberThe protocol id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids)
vendorIdnumberThe vendor id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids)
productIdnumberThe product id can be used to classify / identify the usb interfaces. See the usb.ids database for the values (https://github.com/gentoo/hwids)
interfacesArray<UsbBusInterfaceInfo>The usb interfaces under the device. A usb device has at least one interface. Each interface may or may not work independently, based on each device. This allows a usb device to provide multiple features. The interfaces are sorted by the interface_number field
fwupdFirmwareVersionInfoFwupdFirmwareVersionInfoThe firmware version obtained from fwupd
versionUsbVersionThe recognized usb version. It may not be the highest USB version supported by the hardware
spec_speedUsbSpecSpeedThe spec usb speed

Functions

Function NameDefinitionPermission needed to accessReleased in Chrome version
getVpdInfo() => Promise<VpdInfo>os.telemetry, os.telemetry.serial_number for serial number fieldM96
getOemData() => Promise<OemDataInfo>os.telemetry, os.telemetry.serial_number for the whole resultM96
getCpuInfo() => Promise<CpuInfo>os.telemetryM99
getMemoryInfo() => Promise<MemoryInfo>os.telemetryM99
getBatteryInfo() => Promise<BatteryInfo>os.telemetry, os.telemetry.serial_number for serial number fieldM102
getStatefulPartitionInfo() => Promise<StatefulPartitionInfo>os.telemetryM105
getOsVersionInfo() => Promise<OsVersionInfo>os.telemetryM105
getNonRemovableBlockDevicesInfo() => Promise<BlockDeviceInfo>os.telemetryM108
getInternetConnectivityInfo() => Promise<InternetConnectivityInfo>os.telemetry, os.telemetry.network_info for MAC address fieldM108 - Mac address in M111
getTpmInfo() => Promise<TpmInfo>os.telemetryM108
getAudioInfo() => Promise<AudioInfo>os.telemetryM111
getMarketingInfo() => Promise<MarketingInfo>os.telemetryM111
getUsbBusInfo() => Promise<UsbBusInfo>os.telemetryM114