proc_timer_stats(5)
โจ proc_timer_stats(5) โจ
okay bestie, gather round, because we're reading a whole File Formats Manual page and it's giving deep lore ๐
this one's the proc_timer_stats(5) page and honestly? it's a little tragic. it's a ghost. a legend. an icon that got cancelled. let's get into it ๐ซถ
๐ NAME ๐
/proc/timer_stats โ timer statistics โจ like, the receipts on who's setting timers and how much ๐ฅ
๐ธ DESCRIPTION ๐ธ
๐ /proc/timer_stats (from Linux 2.6.21 until Linux 4.10)
so this file was a debugging facility โ literally designed to make timer (ab)use across a Linux system visible to both kernel devs and user-space devs ๐ yes, "(ab)use," the manpage said it, not me ๐
devs could use it to double-check that their code does not make undue use of timers. the whole goal? avoid unnecessary wakeups and thereby optimize power consumption ๐ protect the battery, protect the vibes, periodt.
if it's enabled in the kernel (CONFIG_TIMER_STATS) but you're not using it, it has almost zero run-time overhead and a relatively small data-structure overhead. and even if collection is enabled at run time, the overhead stays low because โ and I quote the flex โ all the locking is per-CPU and lookup is hashed โจ iconic engineering behavior, no cap.
the /proc/timer_stats file multitasked like a main character: it was used both to control the sampling facility and to read out the sampled information ๐
quick heads up bestie: the timer_stats functionality is inactive on bootup ๐ you gotta wake it up yourself.
wanna start a sampling period? say less:
# echo 1 > /proc/timer_stats
wanna stop a sampling period? okay queen, shut it down:
# echo 0 > /proc/timer_stats
and to retrieve the statistics:
$ cat /proc/timer_stats
now here's the cute part ๐ฅฐ while sampling is enabled, every single readout from /proc/timer_stats will see newly updated statistics โ live updates, we love to see it. and once sampling is disabled, the sampled information is kept until a new sample period is started. that means you can read it out multiple times ๐ no data loss, no drama.
sample output from /proc/timer_stats:
$ cat /proc/timer_stats
Timer Stats Version: v0.3
Sample period: 1.764 s
Collection: active
255, 0 swapper/3 hrtimer_start_range_ns (tick_sched_timer)
71, 0 swapper/1 hrtimer_start_range_ns (tick_sched_timer)
58, 0 swapper/0 hrtimer_start_range_ns (tick_sched_timer)
4, 1694 gnome-shell mod_delayed_work_on (delayed_work_timer_fn)
17, 7 rcu_sched rcu_gp_kthread (process_timeout)
...
1, 4911 kworker/u16:0 mod_delayed_work_on (delayed_work_timer_fn)
1D, 2522 kworker/0:0 queue_delayed_work_on (delayed_work_timer_fn)
1029 total events, 583.333 events/sec
okay now let's decode those columns, because the output is lowkey a whole mood board ๐
- [1] โ a count of the number of events, optionally (since Linux 2.6.23) followed by the letter
'D'if this is a deferrable timer ๐ - [2] โ the PID of the process that initialized the timer ๐ง
- [3] โ the name of the process that initialized the timer ๐
- [4] โ the function where the timer was initialized; and (in parentheses) the callback function that is associated with the timer ๐ฅ
๐ญ and now the sad part. during the Linux 4.11 development cycle, this file was removed because of security concerns, as it exposes information across namespaces. it's gone bestie, she's not coming back ๐
but wait โ plot twist ๐ฆ it is possible to obtain the same information via in-kernel tracing facilities such as ftrace. so the info lives on, just in a different font. the way that we never truly lose anything โจ
๐ฆ SEE ALSO ๐ฆ
and that's the whole page, bestie ๐ฅน๐ this was Linux man-pages 6.20, dated 2026-02-08, and honestly the proc_timer_stats(5) arc was short but it ATE and left no crumbs ๐ rest in power, you beautiful little debug file. slay forever ๐โจ๐
๐ฆ where this page comes from
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- ๐ the page's license: GPL-3.0-or-later
- Copyright 1994-1995, Daniel Quinlan <Daniel.Quinlan@linux.org>
- Copyright 2002-2017, Michael Kerrisk <mtk.manpages@gmail.com>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms