{"id":18597310,"url":"https://github.com/wiremoons/cputemp","last_synced_at":"2026-03-19T05:16:32.396Z","repository":{"id":83457279,"uuid":"300972693","full_name":"wiremoons/cputemp","owner":"wiremoons","description":"Linux CPU temperature display command line interface tool.","archived":false,"fork":false,"pushed_at":"2021-02-06T17:26:48.000Z","size":44,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-17T23:44:40.125Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ada","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wiremoons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-10-03T20:25:31.000Z","updated_at":"2023-09-22T16:50:11.000Z","dependencies_parsed_at":"2023-04-17T06:16:46.852Z","dependency_job_id":null,"html_url":"https://github.com/wiremoons/cputemp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiremoons%2Fcputemp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiremoons%2Fcputemp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiremoons%2Fcputemp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiremoons%2Fcputemp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wiremoons","download_url":"https://codeload.github.com/wiremoons/cputemp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254538539,"owners_count":22087884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-07T01:27:38.771Z","updated_at":"2025-10-29T20:45:00.330Z","avatar_url":"https://github.com/wiremoons.png","language":"Ada","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/hyperium/hyper/master/LICENSE) ![cputemp](https://github.com/wiremoons/cputemp/workflows/cputemp/badge.svg?branch=main) [![Alire](https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/alire-badge.json)](https://alire.ada.dev/)\n\n# cputemp\n\nA command line (CLI) utility program to display a Linux computers CPU \ntemperature. Program is called (very unimaginatively): '**cputemp**'.\n\nThe program is written in [Ada](https://www.adacore.com/about-ada).\n\nThe program currently **only works on Linux based operating systems** as it uses the `/proc` \nfile system to obtain the current CPU temperature. This file system does not \nexists on other operating systems (ie Windows/macOS/etc) so hence the limitation.\n\n\n## Programs Purpose\n\nA similar program was written other languages to check up on the current \ntemperature of a couple of Raspberry Pi 4B computers. \n\nI already had a similar tool written in C called \n[rpi-temp](https://github.com/wiremoons/rpi-temp). \nThis however only works with the Raspbian version of Linux, so did not work \nwhen I transitioned to run my Raspberry Pis on the *Ubuntu 64bit ARM Linux releases. \n\nSo I re-created the program so that worked with any Debian based Linux, such as Debian, \nUbuntu, and Raspbian etc. It also works with other non Raspberry Pi computers too,\nas long as they are using Linux as their operating system (OS). \n\nI re-wrote the program using [Ada](https://www.adacore.com/about-ada) as way to \nhelp learn the language.\n\n\n## Using the Program\n\nWhen run, the command outputs the following information, that shows the \nhostname it ran on, and the current CPU temperature in degrees centigrade \n(ie Celsius):\n```\n'pavimoons' CPU =\u003e 45.0 °C\n```\n\nThe tool is most often used with `ssh` to cycle through the different computers \non my network, and output each of their current CPU temperatures to screen. \nThis is done by first creating a bash shell alias, and saving it in the \n`~/.bash_aliases` file.  The alias I use is below, which connects to three diferent \nRPi computers, and executes `cputemp` which is located in the provided path:\n\n```bash\nalias alltemps='ssh -q simon@pi4server.local ~/GenIsys-Pi4/assets/cputemp \u0026\u0026 ssh -q simon@pi4moons.local ~/GenIsys-Pi4/assets/cputemp \u0026\u0026 ssh -q simon@pi4mobi.local ~/GenIsys-Pi4/assets/cputemp'\n```\n\nWhen the above bash alias is run with the command `alltemps` the output is \nas follows:\n\n```\n'pi4server' CPU =\u003e 39.4 °C\n'pi4moons' CPU =\u003e 38.0 °C\n'pi4mobi' CPU =\u003e 38.9 °C\n'pihole' CPU =\u003e 36.5 °C\n```\n\nThe tool also has a brief help output obtained with the command: `cputemp -h` \nor `cputemp --help`:\n\n```\nProgram displays the current CPU temperature (Linux only).\nUsage: cputemp [switches]\n\n -h, --help    Show command line usage for application\n -v, --version Show version details\n\nExit following display of help message.\n```\n\nAs indicated by the above help screen output, the version information for the \nprogram can also be checked with the command: `cputemp -v` or `cputemp --version`:\n\n```\n'cputemp' is version: '1.0.2' running on: 'Ubuntu 20.04.1 LTS' with 4 CPU cores.\nCompiled on: 2021-01-03 @ 09:55:48.\nCopyright (c) 2020 Simon Rowe.\n\nAda source built as 'release' using GNU GNAT complier version: '9.3.0'.\n\nFor licenses and further information visit:\n - https://github.com/wiremoons/cputemp/\n\nAll is well.\n```\n\n## Pre-Compiled Versions\n\nPre-compiled binary versions for are available for download via the '**Releases**' page \nhere: [https://github.com/wiremoons/cputemp/releases/](https://github.com/wiremoons/cputemp/releases/).\n\n\n## Building 'cputemp'\n\nAda supports many operating systems and hardware platforms, but this particular \nprogram will only work on a Linux based system as it uses the `/proc` file \nsystem to obtain the current CPU temperature.\n\nTo build '`cputemp`' from source on a Linux based system, the following steps \ncan be used:\n\n1. Install an Ada compiler and supporting libraries. More information on installing \nAda can be found here: [Get Ada](http://www.getadanow.com/).\n2. Once Ada is installed on your system, you can clone this GitHub repo with \nthe `git` command: `git clone https://github.com/wiremoons/cputemp.git`\n3. Then in the cloned code directory for `cputemp` use `gprbuild` to build a \nrelease version of `cputemp` with the command: `gprbuild -XBUILD=release`. \nOther `gprbuild` build commands include a debug build: `gprbuild -XBUILD=debug`. \nAlternatively, the new (in beta) [Alire](https://alire.ada.dev/) package manager \ncan also support the build as well using the `alr` binary (eg `alr build` and `alr run`).\n4. The compiled binary of `cputemp` can now be found in the `./bin` sub \ndirectory. Just copy it somewhere in your path, and it should work when run.\n\n**NOTE:** The build is statically compiled - so the program should run when moved \nto a similar CPU based Linux system, without the Ada standard libraries being \ninstalled as additional dependencies. The binary should also run in container \nsuch as '*Docker*' - although I have not test this.\n\n## License\n\nThe application is provided under the MIT open source license. A copy of the \nMIT license file is [here](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiremoons%2Fcputemp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiremoons%2Fcputemp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiremoons%2Fcputemp/lists"}