Virtual memory, RAM, CPU usage by system or process
To use this package, run the following command in your project's root directory:
Put the following dependency into your project's dependences section:
This package provides sub packages which can be used individually:
resusage:totalusage - A minimal D application.
resusage:processusage - A minimal D application.
resusage:cpuwatcher - A minimal D application.
Obtaining of virtual memory, RAM and CPU usage by the whole system or by single process.
Currently works on Linux and Windows.
dub build --build=docs
dub build --build=ddox
Prints total amount of virtual and physical memory and their current usage in the system, in bytes.
dub run resusage:totalusage
Prints amount of virtual and physical memory used by process.
dub run resusage:processusage -- `pidof process`
Watch system CPU time:
dub run resusage:cpuwatcher
Watch process CPU time:
dub run resusage:cpuwatcher -- `pidof process`
Platform notes and implementation details
In order to provide some functionality resusage dynamically loads the following libraries at startup:
- Psapi.dll to get memory (physical and virtual) used by specific process.
- Pdh.dll to calculate CPU time used by system.
If specific library could be loaded, corresponding functions will always throw WindowsException.
- Registered by Roman Chistokhodov
- ~newapi released 6 years ago
- Sub packages:
- resusage:totalusage, resusage:processusage, resusage:cpuwatcher
0.3.2 2020-Feb-21 0.3.1 2020-Feb-21 0.3.0 2019-Jul-26 0.2.8 2018-May-05 0.2.7 2017-Jul-01
- Download Stats:
0 downloads today
0 downloads this week
4 downloads this month
7944 downloads total
- Short URL: