Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,34 @@ Install:
are available for most distros. Also the ps_mem.py script
can be run directly.

Windows:

The script can also be run directly on Windows with Python. The Windows
implementation uses native PSAPI/kernel32 calls through `ctypes`, so no
third-party runtime package is required:

```bat
python ps_mem.py
python ps_mem.py -p 1234 -d
```

Windows reports the current working set per process. Shared resident pages are
apportioned by the Windows page share count when the process can be queried.
If Windows denies that working-set query for a process, ps_mem falls back to
standard process memory counters and prints a best-effort total with a warning
because shared memory may be over-counted. The `-S/--swap` option is accepted
for compatibility on Windows, but it is ignored and no fake zero-valued swap
column is printed. The `-s/--split-args` option shows the full executable path
on Windows.

To build a standalone Windows executable:

```bat
python -m pip install pyinstaller
python -m PyInstaller --onefile ps_mem.py
dist\ps_mem.exe
```

Usage:

```
Expand Down
Loading