Jump to content

processor and memory resources


Recommended Posts

Hi,

I have tried to search the forums but cannot find anything.

I was just wondering what the easiest way to retrieve information about processes that are running in terms of memory and processor. I know that a function exists in AutoIT called GetMemStats but this only seems to give me info on memory. Does anybody know of a method to retrieve other resource information, such as processor utilisation etc..etc..

Cheers.

Link to comment
Share on other sites

Hi,

I have tried to search the forums but cannot find anything.

I was just wondering what the easiest way to retrieve information about processes that are running in terms of memory and processor. I know that a function exists in AutoIT called GetMemStats but this only seems to give me info on memory. Does anybody know of a method to retrieve other resource information, such as processor utilisation etc..etc..

Cheers.

You can open the task manager (hidden) and read from the status bar text. That is a simple, if not very original, solution.

Edited by SerialKiller
Link to comment
Share on other sites

I had a look, thanks. Unfortunately I was unable to retrieve info on processor utilisation.

Any other ideas?

Ta.

Other ideas? Sure! The one I posted (and borrowed from someone else--can't recall who). Here is some more info...

If Not ProcessExists ("taskmgr.exe") Then Run ("taskmgr.exe", "", @SW_HIDE)
         $CPU = StatusbarGetText("Windows Task Manager", "", 2)
         $CPU = StringTrimRight($CPU, 1)  ;Remove the %
         $CPU = StringRight($CPU, 3)  ;Get the possible 3 digits
         $CPU = Int(StringReplace($CPU, ":", ""))  ;Remove the colon and convert to an integer
Link to comment
Share on other sites

Welcome to the world of Windows WMI! The Microsoft site has extensive (overwhelming?) documentation...

Do a search in the forums for Scriptomatic and you will find a tool to assist you to write the code to extract most things you want to know about your system.

PS: If you are looking for Win98 resources, have a look at post #6 in http://www.autoitscript.com/forum/index.ph...indpost&p=88507

Edited by Confuzzled
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...