Name | osmem JSON |
Version |
0.3.1
JSON |
| download |
home_page | None |
Summary | Shows memory usage information for process trees |
upload_time | 2024-06-05 13:16:53 |
maintainer | None |
docs_url | None |
author | jojje |
requires_python | <4,>=3.9 |
license | GPLv2 |
keywords |
memory
ps
process
top
tree
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# osmem
Shows memory usage information for process trees
## Usage
Find out the top-n types of processes consuming most memory.
```
> osmem top -n 3
PID Aggregate Process
----- --------- --------------------
1516 12582 MB firefox.exe
3408 9048 MB Code.exe
4432 3627 MB cmdagent.exe
```
Aggregates all processes with the same name, which makes it a whole lot easier to understand just how
much memory all those tabs one forgets to close in firefox/chrome actually consume.
Get a break-down of all the processes on the system, how much memory each process consumes, and how the
memory usage aggregates up through the process hierarchy.
```
> osmem tree
PID Aggregate Memory Process
----- --------- ------- --------------------
0 12 MB 0 MB System Idle Process
4 12 MB 0 MB System
800 1 MB smss.exe
3216 10 MB MemCompression
168 0 MB
276 119 MB Registry
688 11 MB 4 MB cmd.exe
1500 6 MB conhost.exe
920 5496 MB 1 MB wininit.exe
1088 5482 MB 7 MB services.exe
8 5 MB svchost.exe
1144 5 MB svchost.exe
...
```
Since some processes are spawned several times with the same name, it may be beneficial to see the actual
command line arguments for each process. For instance, "svchost" on windows or "sshd" / "bash" /
"docker-proxy" on linux say very little about the _specific_ nature of such a process.
```
> osmem tree -c
PID Aggregate Memory Process Command
----- --------- ------- ------------------- --------------------
0 12 MB 0 MB System Idle Process
4 12 MB 0 MB System
800 1 MB smss.exe \SystemRoot\System32\smss.exe
3216 10 MB MemCompression
168 0 MB
276 119 MB Registry
688 11 MB 4 MB cmd.exe C:\Windows\System32\cmd.exe
1500 6 MB conhost.exe \??\C:\Windows\system32\conhost.exe 0x4
920 5498 MB 1 MB wininit.exe wininit.exe
1088 5484 MB 8 MB services.exe C:\Windows\system32\services.exe
8 5 MB svchost.exe C:\Windows\system32\svchost.exe -k LocalSystemNetworkRestricted -p
1144 4 MB svchost.exe C:\Windows\system32\svchost.exe -k LocalService -p -s nsi
...
```
```
$ osmem tree -c
PID Aggregate Memory Process Command
----- --------- ------ ------------------- --------------------
1 941 MB 11 MB systemd /sbin/init
369 46 MB systemd-journald /lib/systemd/systemd-journald
408 7 MB systemd-udevd /lib/systemd/systemd-udevd
501 4 MB rpcbind /sbin/rpcbind -f -w
...
```
For *nix users, this is somewhat similar to `ps -wwef` but gets you the memory usage as well, and the memory aggregation.
## Development
To execute the main function of the programs, either of the following options are viable
* `osmem` as a CLI
* `python -m osmem` as a python package
To simplify development, common actions are provided via [Makefile](Makefile) targets:
* test - default targets, runs pytest on the project
* lint - performs flake8 and mypy linting
* build - create a wheel package distribution, ready to be shared with someone else.
* clean - removes temporary files generated as part of the package creation.
Raw data
{
"_id": null,
"home_page": null,
"name": "osmem",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.9",
"maintainer_email": null,
"keywords": "memory, ps, process, top, tree",
"author": "jojje",
"author_email": "tinjon+pypi@gmail.com",
"download_url": null,
"platform": null,
"description": "# osmem\n\nShows memory usage information for process trees\n\n## Usage\n\nFind out the top-n types of processes consuming most memory.\n```\n> osmem top -n 3\n\n PID Aggregate Process\n----- --------- --------------------\n 1516 12582 MB firefox.exe\n 3408 9048 MB Code.exe\n 4432 3627 MB cmdagent.exe\n```\nAggregates all processes with the same name, which makes it a whole lot easier to understand just how \nmuch memory all those tabs one forgets to close in firefox/chrome actually consume.\n\nGet a break-down of all the processes on the system, how much memory each process consumes, and how the\nmemory usage aggregates up through the process hierarchy.\n```\n> osmem tree\n\n PID Aggregate Memory Process\n----- --------- ------- --------------------\n 0 12 MB 0 MB System Idle Process\n 4 12 MB 0 MB System\n 800 1 MB smss.exe\n 3216 10 MB MemCompression\n 168 0 MB\n 276 119 MB Registry\n 688 11 MB 4 MB cmd.exe\n 1500 6 MB conhost.exe\n 920 5496 MB 1 MB wininit.exe\n 1088 5482 MB 7 MB services.exe\n 8 5 MB svchost.exe\n 1144 5 MB svchost.exe\n...\n```\n\nSince some processes are spawned several times with the same name, it may be beneficial to see the actual\ncommand line arguments for each process. For instance, \"svchost\" on windows or \"sshd\" / \"bash\" /\n\"docker-proxy\" on linux say very little about the _specific_ nature of such a process.\n\n```\n> osmem tree -c\n\n PID Aggregate Memory Process Command\n----- --------- ------- ------------------- --------------------\n 0 12 MB 0 MB System Idle Process\n 4 12 MB 0 MB System\n 800 1 MB smss.exe \\SystemRoot\\System32\\smss.exe\n 3216 10 MB MemCompression\n 168 0 MB\n 276 119 MB Registry\n 688 11 MB 4 MB cmd.exe C:\\Windows\\System32\\cmd.exe\n 1500 6 MB conhost.exe \\??\\C:\\Windows\\system32\\conhost.exe 0x4\n 920 5498 MB 1 MB wininit.exe wininit.exe\n 1088 5484 MB 8 MB services.exe C:\\Windows\\system32\\services.exe\n 8 5 MB svchost.exe C:\\Windows\\system32\\svchost.exe -k LocalSystemNetworkRestricted -p\n 1144 4 MB svchost.exe C:\\Windows\\system32\\svchost.exe -k LocalService -p -s nsi\n...\n```\n\n```\n$ osmem tree -c\n\n PID Aggregate Memory Process Command\n----- --------- ------ ------------------- --------------------\n 1 941 MB 11 MB systemd /sbin/init\n 369 46 MB systemd-journald /lib/systemd/systemd-journald\n 408 7 MB systemd-udevd /lib/systemd/systemd-udevd\n 501 4 MB rpcbind /sbin/rpcbind -f -w\n...\n```\n\nFor *nix users, this is somewhat similar to `ps -wwef` but gets you the memory usage as well, and the memory aggregation.\n\n## Development\n\nTo execute the main function of the programs, either of the following options are viable\n\n* `osmem` as a CLI\n* `python -m osmem` as a python package\n\nTo simplify development, common actions are provided via [Makefile](Makefile) targets:\n\n* test - default targets, runs pytest on the project\n* lint - performs flake8 and mypy linting\n* build - create a wheel package distribution, ready to be shared with someone else.\n* clean - removes temporary files generated as part of the package creation.\n",
"bugtrack_url": null,
"license": "GPLv2",
"summary": "Shows memory usage information for process trees",
"version": "0.3.1",
"project_urls": null,
"split_keywords": [
"memory",
" ps",
" process",
" top",
" tree"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "51a42a8091bb8ada4f2aea6ebbd39cc847dbcab497fe87cc2919bb50e78b5474",
"md5": "c1d8905208e53e6055a494cc0a7674a6",
"sha256": "63f9c22c43ef4d456bb0384ec5f9b4a58cc4dc068a92b189b7a8023ad79bc80e"
},
"downloads": -1,
"filename": "osmem-0.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c1d8905208e53e6055a494cc0a7674a6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.9",
"size": 15082,
"upload_time": "2024-06-05T13:16:53",
"upload_time_iso_8601": "2024-06-05T13:16:53.844087Z",
"url": "https://files.pythonhosted.org/packages/51/a4/2a8091bb8ada4f2aea6ebbd39cc847dbcab497fe87cc2919bb50e78b5474/osmem-0.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-05 13:16:53",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "osmem"
}