February 23, 2019 Process Information | ||||
---|---|---|---|---|
| ||||
Is there a way to get information about the current process? Memory usage, CPU usage, PID. |
February 23, 2019 Re: Process Information | ||||
---|---|---|---|---|
| ||||
Posted in reply to r-const-dev | On Saturday, 23 February 2019 at 20:49:49 UTC, r-const-dev wrote: > Is there a way to get information about the current process? > Memory usage, CPU usage, PID. The PID is easy, from std.process it's a standard function call away: https://dlang.org/phobos/std_process.html#.thisProcessID I don't think there is anything in phobos about memory or cpu usage. If you're on GNU/Linux you can probe /proc/self/stat and /proc/self/status to get that information, I don't know about windows. |
Copyright © 1999-2021 by the D Language Foundation