I need to be able to start or stop monitoring a given running process by periodically displaying the CPU and memory usage.
Tim Moores wrote:I think my approach would be to display a checkbox next to each process which indicates whether that particular proces is being monitored or not. The user can then set or unset any of them, submit it, and you'd adjust for which process to collect data based on that.
Discussion is from 2008. Perfmon.exe is still available in Win-10 but is a GUI with no API as far as I can tell. They also mention WMI which doesn't run on Win-10.Tim Moores wrote:I see, what you're asking is how to obtain the CPU and memory usage info for a chosen process. I'm not a Windows expert, but this discussion has a number of starting points on how to do that.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Jake Smitch wrote:Anyone have an idea of how I can get the CPU usage from tasklist?
Paul Clapham wrote:
Jake Smitch wrote:Anyone have an idea of how I can get the CPU usage from tasklist?
I think that "Java in General" isn't the most suitable forum for this question. Let's try some other more suitable forum...
Jake Smitch wrote:I am writing my program in Java to complete this task. But if you find that it is not suitable in the "Java in General" forum because it involves a windows command, then by all means move my post to a more appropriate section. Thanks.
Paul Clapham wrote:
Jake Smitch wrote:I am writing my program in Java to complete this task. But if you find that it is not suitable in the "Java in General" forum because it involves a windows command, then by all means move my post to a more appropriate section. Thanks.
It was a specific question about a specific Windows command.
Don't get me started about those stupid light bulbs. |