srum-long-term-energy-usages

Retrieves long-term energy usage history from a Windows SRUM (System Resource Usage Monitor) database file.

Command properties

ItemDescription
Command typeDriver query
Required permissionLocal file read permission
License usageCounted
Parallel executionNot supported
Distributed executionNot supported

Syntax

srum-long-term-energy-usages [zipcharset=STR] [zippath=STR] FILE_PATH

Options

zipcharset=STR
Character encoding for ZIP entry names (Default: utf-8)
zippath=STR
ZIP file path. If specified, the SRUDB.dat file inside the ZIP file is queried.

Target

FILE_PATH
Path to the SRUDB.dat file. Wildcards (*) can be used to specify multiple files. If zippath is specified, enter the path inside the ZIP file. On Windows, this file is located at C:\Windows\System32\sru\SRUDB.dat.

Output fields

FieldTypeDescription
_timetimestampRecord timestamp
_filestringSource file name
app_idintegerApp ID (SruDbIdMapTable index)
app_namestringApp name
sidstringSID of the account that ran the program
user_idintegerAccount ID (SruDbIdMapTable index)
auto_inc_idintegerAuto-increment ID
active_ac_timeintegerActive time while connected to AC power (seconds)
active_dc_timeintegerActive time while on battery power (seconds)
active_discharge_timeintegerBattery discharge active time (seconds)
active_energyintegerEnergy usage in active state (mWh)
cs_ac_timeintegerConnected Standby time while connected to AC power (seconds)
cs_dc_timeintegerConnected Standby time while on battery power (seconds)
cs_discharge_timeintegerBattery discharge time during Connected Standby (seconds)
cs_energyintegerEnergy usage in Connected Standby state (mWh)
cycle_countintegerBattery charge cycle count
designed_capacityintegerBattery designed capacity (mWh)
full_charged_capacityintegerBattery full charge capacity (mWh). Less than or equal to the designed capacity.
configuration_hashlongSystem configuration hash value

Error codes

Parse errors

N/A

Runtime errors

N/A

Description

The srum-long-term-energy-usages command retrieves long-term energy usage history from the {FEE4E14F-02A9-4550-B5CE-5FA2DA202E37}LT table of the Windows SRUM database. This table is a long-term aggregated version of the short-term energy usage table queried by the srum-energy-usages command, and includes detailed power state energy usage information such as AC power connection time, battery power usage time, and Connected Standby time.

The command first reads the SruDbIdMapTable to map app IDs and user IDs to their actual names and SIDs. CamelCase column names in the ESE database are automatically converted to snake_case.

Examples

  1. Retrieve long-term energy usage from SRUDB.dat

    srum-long-term-energy-usages C:\Windows\System32\sru\SRUDB.dat
    

    Retrieves all long-term energy usage records from the SRUM database.

  2. Query SRUDB.dat inside a ZIP file

    srum-long-term-energy-usages zippath=D:\evidence\sru.zip SRUDB.dat
    

    Retrieves long-term energy usage history from the SRUDB.dat file contained in the ZIP file.

  3. Analyze battery degradation

    srum-long-term-energy-usages C:\Windows\System32\sru\SRUDB.dat
    | fields _time, designed_capacity, full_charged_capacity, cycle_count
    | sort _time
    

    Retrieves changes in battery full charge capacity compared to the designed capacity and the cycle count in chronological order to analyze battery degradation trends.