0

So, as the title says I would like to know if there some way to measure how much computer resources a specific program takes up on a windows OS.

Is there any libraries or default header files that allow this? :)


What I want to be able to do is :

Somehow target a process (by code) and check how much computer resources it takes up.

So, if I target something like let's say... Minecraft for example, it would tell me the resources Minecraft uses up on my system.

BiiX
  • 137
  • 1
  • 11

1 Answers1

2

If you just want to see your process resource usage you can view it in the resource monitor program on windows, or with the top command on linux.

If you want to view resource information from within your process, I found a great post on stack overflow by Lanzelot that I think will help: How to determine CPU and memory consumption from inside a process?

Community
  • 1
  • 1
Jakey113G
  • 168
  • 1
  • 9
  • I'm not sure what "within my process" means. Check my update to my post. :) – BiiX Mar 03 '16 at 15:16
  • The fact your edit identifies an application (Minecraft) as a process and yet you say you don't understand what I mean from "within my process", has me a bit confused. Anyway in answer to that would be to say have a program running and that same program is able to know about and discover what resources are being used by itself and other programs/processes. – Jakey113G Mar 03 '16 at 15:21
  • The post you linked me, will it be able to target a specific application that is not a part of my project? (My English isn't very good, sorry for my horrible explaining... :/ ) – BiiX Mar 03 '16 at 15:25
  • That link in particular refers to how to get the resource information relating to itself (the process) but you can reuse the code examples used to get what you need. Basically use the information in that link to get what you need, the only thing you really need to change is "GetCurrentProcess", instead of using that what you want to do is use something that returns the minecraft process handle, if you google and search stack overflow there are a large variety of ways to go about doing this. – Jakey113G Mar 03 '16 at 15:33
  • Alright thanks a lot! :) – BiiX Mar 03 '16 at 15:43