{"id":13522477,"url":"https://github.com/inv2004/ttop","last_synced_at":"2025-04-09T17:55:25.588Z","repository":{"id":65029884,"uuid":"479851257","full_name":"inv2004/ttop","owner":"inv2004","description":"System monitoring tool with historical data service, triggers and top-like TUI","archived":false,"fork":false,"pushed_at":"2024-11-02T20:29:10.000Z","size":399,"stargazers_count":346,"open_issues_count":1,"forks_count":5,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-31T22:34:06.877Z","etag":null,"topics":["cli","linux","monitoring","top","tui"],"latest_commit_sha":null,"homepage":"","language":"Nim","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/inv2004.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":"2022-04-09T21:50:31.000Z","updated_at":"2025-03-27T01:43:04.000Z","dependencies_parsed_at":"2023-10-14T21:24:31.370Z","dependency_job_id":"6b9d1f1a-5cc3-45cc-87e8-050fa2b73e60","html_url":"https://github.com/inv2004/ttop","commit_stats":null,"previous_names":[],"tags_count":62,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inv2004%2Fttop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inv2004%2Fttop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inv2004%2Fttop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inv2004%2Fttop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inv2004","download_url":"https://codeload.github.com/inv2004/ttop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248083590,"owners_count":21045122,"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":["cli","linux","monitoring","top","tui"],"created_at":"2024-08-01T06:00:47.750Z","updated_at":"2025-04-09T17:55:25.571Z","avatar_url":"https://github.com/inv2004.png","language":"Nim","readme":"[![Build](https://github.com/inv2004/ttop/actions/workflows/build.yaml/badge.svg)](https://github.com/inv2004/ttop/actions/workflows/build.yaml)\n[![GitHub release (with filter)](https://img.shields.io/github/v/release/inv2004/ttop)](https://github.com/inv2004/ttop/releases/latest)\n[![AUR version](https://img.shields.io/aur/version/ttop)](https://aur.archlinux.org/packages/ttop)\n[![Github All Releases](https://img.shields.io/github/downloads/inv2004/ttop/total.svg)](https://github.com/inv2004/ttop/releases/latest)\n\n# ```ttop```\n\nSystem monitoring tool with historical data service, triggers and top-like TUI\n\n![image](.github/images/screen.png)\n\n\n- [x] Saving historical snapshots via systemd.timer or crontab\n      \n    * It is the main diff from `htop`, `top`, `btop` and etc\n\n- [x] Scroll via historical data\n- [x] External triggers (for notifications or other needs)\n- [x] Ascii graph of historical stats (via https://github.com/Yardanico/asciigraph)\n      \n   * by default you see full day on the chart, see the moment of the spike and move into it for a detailed analysis\n\n- [x] TUI with critical values highlights\n- [x] Group by program\n- [x] Search filters: `@u` - user u, `#d` - docker d\n- [x] Temperature via `sysfs`\n- [x] User-space only, doesn't require root permissions\n- [x] Docker-related info\n- [x] Threads tree\n- [x] Static build\n\n## Install\n\n### Arch/AUR\n```bash\nyay -S ttop             # enables systemd.timers automatically\n```\n\n### Static binary (x86-64)\n\n```bash\ncurl -LO https://github.com/inv2004/ttop/releases/latest/download/ttop \\\n\u0026\u0026 chmod +x ttop\n```\n\n```bash\nmv ttop ~/.local/bin/   # add into PATH if necessary\nttop --on               # Optional: enable data collector in user's systemd.timers or crontab\n```\n\n### Uninstall\n```bash\nttop --off\nrm ~/.local/bin/ttop\n```\n\n### Build from source\n```bash\ncurl https://nim-lang.org/choosenim/init.sh -sSf | sh    # Nim setup from nim-lang.org\n\ngit clone https://github.com/inv2004/ttop\ncd ttop\nnimble -d:release build\n```\n\n### Triggers / Notifications\n* stmp support was removed in prev version by the reason that static binary with ssl is more that 3Mb\n\nFrom v0.8.1 you can trigger external tool, for example curl, to send notifications\n\n![image](https://user-images.githubusercontent.com/4949069/215402008-eb0325f9-3e6e-4908-a6aa-d7b3b64f09db.png)\n\n### Config example\n`~/.config/ttop/ttop.toml` or `/etc/ttop.toml`\n\n#### My own server's config\n\n```toml\n[[trigger]]\ncmd = \"$HOME/.local/bin/tel.sh\"\n```\n\n#### Config with all parameters described\n\n* if you need it\n\n```toml\n# light = false            # set true for light term (default = false)\n\n# refresh_timeout = 1000   # TUI refresh timeout\n\n# docker = \"/var/run/docker.sock\"   # docker's socket path\n\n# [data]\n# path = \"/var/log/ttop\" # custom storage path (default = if exists /var/log/ttop, else ~/.cache/ttop )\n\n# Trigger is any external script or command which receives text from ttop into stdin + some envs\n[[trigger]]              # telegram example\non_alert = true          # execute trigger on alert (true if no other on_* provided)\non_info = true           # execute trigger without alert (default = false)\ndebug = false            # output stdout/err from cmd (default = false)\ncmd = '''\nread -d '' TEXT\ncurl -X POST \\\n  -H 'Content-Type: application/json' \\\n  -d \"{\\\"chat_id\\\": $CHAT_ID, \\\"text\\\": \\\"$TEXT\\\", \\\"disable_notification\\\": $TTOP_INFO}\" \\\n  https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage\n'''\n\n# cmd receives text from stdin. The following env vars are set:\n#   TTOP_ALERT (true|false) - if alert\n#   TTOP_INFO  (true|false) - opposite to alert\n#   TTOP_TYPE  (alert|info) - trigger type\n#   TTOP_HOST               - host name\n# you can find your CHAT_ID by send smth to your bot and run:\n#    curl https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getUpdates\n\n[[trigger]]               # smtp example\ncmd = '''\nread -d '' TEXT\nTEXT=\"Subject: ttop $TTOP_TYPE from $TTOP_HOST\n\n$TEXT\"\necho \"$TEXT\" | curl --ssl-reqd \\\n  --url 'smtps://smtp.gmail.com:465' \\\n  --user 'login:password' \\\n  --mail-from 'from@gmail.com' \\\n  --mail-rcpt 'to@gmail.com' \\\n  --upload-file -\n'''\n```\n","funding_links":[],"categories":["\u003ca name=\"monitor-top\"\u003e\u003c/a\u003eProcess viewers and monitoring (alternatives to top)","Table of Contents"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finv2004%2Fttop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finv2004%2Fttop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finv2004%2Fttop/lists"}