{"id":19512362,"url":"https://github.com/colinianking/cpustat","last_synced_at":"2026-03-05T02:32:34.112Z","repository":{"id":34203812,"uuid":"38060109","full_name":"ColinIanKing/cpustat","owner":"ColinIanKing","description":"cpustat periodically dumps out the current CPU utilisation statistics of running processes. cpustat has been optimised to have a minimal CPU overhead and typically uses about 35% of the CPU compared to top. cpustat also includes some simple statistical analysis options that can help characterise the way CPUs are being loaded. ","archived":false,"fork":false,"pushed_at":"2025-02-26T13:00:02.000Z","size":447,"stargazers_count":19,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-02-13T21:57:03.151Z","etag":null,"topics":["cpu-monitoring","linux"],"latest_commit_sha":null,"homepage":"https://github.com/ColinIanKing/cpustat","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ColinIanKing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-06-25T16:15:58.000Z","updated_at":"2025-04-10T13:56:48.000Z","dependencies_parsed_at":"2025-06-27T07:36:49.066Z","dependency_job_id":"bd2a6afd-dcb1-4c49-b21d-445c37b76b34","html_url":"https://github.com/ColinIanKing/cpustat","commit_stats":null,"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"purl":"pkg:github/ColinIanKing/cpustat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColinIanKing%2Fcpustat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColinIanKing%2Fcpustat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColinIanKing%2Fcpustat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColinIanKing%2Fcpustat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ColinIanKing","download_url":"https://codeload.github.com/ColinIanKing/cpustat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColinIanKing%2Fcpustat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30107213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T01:39:18.192Z","status":"online","status_checked_at":"2026-03-05T02:00:06.710Z","response_time":93,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpu-monitoring","linux"],"created_at":"2024-11-10T23:25:40.132Z","updated_at":"2026-03-05T02:32:34.094Z","avatar_url":"https://github.com/ColinIanKing.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cpustat\n\ncpustat periodically dumps out the current CPU utilisation statistics of\nrunning processes. cpustat has been optimised to have a minimal CPU overhead\nand typically uses about 35% of the CPU compared to top. cpustat also includes\nsome simple statistical analysis options that can help characterise the way\nCPUs are being loaded.\n\n# cpustat command line options:\n\n* -h help\n* -a calculate CPU utilisation based on all the CPU ticks rather than one CPU\n* -c get command name from processes comm field (less expensive on CPU)\n* -d strip directory basename off command information\n* -D show distribution of CPU utilisation stats at end of run\n* -g show grand total of CPU utilisation stats at end of run\n* -i ignore cpustat in the statistics\n* -l show long (full) command information\n* -n specifies number of tasks to display\n* -q run quietly, useful with option -r\n* -r specifies a comma separated values output file to dump samples into.\n* -s show short command information\n* -S timestamped output\n* -t specifies an task tick count threshold where samples less than this\n     are ignored.\n* -T show total CPU utilisation statistics\n* -x show extra stats (load average, avg cpu freq, etc) \n\n# Example Output:\n```\ncpustat 5 5 -gxDST\nLoad Avg 1.71 1.11 0.88, Freq Avg. 2.92 GHz, 4 CPUs online\n7248.5 Ctxt/s, 2444.1 IRQ/s, 1658.1 softIRQ/s, 1.2 new tasks/s, 9 running, 0 blocked\n  %CPU   %USR   %SYS   PID S  CPU   Time Task  (14:09:46)\n 73.25  73.25   0.00 31078 S    2  1.94m stress-ng\n 72.06  70.86   1.20 31079 R    1  1.94m stress-ng\n 20.36  16.97   3.39 31037 S    0 33.28s /usr/lib/firefox/plugin-container\n  8.78   7.98   0.80  7027 S    3 42.70s /usr/lib/thunderbird/thunderbird\n  4.99   3.19   1.80  7134 S    3  1.94m /usr/lib/firefox/firefox\n  4.79   3.19   1.60   901 S    3  8.06m /usr/bin/X\n  3.39   2.99   0.40  2250 S    2  3.99m compiz\n  1.60   0.80   0.80  2375 S    2  1.58m /usr/bin/pulseaudio\n  1.60   0.00   1.60 31036 S    0  1.12s [kworker/0:2]\n  0.40   0.40   0.00  5719 S    2 22.10s /usr/lib/gnome-terminal/gnome-terminal-server\n  0.40   0.40   0.00  2177 S    3 21.25s /usr/bin/ibus-daemon\n  0.20   0.20   0.00 30774 S    0  1.03s /usr/lib/firefox/plugin-container\n  0.20   0.00   0.20   493 S    2  0.25s [jbd2/sda3-8]\n  0.20   0.20   0.00  2206 S    3  3.44s /usr/lib/ibus/ibus-ui-gtk3\n  0.20   0.00   0.20  6852 S    3  0.24s [kworker/3:1]\n  0.20   0.20   0.00  2170 S    1  0.25s upstart-dbus-bridge\n  0.20   0.00   0.20  6806 S    2 12.18s [kworker/u16:3]\n192.81 180.64  12.18 Total\n\nLoad Avg 1.82 1.14 0.90, Freq Avg. 2.92 GHz, 4 CPUs online\n6781.6 Ctxt/s, 2210.8 IRQ/s, 1338.8 softIRQ/s, 0.6 new tasks/s, 2 running, 0 blocked\n  %CPU   %USR   %SYS   PID S  CPU   Time Task  (14:09:51)\n 73.40  73.40   0.00 31079 R    1  2.00m stress-ng\n 72.80  71.40   1.40 31078 S    2  2.00m stress-ng\n 19.40  17.40   2.00 31037 S    0 34.25s /usr/lib/firefox/plugin-container\n 15.00  13.80   1.20  7027 S    3 43.45s /usr/lib/thunderbird/thunderbird\n  5.60   3.40   2.20   901 S    3  8.06m /usr/bin/X\n  3.60   2.80   0.80  2250 S    2  4.00m compiz\n  3.20   2.40   0.80  7134 S    3  1.94m /usr/lib/firefox/firefox\n  1.60   1.20   0.40  2375 S    2  1.58m /usr/bin/pulseaudio\n  1.00   0.00   1.00 31036 S    0  1.17s [kworker/0:2]\n  0.20   0.00   0.20 30774 S    0  1.04s /usr/lib/firefox/plugin-container\n  0.20   0.20   0.00  2244 S    2  1.68s /usr/lib/unity-settings-daemon/unity-settings-daemon\n  0.20   0.20   0.00  2263 S    2  2.17s /usr/lib/unity/unity-panel-service\n  0.20   0.20   0.00   770 S    3  1.85s /usr/bin/dbus-daemon\n  0.20   0.20   0.00   722 S    1  1.14s /usr/lib/accountsservice/accounts-daemon\n  0.20   0.00   0.20 30780 S    0  2.05s /opt/google/talkplugin/GoogleTalkPlugin\n  0.20   0.20   0.00  2292 S    0  0.72s /usr/lib/x86_64-linux-gnu/indicator-messages/indicator-messages-service\n  0.20   0.20   0.00  2300 S    0  0.90s /usr/lib/x86_64-linux-gnu/indicator-sound/indicator-sound-service\n197.20 187.00  10.20 Total\n\nLoad Avg 1.75 1.14 0.90, Freq Avg. 2.90 GHz, 4 CPUs online\n3776.4 Ctxt/s, 1477.4 IRQ/s, 789.0 softIRQ/s, 0.2 new tasks/s, 3 running, 0 blocked\n  %CPU   %USR   %SYS   PID S  CPU   Time Task  (14:09:56)\n 74.80  74.80   0.00 31078 S    2  2.06m stress-ng\n 74.20  74.20   0.00 31079 R    1  2.06m stress-ng\n 18.80  16.60   2.20 31037 S    0 35.19s /usr/lib/firefox/plugin-container\n  5.00   4.40   0.60  7027 S    3 43.70s /usr/lib/thunderbird/thunderbird\n  3.00   1.40   1.60   901 S    3  8.07m /usr/bin/X\n  2.00   1.60   0.40  2250 S    2  4.00m compiz\n  1.40   0.60   0.80  2375 S    2  1.59m /usr/bin/pulseaudio\n  0.80   0.80   0.00  7134 S    3  1.94m /usr/lib/firefox/firefox\n  0.20   0.20   0.00 30774 S    0  1.05s /usr/lib/firefox/plugin-container\n  0.20   0.20   0.00 30780 S    0  2.06s /opt/google/talkplugin/GoogleTalkPlugin\n  0.20   0.00   0.20 31036 S    0  1.18s [kworker/0:2]\n  0.20   0.00   0.20 30763 S    1  3.39s [kworker/u16:1]\n  0.20   0.00   0.20 31116 R    2  0.01s ./cpustat\n181.00 174.80   6.20 Total\n\nLoad Avg 2.01 1.21 0.92, Freq Avg. 2.93 GHz, 4 CPUs online\n3227.0 Ctxt/s, 1315.4 IRQ/s, 723.0 softIRQ/s, 0.2 new tasks/s, 2 running, 0 blocked\n  %CPU   %USR   %SYS   PID S  CPU   Time Task  (14:10:01)\n 75.80  75.80   0.00 31078 S    2  2.13m stress-ng\n 74.20  74.00   0.20 31079 R    1  2.12m stress-ng\n 19.60  18.80   0.80 31037 S    0 36.17s /usr/lib/firefox/plugin-container\n  2.40   1.60   0.80   901 S    3  8.07m /usr/bin/X\n  2.20   2.00   0.20  2250 S    2  4.00m compiz\n  1.60   1.60   0.00  7027 S    3 43.78s /usr/lib/thunderbird/thunderbird\n  1.40   1.00   0.40  2375 S    2  1.59m /usr/bin/pulseaudio\n  0.60   0.60   0.00  7134 S    3  1.94m /usr/lib/firefox/firefox\n  0.20   0.00   0.20  2263 S    2  2.18s /usr/lib/unity/unity-panel-service\n  0.20   0.00   0.20     3 S    0  0.59s [ksoftirqd/0]\n178.20 175.40   2.80 Total\n\nLoad Avg 1.93 1.20 0.92, Freq Avg. 2.90 GHz, 4 CPUs online\n4781.8 Ctxt/s, 1809.4 IRQ/s, 871.8 softIRQ/s, 0.2 new tasks/s, 3 running, 0 blocked\n  %CPU   %USR   %SYS   PID S  CPU   Time Task  (14:10:06)\n 74.00  73.80   0.20 31078 S    2  2.19m stress-ng\n 72.80  72.60   0.20 31079 R    1  2.18m stress-ng\n 18.40  17.00   1.40 31037 S    0 37.09s /usr/lib/firefox/plugin-container\n  6.00   5.60   0.40  7027 S    3 44.08s /usr/lib/thunderbird/thunderbird\n  5.60   2.80   2.80   901 S    3  8.07m /usr/bin/X\n  5.00   4.00   1.00  2250 S    2  4.00m compiz\n  1.60   1.40   0.20  7134 S    3  1.94m /usr/lib/firefox/firefox\n  1.40   0.60   0.80  2375 S    2  1.59m /usr/bin/pulseaudio\n  0.60   0.60   0.00  5719 S    2 22.13s /usr/lib/gnome-terminal/gnome-terminal-server\n  0.40   0.40   0.00  2430 S    1  2.96s nautilus\n  0.20   0.20   0.00  2263 S    2  2.19s /usr/lib/unity/unity-panel-service\n  0.20   0.00   0.20     7 S    0  2.33s [rcu_sched]\n  0.20   0.00   0.20 30780 S    0  2.07s /opt/google/talkplugin/GoogleTalkPlugin\n  0.20   0.00   0.20 31036 S    0  1.19s [kworker/0:2]\n186.60 179.00   7.60 Total\n\nGrand Total (from 5 samples, 25.0 seconds):\n  %CPU   %USR   %SYS   PID S  CPU   Time Task  (14:10:06)\n 74.13  73.81   0.32 31078 S    2  2.19m stress-ng\n 73.33  73.01   0.32 31079 R    1  2.18m stress-ng\n 19.31  17.35   1.96 31037 S    0 37.09s /usr/lib/firefox/plugin-container\n  7.28   6.68   0.60  7027 S    3 44.08s /usr/lib/thunderbird/thunderbird\n  4.28   2.48   1.80   901 S    3  8.07m /usr/bin/X\n  3.24   2.68   0.56  2250 S    2  4.00m compiz\n  2.24   1.68   0.56  7134 S    3  1.94m /usr/lib/firefox/firefox\n  1.48   0.84   0.64  2375 S    2  1.59m /usr/bin/pulseaudio\n  0.60   0.00   0.60 31036 S    0  1.19s [kworker/0:2]\n  0.20   0.20   0.00  5719 S    2 22.13s /usr/lib/gnome-terminal/gnome-terminal-server\n  0.12   0.04   0.08 30780 S    0  2.07s /opt/google/talkplugin/GoogleTalkPlugin\n  0.12   0.08   0.04 30774 S    0  1.05s /usr/lib/firefox/plugin-container\n  0.12   0.08   0.04  2263 S    2  2.19s /usr/lib/unity/unity-panel-service\n  0.08   0.08   0.00  2430 S    1  2.96s nautilus\n  0.08   0.08   0.00  2177 S    3 21.25s /usr/bin/ibus-daemon\n  0.04   0.00   0.04 31116 R    2  0.01s ./cpustat\n  0.04   0.00   0.04 30763 S    1  3.39s [kworker/u16:1]\n  0.04   0.00   0.04  6852 S    3  0.24s [kworker/3:1]\n  0.04   0.00   0.04  6806 S    2 12.18s [kworker/u16:3]\n  0.04   0.04   0.00  2300 S    0  0.90s /usr/lib/x86_64-linux-gnu/indicator-sound/indicator-sound-service\n  0.04   0.04   0.00  2292 S    0  0.72s /usr/lib/x86_64-linux-gnu/indicator-messages/indicator-messages-service\n  0.04   0.04   0.00  2244 S    2  1.68s /usr/lib/unity-settings-daemon/unity-settings-daemon\n  0.04   0.04   0.00  2206 S    3  3.44s /usr/lib/ibus/ibus-ui-gtk3\n  0.04   0.04   0.00  2170 S    1  0.25s upstart-dbus-bridge\n  0.04   0.04   0.00   770 S    3  1.85s /usr/bin/dbus-daemon\n  0.04   0.04   0.00   722 S    1  1.14s /usr/lib/accountsservice/accounts-daemon\n  0.04   0.00   0.04   493 S    2  0.25s [jbd2/sda3-8]\n  0.04   0.00   0.04     7 S    0  2.33s [rcu_sched]\n  0.04   0.00   0.04     3 S    0  0.59s [ksoftirqd/0]\n187.17 179.37   7.80 Total\n\nDistribution of CPU utilisation (per Task):\n% CPU Utilisation   Count   (%)\n  0.00 -   3.79      1086  97.84\n  3.79 -   7.58         7   0.63\n  7.58 -  11.37         1   0.09\n 11.37 -  15.16         1   0.09\n 15.16 -  18.95         2   0.18\n 18.95 -  22.74         3   0.27\n 22.74 -  26.53         0   0.00\n 26.53 -  30.32         0   0.00\n 30.32 -  34.11         0   0.00\n 34.11 -  37.90         0   0.00\n 37.90 -  41.69         0   0.00\n 41.69 -  45.48         0   0.00\n 45.48 -  49.27         0   0.00\n 49.27 -  53.06         0   0.00\n 53.06 -  56.85         0   0.00\n 56.85 -  60.64         0   0.00\n 60.64 -  64.43         0   0.00\n 64.43 -  68.22         0   0.00\n 68.22 -  72.01         3   0.27\n 72.01 -  75.80         7   0.63\n\nDistribution of CPU utilisation (per CPU):\n CPU#   USR%   SYS%\n    0  17.55   2.76\n    1  73.17   0.36\n    2  77.65   1.68\n    3  11.00   3.00\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolinianking%2Fcpustat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolinianking%2Fcpustat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolinianking%2Fcpustat/lists"}