BLTK(1)
π BLTK β bestie's guide to the battery life tool kit π
okay so. this is BLTK(1), from the Battery life tool kit section of the manual. it's a whole toolkit for measuring battery life and performance under different workloads on Linux. i'm gonna walk you through literally everything, no skips, no cap. π¦
β¨ NAME β¨
bltk β the tool kit that measures battery life and performance under different workloads on Linux. that's it, that's the girlboss. π
πΈ SYNOPSIS πΈ
bltk [-hVvaNAcCBXswiIRDPGOYZyQzxul] [-t sec] [-r results_dir] [-m {0,1}]
[-U path] [-g setup] [-J pid] [-T time] [-F file] [-W app] [-L title]
[-K comment] [-e app] [-E app] [-p percent] [-d percent] [-o {0,1,2}]
[-q file] [-b percent] [-f command] [-k num]
look at her. all those little flags. she's got range. π
π DESCRIPTION π
so BLTK can be used with various workloads to simulate different types of laptop usage. here are the workloads that are currently implemented, bestie:
- Idle workload β collect statistics only (mostly used to measure battery life)
- Developer workload β simulates code development in Linux environment
- Reader workload β simulates text reading on laptop (mostly used to measure battery life)
- Playback workload β simulates laptop entertaining usage (produces constant average load on the system)
- 3d game workload β simulates 3D-gaming on laptop (Unreal Tournament demo is used to create this workload)
- Office Activity workload β simulates laptop usage for different office activities (based on OpenOffice.org office suit)
When started, test collects platform/OS initial info and if it's OK prompts user to unplug AC adapter. After cable unplugged, workload started. During the workload execution test harness collects various system information (e.g. CPU load, battery drain, display state, CPU frequency, etc...). After battery completely discharged user should plug the AC cable back and boot the system. When it is done the results are available. π
There are several tools for result evaluation. They allow creating report file for test run, to gather results into a table for system comparison, and to draw graphs for different purposes.
π Results π
after the battery dies and the system booted back, the results are available. They are stored in 'bltk/<wokload_name>.results' directory (or in the directory, specified in -r option). If target directory already exist the tool will add numeric extension to its name (.001, .002 e.t.c.) The results consist of the following files (see below for detailed description):
cmdβ In this file'bltk'command with arguments are storedinfoi<N>.log(info1.log,info2.log, ...) β Here initial system info is stored. Another two files (info1.log,info2.log) contains system info after AC adapter was unplugged, and on 5% battery capacity remained. They are used to check whether any changes occurred during test execution.stat.logβ Statistics generated by bltk harness are stored here. One statistic line generated per 1 minute (or per number of seconds, specified in-toption).system<N>β When-k 1is used, the system information is stored under this directory. The numbers at the end of directory name have the following meanings:0β initial system info1β system info after AC adapter was unplugged2β system info on 5% battery capacity remained
versionβ this file contains version informationworkloadβ the file contains info about workloadwork_out.logerr.logβ There are stored any error messageswarning.logβ Contains warningswork.logβ Strings generated byUSR1,USR2signals from workload. String format is the same as in the'stat.log'file.failβ when test failsscoreReportReport.table
π OPTIONS π
-h,--helpβ Help; display a help message and then exits.-V,--versionβ Version; display version number and then exits.-v,--verboseβ Verbose-a,--ac-ignoreβ ignore ac adapter state check (on/off)-N,--time-stat-ignoreβ disable time statistics-A,--ac-stat-ignoreβ disable ac adapter statistics-c,--cpu-stat-ignoreβ disable cpu load statistics-C,--cpu-add-stat-ignoreβ disable cpu additional statistics-B,--bat-stat-ignoreβ disable battery statistics-X,--disp-stat-ignoreβ Disable display state statistics-H,--hd-stat-ignoreβ disable hard drive state statistics-t seconds,--report-time secondsβ frequency of report line generation in seconds-r results_dir,--results results_dirβ name of results directory-s,--stat-ignoreβ disable all statistics-w,--work-stat-ignoreβ disable workload statistics-m {0,1},--stat-memory {0,1}β dump statistics directly on disk or keep in memory, if statistics are kept in memory, it will be dumped on disk at low battery capacity, or at the test end0β disk1β memory (by default)
-i,--idle-testβ idle test-I,--idleβ idle workload-R,--readerβ reader workload-D,--developerβ developer workload-P,'--player"β playback workload-G,--gameβ 3D-gaming workload-O,--officeβ office productivity workload-U path,--user pathβ user-specified workload (path to executable)-g routine,--user-init routine"β setup routines for user-specified workload-Y,--dischargingβ battery discharge mode-Z,--chargingβ battery charge mode-J pid,--jobs pidβ make jobs number-T seconds,--time secondsβ workload time-F,--fileβ workload file-W,--progβ workload program name of player (player workload, default'mplayer') name of web-browser (reader workload, default'firefox')-L,--titleβ title of web-browser document-M,--manufacturerβ enable time and cpu load statistics only-S,--showβ demo/debug mode, one iteration only-n,--show-numβ demo/debug mode,'show-num'iteration-j,--show-cntβ demo/debug mode,'show-cnt'sub iteration-T seconds,--show-time secondsβ demo/debug mode, debug time-K comment,--comment commentβ user comment for report-e application,--init-prog applicationβ run program before test starting-E application,--init-prog-su applicationβ run program as root before test starting-y,--yesβ auto'yes'answer to all questions-Q,--debugβ debug workload (see cpu-load and disp-load below)-p percent,--cpu-load percentβ debug workload, the time cpu loaded in percent-d percent,--disp-load percentβ Debug workload, the time display on in percent-o {0,1,2},--output {0,1,2}β direct workload output:0β file1β file and console2β/dev/null, other - console
-z,--debug-varsβ debug option-q file,--debug-vars-file fileβ debug option - debug variables file-x,--dpmsβ debug option - try to use display power management-u,--spyβ debug option - try to find out unexpected system activity-l,--simul-laptopβ debug option, laptop simulation-b percent,--bat-sync percentβ debug option, battery critical capacity, default 5%-f command,--user-field commandβ the output of user-specified command being added to statistics Example:-f "cat /proc/acpi/thermal_zone/TZ01/temperature | awk '{print }'"-k num,--stat-system numβ debug option, save system files, default 0
note bestie:-Tshows up twice in the list (--timeand--show-time) β that's literally what the page says, i'm not fixing it, i'm just reporting it π
π EXAMPLES π
bltk -Ior--idleβ idle workload runningbltk -Ror--readerβ reader workload runningbltk -Dor--developerβ developer workload runningbltk -Oor--officeβ office workload runningbltk -Por--playerβ player workload runningbltk -Gor--gameβ game workload runningbltk -ior--idle-test -T 60 -t 1β idle test running for 60 seconds, stats interval 1 second
π«Ά SEE ALSO π«Ά
π AUTHOR π
- Konstantin Karasyov
<konstantin.a.karasyov@intel.com> - Vladimir Lebedev
<vladimir.p.lebedev@intel.com>
okay that's the whole page, bestie, you ate it. π
β¨ this was BLTK, manual page for BLTK, and the version/date stamp on this one is 15 July 2008. iconic, historic, timeless. mwah. π¦ππ
π¦ where this page comes from
- fedora 43: bltk 1.1.0-35.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: bltk 1.1.0-37.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms