{"id":13735850,"url":"https://github.com/johnscillieri/psutil-nim","last_synced_at":"2025-12-27T17:40:48.340Z","repository":{"id":13037350,"uuid":"71719811","full_name":"johnscillieri/psutil-nim","owner":"johnscillieri","description":"Port of python psutil to nim","archived":false,"fork":false,"pushed_at":"2022-03-18T13:19:55.000Z","size":468,"stargazers_count":59,"open_issues_count":5,"forks_count":21,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-04T03:05:36.372Z","etag":null,"topics":["nim","psutil","psutil-nim"],"latest_commit_sha":null,"homepage":null,"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/johnscillieri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"custom":"https://liberapay.com/juancarlospaco/donate"}},"created_at":"2016-10-23T17:58:50.000Z","updated_at":"2024-07-10T16:34:12.000Z","dependencies_parsed_at":"2022-08-07T07:00:57.345Z","dependency_job_id":null,"html_url":"https://github.com/johnscillieri/psutil-nim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnscillieri%2Fpsutil-nim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnscillieri%2Fpsutil-nim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnscillieri%2Fpsutil-nim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnscillieri%2Fpsutil-nim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnscillieri","download_url":"https://codeload.github.com/johnscillieri/psutil-nim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224732131,"owners_count":17360416,"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":["nim","psutil","psutil-nim"],"created_at":"2024-08-03T03:01:12.060Z","updated_at":"2025-12-27T17:40:48.289Z","avatar_url":"https://github.com/johnscillieri.png","language":"Nim","readme":"# Psutil-Nim\n\n\u003e Port of Python [psutil](https://github.com/giampaolo/psutil) to Nim.\n\n![](https://img.shields.io/github/languages/top/juancarlospaco/psutil-nim?style=for-the-badge)\n![](https://img.shields.io/github/languages/count/juancarlospaco/psutil-nim?logoColor=green\u0026style=for-the-badge)\n![](https://img.shields.io/github/stars/juancarlospaco/psutil-nim?style=for-the-badge \"Star psutil-nim on GitHub!\")\n![](https://img.shields.io/maintenance/yes/2020?style=for-the-badge)\n![](https://img.shields.io/github/languages/code-size/juancarlospaco/psutil-nim?style=for-the-badge)\n![](https://img.shields.io/github/issues-raw/juancarlospaco/psutil-nim?style=for-the-badge \"Bugs\")\n![](https://img.shields.io/github/issues-pr-raw/juancarlospaco/psutil-nim?style=for-the-badge \"PRs\")\n![](https://img.shields.io/github/commit-activity/y/juancarlospaco/psutil-nim?style=for-the-badge)\n![](https://img.shields.io/github/last-commit/juancarlospaco/psutil-nim?style=for-the-badge \"Commits\")\n\n**Pull requests with bug fixes and support for other platforms are welcome!**\n\n\n## Table of Contents\n\n- [Background](#background)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Background\n\nI love Python and [psutil](https://github.com/giampaolo/psutil) but bundling a Python app is a pain.\nHaving a psutil library in Nim seemed like the logical next step.\n\n## Install\n\n- ` nimble install psutil`\n\nThis package works Ok as of Nim `1.0.6`. Pull requests welcome.\n\n\n## Usage\n\nJust some basic usage below until I get the example apps working and can mirror\nwhat's in psutil's documentation. Take a look at the scripts folder for some\nbasic examples as well.\n\n```nim\nimport psutil\n\necho net_if_addrs()\necho boot_time()\necho users()\n```\n\n\n## Troubleshooting\n\nIf you are running on CentOS or RedHat you may or may not find errors with the Network related functions,\ncomplaining about missing Linux C Headers `sockios.h` to Compile,\nthis is not a Bug on the code but that Distro not having development libraries or having too old versions of it.\n\nYou can try installing the package `kernel-headers` for CentOS/RedHat,\nto see if that fixes the problem about missing libraries.\n\nIf you know how to fix that Distro-specific detail feel free to send pull requests.\n\nThe failing functions are:\n\n```nim\nnet_io_counters()\nper_nic_net_io_counters()\nnet_if_stats()\nnet_connections()\n```\n\nYou can workaround by using [Distros module](https://nim-lang.org/docs/distros.html#Distribution):\n\n```nim\nwhen not detectOs(CentOS):\n  # Do something here with the Network functions.\n  echo net_io_counters()\n  echo per_nic_net_io_counters()\n  echo net_if_stats()\n  echo net_connections()\n```\n\n\n# Stars\n\n![Star psutil-nim on GitHub](https://starchart.cc/juancarlospaco/psutil-nim.svg \"Star psutil-nim on GitHub!\")\n\n\n## Contribute\n\nPRs accepted! Adding a single function to any platform is a huge help and can usually be done with less than an hour of work.\n\n#### License\n\n- MIT\n","funding_links":["https://liberapay.com/juancarlospaco/donate"],"categories":["Operating System"],"sub_categories":["Processes"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnscillieri%2Fpsutil-nim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnscillieri%2Fpsutil-nim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnscillieri%2Fpsutil-nim/lists"}