{"id":31628193,"url":"https://github.com/dsave/watch-your-temps","last_synced_at":"2026-03-04T16:01:30.432Z","repository":{"id":317722218,"uuid":"1068536112","full_name":"dSave/watch-your-temps","owner":"dSave","description":"EN | RU in README. Colorized CPU \u0026 SSD temps in your terminal (lm-sensors + smartctl) via watch. Zero install, one-liner friendly.","archived":false,"fork":false,"pushed_at":"2025-10-02T16:23:56.000Z","size":18,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-10T12:21:23.849Z","etag":null,"topics":["debian","debian-linux","linux","lm-sensors","monitoring","proxmox","proxmox-ve","sensors","smartctl","temperature","temperature-control","temperature-monitor","temperature-monitoring","temperature-sensor","terminal","watch"],"latest_commit_sha":null,"homepage":"","language":null,"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/dSave.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-02T14:29:08.000Z","updated_at":"2025-10-02T19:46:50.000Z","dependencies_parsed_at":"2025-10-02T17:41:32.607Z","dependency_job_id":null,"html_url":"https://github.com/dSave/watch-your-temps","commit_stats":null,"previous_names":["dsave/watch-your-temps"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dSave/watch-your-temps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dSave%2Fwatch-your-temps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dSave%2Fwatch-your-temps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dSave%2Fwatch-your-temps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dSave%2Fwatch-your-temps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dSave","download_url":"https://codeload.github.com/dSave/watch-your-temps/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dSave%2Fwatch-your-temps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30085799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T15:40:14.053Z","status":"ssl_error","status_checked_at":"2026-03-04T15:40:13.655Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["debian","debian-linux","linux","lm-sensors","monitoring","proxmox","proxmox-ve","sensors","smartctl","temperature","temperature-control","temperature-monitor","temperature-monitoring","temperature-sensor","terminal","watch"],"created_at":"2025-10-06T20:19:38.432Z","updated_at":"2026-03-04T16:01:30.424Z","avatar_url":"https://github.com/dSave.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Watch Your Temps\n\n[English](#english) • [Русский](#русский)\n\n\u003e **Why this exists / Зачем это нужно**\n\u003e\n\u003e **EN:** I needed a quick, readable temperature view for a home Proxmox server. The raw outputs of `sensors` and `smartctl` were noisy and hard to scan in `watch`, so I made a one‑liner that renders a compact, colorized table that’s easy to scan at a glance.\n\u003e\n\u003e **RU:** Мне нужен был быстрый и наглядный мониторинг температур на домашнем сервере Proxmox. Штатные выводы `sensors` и `smartctl` перегружены и плохо читаются в `watch`, поэтому я сделал однострочник, который выводит компактную цветную таблицу, понятную с первого взгляда.\n\nColorized CPU \u0026 SSD temperatures in your terminal (`lm-sensors` + `smartctl`) via `watch`. Zero install, one‑liner friendly.\n\nЦветной и удобочитаемый вывод температур CPU и SSD в терминале (`lm-sensors` + `smartctl`) через `watch`. Не требует установки скриптов — один однострочник.\n\n\u003cimg width=\"728\" height=\"409\" alt=\"изображение\" src=\"https://github.com/user-attachments/assets/37487a68-128d-4c89-b249-25ed5b164760\" /\u003e\n\n---\n\n## English\n\n### Features\n\n* Compact, aligned table for CPU (Package \u0026 per‑core) and ACPI temp.\n* SSD current temperature (SCT), min/max lines preserved.\n* Color thresholds: green \u003c warn, yellow ≥ warn, red ≥ crit.\n* Pure one‑liner (no files, no functions), works well in `tmux` / Proxmox shell.\n\n### Requirements\n\n* Debian/Ubuntu/Proxmox‑like systems: `lm-sensors`, `smartmontools`, `bash`, `perl`.\n\nInstall dependencies on Debian/Ubuntu/Proxmox with:\n```bash\nsudo apt update \u0026\u0026 sudo apt install -y lm-sensors smartmontools\n```\n\n### Quick start (one‑liner, with degree symbol)\n\n\u003e Requires UTF‑8 locale in your terminal (see Troubleshooting below).\n\n```bash\nwatch -c -n1 --no-title bash -lc 'date \"+%F %T\"; echo \"=== CPU ===\"; sensors 2\u003e/dev/null | perl -Mstrict -Mwarnings -ne '\\''BEGIN{ printf \"%-16s %8s %8s %8s\\n\",\"Sensor\",\"Temp\",\"High\",\"Crit\" } our $in_acpi=0; if(/^Adapter:\\s*ACPI interface/){ $in_acpi=1; } elsif(/^$/){ $in_acpi=0; } if( /^(Package id \\d+|Core \\d+):.*?\\+([\\d.]+)/ ){ my($n,$t)=($1,$2); my($hi)=/high\\s*=\\s*\\+([\\d.]+)/? $1:100; my($cr)=/crit\\s*=\\s*\\+([\\d.]+)/? $1:100; my $col = ($t\u003e=95) ? \"\\e[31m\" : ($t\u003e=80) ? \"\\e[33m\" : \"\\e[32m\"; if($n =~ /^Package id/){ $n=\"CPU Package\"; printf \"%-16s ${col}\\e[1m%6.1f°C\\e[0m %7s°C %7s°C\\n\",$n,$t,$hi,$cr; print \"\\e[2m──────────────────────────────────────────────\\e[0m\\n\"; } else { printf \"%-16s ${col}%6.1f°C\\e[0m %7s°C %7s°C\\n\",$n,$t,$hi,$cr; } } elsif( $in_acpi \u0026\u0026 /^temp\\d+:\\s*\\+?([\\d.]+)/ ){ my $t=$1; my $col = ($t\u003e=75) ? \"\\e[31m\" : ($t\u003e=60) ? \"\\e[33m\" : \"\\e[32m\"; printf \"%-16s ${col}%6.1f°C\\e[0m %7s %7s\\n\",\"ACPI temp1\",$t,\"--\",\"--\"; }'\\''; echo; echo \"=== SSD /dev/sda ===\"; smartctl -l scttemp /dev/sda 2\u003e/dev/null | perl -Mstrict -Mwarnings -ne '\\''if(/Current Temperature:\\s+(\\d+)/){ my $t=$1; my $col = ($t\u003e=70) ? \"\\e[31m\" : ($t\u003e=60) ? \"\\e[33m\" : \"\\e[32m\"; printf \"%-24s ${col}%5d°C\\e[0m\\n\",\"Current Temperature:\",$t; } elsif(/Power Cycle Min\\/Max Temperature:/ || /Lifetime Min\\/Max Temperature:/){ print; }'\\'''\n```\n\n### ASCII fallback (no `°` symbol)\n\nIf your locale/font doesn’t render `°`, use the ASCII variant:\n\n```bash\nwatch -c -n1 --no-title bash -lc 'date \"+%F %T\"; echo \"=== CPU ===\"; sensors 2\u003e/dev/null | perl -Mstrict -Mwarnings -ne '\\''BEGIN{ printf \"%-16s %8s %8s %8s\\n\",\"Sensor\",\"Temp\",\"High\",\"Crit\" } our $in_acpi=0; if(/^Adapter:\\s*ACPI interface/){ $in_acpi=1; } elsif(/^$/){ $in_acpi=0; } if( /^(Package id \\d+|Core \\d+):.*?\\+([\\d.]+)/ ){ my($n,$t)=($1,$2); my($hi)=/high\\s*=\\s*\\+([\\d.]+)/? $1:100; my($cr)=/crit\\s*=\\s*\\+([\\d.]+)/? $1:100; my $col = ($t\u003e=95) ? \"\\e[31m\" : ($t\u003e=80) ? \"\\e[33m\" : \"\\e[32m\"; if($n =~ /^Package id/){ $n=\"CPU Package\"; printf \"%-16s ${col}\\e[1m%6.1fC\\e[0m %7sC %7sC\\n\",$n,$t,$hi,$cr; print \"\\e[2m──────────────────────────────────────────────\\e[0m\\n\"; } else { printf \"%-16s ${col}%6.1fC\\e[0m %7sC %7sC\\n\",$n,$t,$hi,$cr; } } elsif( $in_acpi \u0026\u0026 /^temp\\d+:\\s*\\+?([\\d.]+)/ ){ my $t=$1; my $col = ($t\u003e=75) ? \"\\e[31m\" : ($t\u003e=60) ? \"\\e[33m\" : \"\\e[32m\"; printf \"%-16s ${col}%6.1fC\\e[0m %7s %7s\\n\",\"ACPI temp1\",$t,\"--\",\"--\"; }'\\''; echo; echo \"=== SSD /dev/sda ===\"; smartctl -l scttemp /dev/sda 2\u003e/dev/null | perl -Mstrict -Mwarnings -ne '\\''if(/Current Temperature:\\s+(\\d+)/){ my $t=$1; my $col = ($t\u003e=70) ? \"\\e[31m\" : ($t\u003e=60) ? \"\\e[33m\" : \"\\e[32m\"; printf \"%-24s ${col}%5dC\\e[0m\\n\",\"Current Temperature:\",$t; } elsif(/Power Cycle Min\\/Max Temperature:/ || /Lifetime Min\\/Max Temperature:/){ print; }'\\'''\n```\n\n### Default thresholds\n\n* CPU: warn **80°C**, crit **95°C** (color applies to current temp only).\n* ACPI: warn **60°C**, crit **75°C**.\n* SSD (SATA): warn **60°C**, crit **70°C**.\n\n### Customize\n\n* Change thresholds inside the one‑liner (the numbers `80/95` and `60/75/70`).\n* Add NVMe drive: replace the SSD part with `smartctl -l scttemp,nvme /dev/nvme0` (some models expose different logs).\n\n### Troubleshooting\n\n* **Degree symbol not shown / weird characters**: ensure UTF‑8 locale and a font with `°`.\n\n  ```bash\n  locale | grep -E 'LANG|LC_CTYPE'\n  export LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8   # or ru_RU.UTF-8\n  ```\n* **No ACPI temp**: some platforms don’t expose `acpitz`; the ACPI line will simply be omitted.\n* **`smartctl` shows no SCT**: some SSDs lack SCT temperature log; use the device‑specific log or NVMe variant.\n\n\n### Light future plans\n\nIf enough people star/use it, I’ll add an optional \"full\" script with flags (`--nvme`, `--disk`, `--cpu-warn`, etc.), `-h` help and better autodetection.\n\n---\n\n[English](#english) • [Русский](#русский)\n\n## Русский\n\n### Возможности\n\n* Компактная таблица CPU (пакет и ядра) + ACPI‑температура.\n* Текущая температура SSD (SCT), строки Min/Max сохраняются.\n* Цвета: зелёный \u003c warn, жёлтый ≥ warn, красный ≥ crit.\n* Чистый однострочник — без файлов и функций, удобно для Proxmox/`tmux`.\n\n### Требования\n\n`lm-sensors`, `smartmontools`, `bash`, `perl`.\n\nУстановите зависимости в Debian/Ubuntu/Proxmox:\n```bash\nsudo apt update \u0026\u0026 sudo apt install -y lm-sensors smartmontools\n```\n\n### Быстрый старт (с символом градуса)\n\n```bash\nwatch -c -n1 --no-title bash -lc 'date \"+%F %T\"; echo \"=== CPU ===\"; sensors 2\u003e/dev/null | perl -Mstrict -Mwarnings -ne '\\''BEGIN{ printf \"%-16s %8s %8s %8s\\n\",\"Sensor\",\"Temp\",\"High\",\"Crit\" } our $in_acpi=0; if(/^Adapter:\\s*ACPI interface/){ $in_acpi=1; } elsif(/^$/){ $in_acpi=0; } if( /^(Package id \\d+|Core \\d+):.*?\\+([\\d.]+)/ ){ my($n,$t)=($1,$2); my($hi)=/high\\s*=\\s*\\+([\\d.]+)/? $1:100; my($cr)=/crit\\s*=\\s*\\+([\\d.]+)/? $1:100; my $col = ($t\u003e=95) ? \"\\e[31m\" : ($t\u003e=80) ? \"\\e[33m\" : \"\\e[32m\"; if($n =~ /^Package id/){ $n=\"CPU Package\"; printf \"%-16s ${col}\\e[1m%6.1f°C\\e[0m %7s°C %7s°C\\n\",$n,$t,$hi,$cr; print \"\\e[2m──────────────────────────────────────────────\\e[0m\\n\"; } else { printf \"%-16s ${col}%6.1f°C\\e[0m %7s°C %7s°C\\n\",$n,$t,$hi,$cr; } } elsif( $in_acpi \u0026\u0026 /^temp\\d+:\\s*\\+?([\\d.]+)/ ){ my $t=$1; my $col = ($t\u003e=75) ? \"\\e[31m\" : ($t\u003e=60) ? \"\\e[33m\" : \"\\e[32m\"; printf \"%-16s ${col}%6.1f°C\\e[0m %7s %7s\\n\",\"ACPI temp1\",$t,\"--\",\"--\"; }'\\''; echo; echo \"=== SSD /dev/sda ===\"; smartctl -l scttemp /dev/sda 2\u003e/dev/null | perl -Mstrict -Mwarnings -ne '\\''if(/Current Temperature:\\s+(\\d+)/){ my $t=$1; my $col = ($t\u003e=70) ? \"\\e[31m\" : ($t\u003e=60) ? \"\\e[33m\" : \"\\e[32m\"; printf \"%-24s ${col}%5d°C\\e[0m\\n\",\"Current Temperature:\",$t; } elsif(/Power Cycle Min\\/Max Temperature:/ || /Lifetime Min\\/Max Temperature:/){ print; }'\\'''\n```\n\n### ASCII‑вариант (без символа «°»)\n\n```bash\nwatch -c -n1 --no-title bash -lc 'date \"+%F %T\"; echo \"=== CPU ===\"; sensors 2\u003e/dev/null | perl -Mstrict -Mwarnings -ne '\\''BEGIN{ printf \"%-16s %8s %8s %8s\\n\",\"Sensor\",\"Temp\",\"High\",\"Crit\" } our $in_acpi=0; if(/^Adapter:\\s*ACPI interface/){ $in_acpi=1; } elsif(/^$/){ $in_acpi=0; } if( /^(Package id \\d+|Core \\d+):.*?\\+([\\d.]+)/ ){ my($n,$t)=($1,$2); my($hi)=/high\\s*=\\s*\\+([\\d.]+)/? $1:100; my($cr)=/crit\\s*=\\s*\\+([\\d.]+)/? $1:100; my $col = ($t\u003e=95) ? \"\\e[31m\" : ($t\u003e=80) ? \"\\e[33m\" : \"\\e[32m\"; if($n =~ /^Package id/){ $n=\"CPU Package\"; printf \"%-16s ${col}\\e[1m%6.1fC\\e[0m %7sC %7sC\\n\",$n,$t,$hi,$cr; print \"\\e[2m──────────────────────────────────────────────\\e[0m\\n\"; } else { printf \"%-16s ${col}%6.1fC\\e[0m %7sC %7sC\\n\",$n,$t,$hi,$cr; } } elsif( $in_acpi \u0026\u0026 /^temp\\d+:\\s*\\+?([\\d.]+)/ ){ my $t=$1; my $col = ($t\u003e=75) ? \"\\e[31m\" : ($t\u003e=60) ? \"\\e[33m\" : \"\\e[32m\"; printf \"%-16s ${col}%6.1fC\\e[0m %7s %7s\\n\",\"ACPI temp1\",$t,\"--\",\"--\"; }'\\''; echo; echo \"=== SSD /dev/sda ===\"; smartctl -l scttemp /dev/sda 2\u003e/dev/null | perl -Mstrict -Mwarnings -ne '\\''if(/Current Temperature:\\s+(\\d+)/){ my $t=$1; my $col = ($t\u003e=70) ? \"\\e[31m\" : ($t\u003e=60) ? \"\\e[33m\" : \"\\e[32m\"; printf \"%-24s ${col}%5dC\\e[0m\\n\",\"Current Temperature:\",$t; } elsif(/Power Cycle Min\\/Max Temperature:/ || /Lifetime Min\\/Max Temperature:/){ print; }'\\'''\n```\n\n### Пороговые значения по умолчанию\n\n* CPU: предупреждение **80°C**, критично **95°C**.\n* ACPI: предупреждение **60°C**, критично **75°C**.\n* SSD (SATA): предупреждение **60°C**, критично **70°C**.\n\n### Настройка\n\nПравьте числа в однострочнике; для NVMe используйте `smartctl -l scttemp,nvme /dev/nvme0`.\n\n### Устранение неполадок\n\n* **Не отображается символ «°» / кракозябры** — включите UTF‑8‑локаль и шрифт с символом градуса.\n\n  ```bash\n  locale | grep -E 'LANG|LC_CTYPE'\n  export LANG=ru_RU.UTF-8 LC_CTYPE=ru_RU.UTF-8  # или en_US.UTF-8\n  ```\n* **Нет ACPI‑температуры** — платформа может не экспонировать `acpitz`.\n* **Нет SCT у SSD** — устройство может не поддерживать этот лог; используйте NVMe/вендорные логи.\n\n### Небольшие планы\n\nЕсли инструмент окажется полезным, добавлю опциональную «расширенную» версию с флагами и автодетектом; создайте issue и поставьте ⭐, чтобы это ускорить.\n\n**Keywords:** lm-sensors, smartctl, terminal, watch, temperatures, Proxmox, Debian, Linux, one-liner\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsave%2Fwatch-your-temps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsave%2Fwatch-your-temps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsave%2Fwatch-your-temps/lists"}