{
    "mode": "man",
    "parameter": "proc_timer_stats",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/proc_timer_stats/5/json",
    "generated": "2026-10-04T18:03:19Z",
    "sections": {
        "NAME": {
            "content": "/proc/timerstats - timer statistics\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "/proc/timerstats (from  Linux 2.6.21 until Linux 4.10)\nThis is a debugging facility to make timer (ab)use in a Linux system visible to kernel\nand user-space developers.  It can be used by kernel and user-space developers to ver‐\nify  that their code does not make undue use of timers.  The goal is to avoid unneces‐\nsary wakeups, thereby optimizing power consumption.\n\nIf enabled in the kernel (CONFIGTIMERSTATS), but not used, it has almost  zero  run-\ntime  overhead  and a relatively small data-structure overhead.  Even if collection is\nenabled at run time, overhead is low: all the locking is per-CPU and lookup is hashed.\n\nThe /proc/timerstats file is used both to control sampling facility and to  read  out\nthe sampled information.\n\nThe timerstats functionality is inactive on bootup.  A sampling period can be started\nusing the following command:\n\n# echo 1 > /proc/timerstats\n\nThe following command stops a sampling period:\n\n# echo 0 > /proc/timerstats\n\nThe statistics can be retrieved by:\n\n$ cat /proc/timerstats\n\nWhile  sampling is enabled, each readout from /proc/timerstats will see newly updated\nstatistics.  Once sampling is disabled, the sampled information is kept  until  a  new\nsample period is started.  This allows multiple readouts.\n\nSample output from /proc/timerstats:\n\n$ cat /proc/timerstats\nTimer Stats Version: v0.3\nSample period: 1.764 s\nCollection: active\n255,     0 swapper/3        hrtimerstartrangens (tickschedtimer)\n71,     0 swapper/1        hrtimerstartrangens (tickschedtimer)\n58,     0 swapper/0        hrtimerstartrangens (tickschedtimer)\n4,  1694 gnome-shell      moddelayedworkon (delayedworktimerfn)\n17,     7 rcusched        rcugpkthread (processtimeout)\n...\n1,  4911 kworker/u16:0    moddelayedworkon (delayedworktimerfn)\n1D,  2522 kworker/0:0      queuedelayedworkon (delayedworktimerfn)\n1029 total events, 583.333 events/sec\n\nThe output columns are:\n\n[1]  a  count of the number of events, optionally (since Linux 2.6.23) followed by the\nletter 'D' if this is a deferrable timer;\n\n[2]  the PID of the process that initialized the timer;\n\n[3]  the name of the process that initialized the timer;\n\n[4]  the function where the timer was initialized; and (in parentheses)  the  callback\nfunction that is associated with the timer.\n\nDuring  the  Linux  4.11 development cycle, this file  was removed because of security\nconcerns, as it exposes information across namespaces.  Furthermore, it is possible to\nobtain the same information via in-kernel tracing facilities such as ftrace.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "proc(5)\n\nLinux man-pages 6.7                          2023-08-15                          proctimerstats(5)",
            "subsections": []
        }
    },
    "summary": "/proc/timerstats - timer statistics",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "proc",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/proc/5/json"
        }
    ]
}