{"id":13527008,"url":"https://github.com/branneman/current-processes","last_synced_at":"2025-04-01T09:30:56.297Z","repository":{"id":17865174,"uuid":"20796940","full_name":"branneman/current-processes","owner":"branneman","description":"Node.js library to get a snapshot of the currently running processes, OS-agnostic","archived":false,"fork":false,"pushed_at":"2022-04-07T16:09:45.000Z","size":60,"stargazers_count":97,"open_issues_count":9,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-09-24T21:55:48.276Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/branneman.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-13T08:10:06.000Z","updated_at":"2023-03-14T02:22:55.000Z","dependencies_parsed_at":"2022-09-24T19:21:40.075Z","dependency_job_id":null,"html_url":"https://github.com/branneman/current-processes","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/branneman%2Fcurrent-processes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/branneman%2Fcurrent-processes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/branneman%2Fcurrent-processes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/branneman%2Fcurrent-processes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/branneman","download_url":"https://codeload.github.com/branneman/current-processes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222328294,"owners_count":16967242,"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":[],"created_at":"2024-08-01T06:01:39.235Z","updated_at":"2024-11-02T12:30:23.675Z","avatar_url":"https://github.com/branneman.png","language":"JavaScript","readme":"# current-processes\n[![Build Status](https://travis-ci.org/branneman/current-processes.svg?branch=master)](https://travis-ci.org/branneman/current-processes)\n[![Coverage Status](https://img.shields.io/coveralls/branneman/current-processes.svg)](https://coveralls.io/r/branneman/current-processes)\n[![Dependency Status](http://img.shields.io/david/branneman/current-processes.svg)](https://david-dm.org/branneman/current-processes)\n[![npm version](https://badge.fury.io/js/current-processes.svg)](https://www.npmjs.org/package/current-processes)\n[![npm Downloads](http://img.shields.io/npm/dm/current-processes.svg)](https://www.npmjs.org/package/current-processes)\n\nNode.js library to get a snapshot of the currently running processes, OS-agnostic. Needs root/Admin permissions.\n\n## Usage example\n```js\nimport _ from 'lodash';\nimport ps from 'current-processes';\n\nps.get((err, processes) =\u003e {\n\n    const sorted = _.sortBy(processes, 'cpu');\n    const top5  = sorted.reverse().splice(0, 5);\n\n    console.log(top5);\n});\n```\n\n## Process object\nThe library will return an array consisting of multiple process objects, structured like this:\n```js\n{\n    pid: 1337,               // Process ID\n    name: 'chrome',          // Process name\n    mem: {\n        private: 23054560,   // Private memory, in bytes\n        virtual: 78923608,   // Virtual memory (private + shared libraries + swap space), in bytes\n        usage: 0.02    \t     // Used physical memory (%) by this process\n    },\n    cpu: 0.3                 // CPU usage (%) as reported by `ps` and `wmic`\n}\n```\n\n## Platform-specific notes\n### Windows\nWMI (specifically `wmic`) is used to gather the information itself. WMI is fairly slow the first time it's called, it\nmight even take up to 2-3 seconds. Make sure your app will gracefully handle this. Subsequent calls will be much faster.\n","funding_links":[],"categories":["Repository"],"sub_categories":["Process management"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbranneman%2Fcurrent-processes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbranneman%2Fcurrent-processes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbranneman%2Fcurrent-processes/lists"}