{"id":30065218,"url":"https://github.com/basil/ptools","last_synced_at":"2026-03-03T23:11:57.486Z","repository":{"id":308624280,"uuid":"1033489350","full_name":"basil/ptools","owner":"basil","description":"ptools is collection of Linux utilities for inspecting the state of processes, modeled after the tools by the same name which exist on Solaris/illumos.","archived":false,"fork":false,"pushed_at":"2026-02-27T01:15:19.000Z","size":1291,"stargazers_count":1,"open_issues_count":44,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-27T01:41:04.579Z","etag":null,"topics":["linux","pargs","pauxv","pcred","penv","pfiles","pgrep","pkill","pldd","pmap","process","procfs","prun","pstack","pstop","ptime","ptools","ptree","pwait","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/ptools","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/basil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-08-06T22:35:27.000Z","updated_at":"2026-02-27T01:15:22.000Z","dependencies_parsed_at":"2025-08-07T00:22:46.300Z","dependency_job_id":"6813f0df-bb3a-47cf-8d83-fe01d95b0343","html_url":"https://github.com/basil/ptools","commit_stats":null,"previous_names":["basil/ptools"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/basil/ptools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basil%2Fptools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basil%2Fptools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basil%2Fptools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basil%2Fptools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basil","download_url":"https://codeload.github.com/basil/ptools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basil%2Fptools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30063372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["linux","pargs","pauxv","pcred","penv","pfiles","pgrep","pkill","pldd","pmap","process","procfs","prun","pstack","pstop","ptime","ptools","ptree","pwait","rust"],"created_at":"2025-08-08T05:50:00.418Z","updated_at":"2026-03-03T23:11:57.469Z","avatar_url":"https://github.com/basil.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ptools\n\nThis repository contains a collection of Linux utilities for inspecting the\nstate of processes, inspired by the tools of the same name on Solaris/illumos.\n\n## Getting Started\n\nTo build `ptools`, run the following commands on an Ubuntu 24.04 or newer\nsystem:\n\n```shell\n$ git clone https://github.com/basil/ptools.git\n$ cd ptools/\n$ curl https://sh.rustup.rs -sSf | sh\n$ cargo build\n```\n\nYou can run the utilities from the `target/debug` directory, for example:\n\n```shell\n$ ./target/debug/ptree 1\n```\n\nTo install `ptools` system-wide:\n\n```shell\n$ cargo install cargo-deb\n$ cargo deb\n$ sudo apt install ./target/debian/ptools_0.1.0_amd64.deb\n```\n\n\n## Code Coverage\n\nThe CI build workflow collects and prints coverage results by default on every run.\n\nFor local coverage collection without extra Rust components, you can run:\n\n```shell\n$ rm -rf target/coverage \u0026\u0026 mkdir -p target/coverage\n$ RUSTFLAGS='-C instrument-coverage' cargo build --bins\n$ RUSTFLAGS='-C instrument-coverage' \\\n  LLVM_PROFILE_FILE='target/coverage/ptools-%p-%m.profraw' \\\n  cargo test --tests\n$ llvm-profdata merge -sparse target/coverage/*.profraw -o target/coverage/ptools.profdata\n$ llvm-cov report --ignore-filename-regex='/(\\.cargo/registry|rustc)/' \\\n  --instr-profile=target/coverage/ptools.profdata \\\n  target/debug/pargs --object target/debug/penv --object target/debug/pfiles \\\n  --object target/debug/ptree\n$ llvm-cov export --format=lcov --instr-profile=target/coverage/ptools.profdata \\\n  target/debug/pargs --object target/debug/penv --object target/debug/pfiles \\\n  --object target/debug/ptree \u003e target/coverage/lcov.info\n```\n\nThe integration tests in `tests/` execute ptools binaries via\n`tests/common::run_ptool`, so make sure the `target/debug/\u003ctool\u003e` binaries are\ninstrumented (the `cargo build --bins` step above does that).\n\n`tests/pfiles_test::pfiles_resolves_socket_metadata_for_target_net_namespace` is an\nend-to-end regression check for socket resolution across network namespaces. It\nuses `unshare --net` to run an example process in a separate net namespace and\nverifies `pfiles` still resolves socket metadata via `/proc/\u003cpid\u003e/net/*`. In\nenvironments where unprivileged net namespace creation is blocked, the test\nself-skips and prints the reason.\n\n## Why ptools?\n\nLinux already has a number of mechanisms which can be used to inspect the state\nof processes (the `/proc` filesystem, `ps`, `lsof`, etc.). Why add a new set of\ntools?\n\nThe main advantage of ptools is consistency. The utilities provided by ptools\nare consistently named and have a consistent interface. Also, significantly,\nthey can be run against core dumps where applicable, providing a uniform way to\nexamine live processes and core dumps. This is very useful for those who rely\nheavily on core dumps to do postmortem debugging. The goal of this project is to\nmake this same consistent debugging experience available on Linux.\n\n## Current State\n\nThe following utilities are currently available:\n\n| Command     | Description                                                                                      |\n| ----------- | ------------------------------------------------------------------------------------------------ |\n| `pfiles(1)` | Show the open files and sockets of the process, as well as their corresponding file descriptors |\n| `pargs(1)`  | Show the command line arguments passed to the process                                           |\n| `penv(1)`   | Show the environment of the process                                                             |\n| `ptree(1)`  | Show the process tree containing the process                                                    |\n\nThere are a number of other commands available on Solaris/illumos which have not\nbeen implemented here yet, perhaps most notably `pstack`. Also, support for\nexamining core dumps has not yet been implemented.\n\n## Contributing\n\nWe welcome contributions! To contribute:\n\n1. Fork the repository.\n2. Create your feature or bugfix branch and make changes.\n3. Add tests for your code.\n4. Open a pull request.\n\n## Reporting Issues\n\nPlease report bugs or request features via the [GitHub Issues\npage](https://github.com/basil/ptools/issues).\n\n## License\n\nThis project is licensed under the Apache License, Version 2.0. See the\n[LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasil%2Fptools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasil%2Fptools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasil%2Fptools/lists"}