{"id":13645257,"url":"https://github.com/nakabonne/gosivy","last_synced_at":"2025-04-05T09:10:10.132Z","repository":{"id":54883998,"uuid":"308207353","full_name":"nakabonne/gosivy","owner":"nakabonne","description":"Real-time visualization tool for Go process metrics","archived":false,"fork":false,"pushed_at":"2022-03-03T14:05:42.000Z","size":1567,"stargazers_count":478,"open_issues_count":2,"forks_count":12,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-04T18:50:13.155Z","etag":null,"topics":["go","golang","monitoring","tui","visualization"],"latest_commit_sha":null,"homepage":"","language":"Go","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/nakabonne.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}},"created_at":"2020-10-29T03:28:45.000Z","updated_at":"2025-02-12T13:36:33.000Z","dependencies_parsed_at":"2022-08-14T05:40:39.770Z","dependency_job_id":null,"html_url":"https://github.com/nakabonne/gosivy","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nakabonne%2Fgosivy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nakabonne%2Fgosivy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nakabonne%2Fgosivy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nakabonne%2Fgosivy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nakabonne","download_url":"https://codeload.github.com/nakabonne/gosivy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312085,"owners_count":20918344,"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":["go","golang","monitoring","tui","visualization"],"created_at":"2024-08-02T01:02:32.228Z","updated_at":"2025-04-05T09:10:10.054Z","avatar_url":"https://github.com/nakabonne.png","language":"Go","funding_links":[],"categories":["Go","Logs and Observability"],"sub_categories":["Observability"],"readme":"# gosivy\n[![Release](https://img.shields.io/github/release/nakabonne/gosivy.svg?color=orange)](https://github.com/nakabonne/gosivy/releases/latest)\n[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white\u0026style=flat-square)](https://pkg.go.dev/mod/github.com/nakabonne/gosivy?tab=packages)\n\nAnother visualization tool for Go process metrics.\n\n![Demo](assets/demo.gif)\n\nGosivy tracks Go process's metrics and plot their evolution over time right into your terminal, no matter where it's running on. It helps you understand how your application consumes the resources.\n\n## Installation\nBinary releases are available through [here](https://github.com/nakabonne/gosivy/releases).\n\n#### macOS\n\n```\nbrew install nakabonne/gosivy/gosivy\n```\n\n#### RHEL/CentOS\n\n```\nrpm -ivh https://github.com/nakabonne/gosivy/releases/download/v0.2.0/gosivy_0.2.0_linux_$(dpkg --print-architecture).rpm\n```\n\n#### Debian/Ubuntu\n\n```\nwget https://github.com/nakabonne/gosivy/releases/download/v0.2.0/gosivy_0.2.0_linux_$(dpkg --print-architecture).deb\napt install ./gosivy_0.2.0_linux_$(dpkg --print-architecture).deb\n```\n\n#### Go\nRequired: \u003e= 1.10\n```\ngo install github.com/nakabonne/gosivy@latest\n```\n\n## Quickstart\nUnsure if Gosivy is for you? Watch Gosivy by using [the example application](https://github.com/nakabonne/gosivy/blob/main/examples/local/main.go).\n\nRun the example application:\n```\ngit clone https://github.com/nakabonne/gosivy.git \u0026\u0026 cd gosivy\ngo run examples/local/main.go\n```\n\nThen simply perform `gosivy` with no arguments (it automatically finds the process where the agent runs on):\n```\ngosivy\n```\n\nPress \u003ckbd\u003eq\u003c/kbd\u003e to quit.\n\n## Usage\nFirst up, you start the agent in the process where you want to collect statistics. Then execute `gosivy` to scrape from the agent periodically. You can diagnose processes running not only locally (local mode), but also on another host (remote mode).\n\n### Local Mode\nImport `github.com/nakabonne/gosivy/agent` into the target application to launch the agent. See the [local example](https://github.com/nakabonne/gosivy/blob/main/examples/local/main.go).\n\n```go\npackage main\n\nimport \"github.com/nakabonne/gosivy/agent\"\n\nfunc main() {\n\tif err := agent.Listen(agent.Options{}); err != nil {\n\t\tpanic(err)\n\t}\n\tdefer agent.Close()\n}\n```\n\nWith `-l` flag can list the processes where the agent runs on:\n```console\n$ gosivy -l\nPID   Exec Path\n15788 foo  /path/to/foo\n```\n\nGive the PID of the process to be diagnosed:\n```\n$ gosivy 15788\n```\n\nBe sure to start the `gosivy` process as the same user as the target application.\n\n### Remote Mode\nGive the address the agent listens on:\n```go\npackage main\n\nimport \"github.com/nakabonne/gosivy/agent\"\n\nfunc main() {\n\terr := agent.Listen(agent.Options{\n\t\tAddr: \":9090\",\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer agent.Close()\n}\n```\n\nSpecify the target's agent address accessible by the host where `gosivy` will be executed:\n```\n$ gosivy host.xz:9090\n```\n\n### Settings\nCommand-line options are:\n\n```\nUsage:\n  gosivy [flags] \u003cpid|host:port\u003e\n\nFlags:\n      --debug                      Run in debug mode.\n  -l, --list-processes             Show processes where gosivy agent runs on.\n      --scrape-interval duration   Interval to scrape from the agent. It must be \u003e= 1s (default 1s)\n  -v, --version                    Print the current version.\n```\n\nGosivy requires the config directory for pid management. By default it will be created undernearth `$HOME/.config` (`APPDATA` on windows). For those who want to assign another directory, `GOSIVY_CONFIG_DIR` environment variable is available.\n\n## Features\n\n- **Simple** - Show only minimal metrics.\n- **Pull-based monitoring** - The agent is designed to just listen on, so the target process does nothing unless you issue a request.\n- **Wherever it's running on** - Any process can be diagnosed as long as you can access the TCP socket the agent opens.\n\n## Supported Architectures\nThe architectures the agent can perform on are:\n\n- Darwin i386/amd64\n- Linux i386/amd64/arm(raspberry pi)\n- FreeBSD i386/amd64/arm\n- Windows/amd64\n- OpenBSD amd64\n- Solaris amd64\n\nThose partially supported:\n- CPU on DragonFly BSD\n- host on Linux RISC-V\n\n## Built With\n- [shirou/gopsutil](https://github.com/shirou/gopsutil)\n- [mum4k/termdash](https://github.com/mum4k/termdash)\n  - [nsf/termbox-go](https://github.com/nsf/termbox-go)\n\n## Inspired By\n- [google/gops](https://github.com/google/gops)\n- [arl/statsviz](https://github.com/arl/statsviz)\n\n\n## Author\nRyo Nakao \u003c\u003cryo@nakao.dev\u003e\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnakabonne%2Fgosivy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnakabonne%2Fgosivy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnakabonne%2Fgosivy/lists"}