{"id":18552910,"url":"https://github.com/oderwat/gopsx","last_synced_at":"2025-08-02T02:08:40.411Z","repository":{"id":141012950,"uuid":"307865036","full_name":"oderwat/gopsx","owner":"oderwat","description":"A wrapper for gops to allow globbing patterns for the procname additionally to pids or addresses","archived":false,"fork":false,"pushed_at":"2020-10-28T02:07:55.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-24T15:30:06.494Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/oderwat.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-28T00:40:44.000Z","updated_at":"2024-08-24T23:41:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"8bf80d3a-66b2-48f4-a76a-52744d5c8b61","html_url":"https://github.com/oderwat/gopsx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oderwat/gopsx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oderwat%2Fgopsx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oderwat%2Fgopsx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oderwat%2Fgopsx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oderwat%2Fgopsx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oderwat","download_url":"https://codeload.github.com/oderwat/gopsx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oderwat%2Fgopsx/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268326560,"owners_count":24232488,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"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":[],"created_at":"2024-11-06T21:15:29.312Z","updated_at":"2025-08-02T02:08:40.364Z","avatar_url":"https://github.com/oderwat.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gopsx\n\nThis is a helper which aims to make the usage of [gops](https://github.com/google/gops) easier by allowing the usage of globbing process name patterns instead of pids. The script also can run for multiple targets at once. See below for examples.\n\nIt was implemented in a way that it can either being build as executable or run like a shell script by making it executable and put it into your path. I created a `Makefile` which lets me either install the binary, the script, or a linked version of the script and calling them all with `gopsx` from the shell.\n\nThe installation can be done with\n\n* Using `go get https://github.com/oderwat/gopsx` to install the binary.\n* Downloading the raw code of the script, place it into the path, and make it executable (and maybe do more, see the `Makefile`).\n* Get the source and use the Makefile like `make linked` or `make script`. Both use `~/bin/` as the installation path. So you may need to adapt it.\n\nAll of them need a working Go compiler, which you pretty much have installed when you are interested in `gops` anyway.\n\nThe calling syntax is the same as `gops` but you can replace the `pid` parameter with a globbing pattern. If there are multiple matches `goplx` will list them and you can either select one of them by using the ordinal number like `s*@1` or `s*@2`. This will call `gops` for this process. Or you can use another `*` like in `s*@*` to run `gops` once for each PID. As not every process has the agent running and most commands need the agent you can also use `+` to just select everything which runs the agent like `s*@+` which would only run `gops` on processes which name start with `s` and have the agent running.\n\nExamples:\n\n```bash\n# listing all Go processes as with gops\ngopsx\n\n# listing all Go processes and present a list if you have more as one\ngopsx \\*\n\n# listing all Go processes and run gops as if you called it for every running go process pid\ngopsx \\*@*\n\n# running gops on the second instance of syncthing\ngopsx syncthing@2\n\n# listing all Go processes which have a gops agent included and run gops as if you called it for every running go process pid\ngopsx \\*@+\n\n# running the gops commnand stats on all Go processes which have an agent\ngopsx stats \\*@+\n\n# listing pids of all your minio servers\ngopsx pid minio@*\n\n# showing a stack trace for your app named \"simpleserver\"\ngopsx trace simpleserver\n```\n\nThe last example is the reason why I wrote this helper. It was annoying to get the PID for my process on each new test run. So I wrote a shell script to get the PID. I found that useful and wanted to share it with others. But a bash script is not a lot of fun, so I decided to write an enhanced version and also try out what needs to be done for using Go as a scripting tool for my needs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foderwat%2Fgopsx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foderwat%2Fgopsx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foderwat%2Fgopsx/lists"}